:root {
  color-scheme: light;
  --paper: #f6f3e9;
  --ink: #30463c;
  --muted: #748278;
  --line: #dddcd0;
  --green: #397c60;
  --sage: #e4eddc;
  --cream: #fffdf6;
  --orange: #d98b53;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; line-height: 1.6; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .42; }
a { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #175d42; outline-offset: 5px; }
.page-shell { max-width: 1256px; margin: auto; padding: 0 36px; }
.site-header { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 22px; border-bottom: 1px solid var(--line); }
.home-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; font-weight: 650; text-decoration: none; }
.home-link span { font-size: 23px; }
.wordmark { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 750; letter-spacing: .03em; }
.mini-jelly { width: 19px; height: 20px; border-radius: 8px 8px 6px 6px; background: #a7cdb1; border: 2px solid #679b7c; box-shadow: inset 3px 3px 0 #d8ebd8; transform: rotate(-8deg); }
.header-note { color: var(--muted); font-size: 12px; letter-spacing: .12em; }
main { max-width: 1104px; margin: auto; }
.hero { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 40px 0 34px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 11px; font-weight: 650; letter-spacing: .12em; }
.eyebrow span { color: var(--orange); font-size: 16px; margin-right: 8px; }
h1 { margin: 0; font-size: clamp(32px, 4vw, 48px); letter-spacing: -.055em; line-height: 1.35; font-weight: 800; }
h1 > span { position: relative; color: var(--green); white-space: nowrap; }
h1 > span::after { content: ''; position: absolute; height: 7px; bottom: 0; left: 0; right: 0; border-radius: 50%; background: #c4d6ad; z-index: -1; }
.intro { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.9; }
.mobile-break { display: none; }
.seed-card { flex: 0 0 220px; background: #edf0e3; border: 1px solid #d9dfcc; border-radius: 19px 19px 19px 5px; padding: 18px 22px; transform: rotate(2deg); }
.seed-card > span, .seed-card > small { display: block; color: #738166; font-size: 10px; }
.seed-card > strong { display: block; margin: 6px 0 2px; font: 600 20px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .17em; }
.notice { background: #fff2d7; color: #77572d; border: 1px solid #e6cf9f; border-radius: 12px; padding: 12px 16px; margin-bottom: 14px; font-size: 12px; }
.notice p { margin: 0; }
.notice p + p { margin-top: 7px; }
.play-layout { display: grid; grid-template-columns: minmax(0, 1fr) 308px; gap: 24px; align-items: start; }
.board-card { border-radius: 25px; border: 1px solid #d6dfcc; background: #e8eedf; padding: 23px 23px 18px; box-shadow: 0 14px 32px #6d81550a; }
.board-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.board-header h2 { margin: 0; font-size: 13px; font-weight: 650; }
.board-header > span { color: #7a8c70; font-size: 10px; }
.small-flower { color: #a6b888; margin-right: 7px; }
.board { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); align-items: end; gap: 16px; margin: 42px 0 30px; }
.tube { grid-column: span 2; display: flex; flex-direction: column; align-items: stretch; min-width: 0; padding: 0; border: 0; background: transparent; border-radius: 12px; position: relative; }
.tube:disabled { opacity: 1; }
.tube-cap { display: block; min-height: 27px; font-size: 10px; font-weight: 600; color: #71886b; text-align: center; }
.tube[aria-pressed="true"] .tube-cap { color: #236041; }
.jar { display: flex; flex-direction: column-reverse; gap: 5px; position: relative; width: 100%; max-width: 94px; margin: 0 auto; padding: 14px 7px 10px; border: 2px solid #adbf9e; border-top: none; border-radius: 0 0 24px 24px; background: linear-gradient(90deg, #ffffff72, #f9fff242 70%, #ffffff9c); box-shadow: inset 3px 0 0 #ffffff8c, 0 6px 0 #a4b39320; }
.jar::before { content: ''; position: absolute; left: -4px; right: -4px; height: 8px; border: 2px solid #adbf9e; top: -2px; border-radius: 6px; background: #f8fbef; }
.tube[aria-pressed="true"] .jar { border-color: #397c60; outline: 3px solid #397c6026; outline-offset: 5px; background-color: #f5ffec; }
.tube[aria-pressed="true"] .jar::before { border-color: #397c60; }
.tube[data-sorted="true"] .jar { border-color: #679d71; }
.jelly-slot { height: 45px; min-height: 45px; display: flex; align-items: center; justify-content: center; border-radius: 13px 13px 10px 10px; position: relative; }
.jelly-slot.empty { border: 1px dashed #c3cfb7; background: #ffffff19; }
.jelly { border: 1px solid var(--jelly-edge); background: var(--jelly-fill); box-shadow: inset 3px 3px 0 #ffffff70, inset -2px -3px 0 #00000006; color: var(--jelly-ink); }
.jelly::before { content: ''; width: 14px; height: 5px; position: absolute; left: 7px; top: 5px; border-radius: 50%; background: #ffffff75; transform: rotate(-12deg); }
.jelly::after { content: ''; position: absolute; right: 5px; bottom: 6px; height: 4px; width: 4px; border-radius: 50%; box-shadow: -6px 0 0 currentColor; background: currentColor; opacity: .3; }
.jelly[data-color="0"] { --jelly-fill: #a9d7bf; --jelly-edge: #85bca0; --jelly-ink: #24543d; background-image: radial-gradient(#548e6b22 1.3px, transparent 1.5px); background-size: 9px 9px; }
.jelly[data-color="1"] { --jelly-fill: #f4b29e; --jelly-edge: #da9b84; --jelly-ink: #743d30; background-image: repeating-linear-gradient(135deg, transparent 0 8px, #a5664d12 8px 10px); }
.jelly[data-color="2"] { --jelly-fill: #c7b5df; --jelly-edge: #ac94c9; --jelly-ink: #4b3563; background-image: repeating-linear-gradient(0deg, transparent 0 7px, #8b6ba61c 7px 9px); }
.jelly[data-color="3"] { --jelly-fill: #efd58a; --jelly-edge: #cfb773; --jelly-ink: #68521e; background-image: radial-gradient(#a98b2b26 2px, transparent 2.2px); background-size: 12px 12px; }
.jelly-number { font: 750 18px/1 ui-rounded, "PingFang SC", sans-serif; z-index: 1; }
.tube-label { display: block; font-size: 11px; font-weight: 600; color: #6a7c63; padding-top: 13px; }
.tube-label > span { font-size: 10px; margin-left: 3px; }
.board-footer { display: flex; justify-content: space-between; gap: 12px; color: #7b8c70; font-size: 10px; line-height: 1.7; border-top: 1px solid #d8e0cd; padding-top: 15px; }
.board-footer > span:last-child { text-align: right; }
.legend-dot { display: inline-block; height: 7px; width: 7px; background: #a1ba8e; border-radius: 50%; margin-right: 5px; }
.side-panel { min-width: 0; }
.result-card { background: #f4e7d6; border: 1px solid #e8d5bc; border-radius: 22px; padding: 21px 23px 20px; }
.section-kicker { margin: 0 0 8px; color: #92927c; font-size: 10px; letter-spacing: .1em; }
.result-card h2 { font-size: 20px; margin: 0 0 8px; letter-spacing: -.03em; }
.result-card > p:not(.section-kicker) { min-height: 40px; margin: 0; color: #8c7d67; font-size: 11px; line-height: 1.8; }
.result-card[data-phase="won"] { background: #dcebd2; border-color: #bdcfad; }
.score-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; }
.score-grid > div { display: flex; flex-direction: column; align-items: flex-start; padding-left: 13px; border-left: 1px solid #daceb9; }
.score-grid > div:first-child { padding-left: 0; border-left: 0; }
.score-grid strong { font-size: 29px; line-height: 1.2; letter-spacing: -.05em; }
.score-grid strong small { font-size: 12px; font-weight: 400; letter-spacing: 0; color: #9b947d; }
.score-grid > div > span { color: #9b907c; font-size: 9px; margin-top: 7px; }
.controls-card { border-radius: 17px; background: var(--cream); border: 1px solid #e0ded1; padding: 15px; margin-top: 15px; }
.primary-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.primary-actions button { background: #edf1e5; border: 1px solid #d8e2ce; border-radius: 11px; min-height: 46px; font-size: 11px; font-weight: 650; padding: 8px; }
.primary-actions button > span { font-size: 18px; margin-right: 4px; font-weight: 400; }
.primary-actions button:first-child { background: var(--green); border-color: var(--green); color: white; }
#status { font-size: 11px; color: #677861; line-height: 1.8; min-height: 40px; margin: 14px 2px 8px; }
.rule-note { color: #a2a390; font-size: 9px; margin: 0 2px; }
.puzzle-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 15px; }
.puzzle-actions button { min-height: 44px; padding: 8px; background: transparent; border: 1px solid #dddcd0; border-radius: 11px; font-size: 11px; font-weight: 600; }
.puzzle-actions button > span { font-size: 16px; margin-right: 4px; }
.puzzle-actions .share-button { grid-column: 1/-1; }
.share-note { text-align: center; font-size: 9px; color: #999b88; line-height: 1.8; margin: 10px 0 0; }
.manual-link { padding: 12px; margin-top: 10px; background: var(--cream); border: 1px solid var(--line); border-radius: 10px; }
.manual-link label { display: block; font-size: 11px; margin-bottom: 7px; }
.manual-link input { width: 100%; min-width: 0; min-height: 44px; border-radius: 5px; border: 1px solid var(--line); padding: 8px; background: white; font-size: 12px; color: var(--ink); }
.how-to { margin: 37px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; padding: 23px 0; }
.how-to > div { display: flex; gap: 11px; align-items: flex-start; }
.step-number { flex-shrink: 0; display: flex; justify-content: center; align-items: center; width: 28px; height: 28px; font-size: 10px; font-weight: 650; background: #e9eddd; border-radius: 50%; color: #809169; }
.how-to h2 { font-size: 12px; font-weight: 650; margin: 2px 0 6px; }
.how-to p { font-size: 10px; color: #929983; margin: 0; }
.collection { margin-top: 32px; }
.collection-heading { display: flex; justify-content: space-between; gap: 18px; align-items: flex-end; margin-bottom: 20px; }
.collection-heading h2 { font-size: 20px; margin: 0; }
#record-count { font-size: 10px; font-weight: 400; color: #939d85; margin-left: 12px; letter-spacing: .08em; white-space: nowrap; }
.collection-heading > p { margin: 0; color: #9d9f8d; text-align: right; font-size: 10px; line-height: 1.8; }
.records { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.empty-record { grid-column: 1/-1; border: 1px dashed #cfd8bd; border-radius: 16px; padding: 32px 18px; text-align: center; color: #a1ab90; font-size: 12px; margin: 0; }
.empty-record span { display: inline-block; vertical-align: middle; margin-right: 10px; font-size: 26px; }
.record-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid #dbe1cd; border-radius: 14px; background: #f0f3e7; }
.record-info { display: flex; flex-direction: column; min-width: 0; }
.record-seed { font: 600 13px ui-monospace, SFMono-Regular, monospace; letter-spacing: .07em; }
.record-score { font-size: 10px; margin-top: 6px; color: #8b967c; }
.record-item button { flex-shrink: 0; background: #fffdf3; border: 1px solid #d7dec7; border-radius: 9px; min-height: 44px; padding: 9px; font-size: 10px; }
.page-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin: 29px 0 32px; font-size: 10px; color: #a1a58e; }
.page-footer > p { margin: 0; }
.page-footer > p:last-child { text-align: right; font-size: 9px; }
dialog { width: min(430px, calc(100% - 36px)); max-height: calc(100% - 36px); border: 1px solid #d4dcc6; border-radius: 22px; background: #fffdf5; padding: 28px; color: var(--ink); box-shadow: 0 24px 80px #253b2830; }
dialog::backdrop { background: #27372c66; backdrop-filter: blur(4px); }
dialog h2 { margin: 0 0 10px; font-size: 22px; }
dialog > p:not(.section-kicker) { font-size: 12px; color: #849076; line-height: 1.9; }
.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 23px; }
.dialog-actions button { min-height: 46px; padding: 9px; border: 1px solid #d7dfc9; border-radius: 10px; background: #f1f4e8; font-size: 12px; }
.dialog-actions .confirm-button { color: white; background: var(--green); border-color: var(--green); }
@media (hover: hover) {
  button:not(:disabled):hover { filter: brightness(.98); }
  .tube:not(:disabled):hover .jar { background-color: #fafff2; }
  a:hover { color: var(--green); }
}
@media (max-width: 1100px) {
  .page-shell { padding: 0 24px; }
  .play-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 18px; }
  .board-card { padding: 20px 18px 16px; }
  .board { gap: 10px; margin-top: 38px; }
  .jar { padding-left: 5px; padding-right: 5px; }
  .result-card { padding: 20px 19px; }
  .score-grid > div { padding-left: 10px; }
}
@media (min-width: 651px) and (max-width: 920px) {
  .board { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 18px 13px; max-width: 390px; margin: 25px auto; }
  .tube:nth-child(4) { grid-column: 2 / span 2; }
  .tube:nth-child(5) { grid-column: 4 / span 2; }
  .jelly-slot { height: 39px; min-height: 39px; }
  .jar { max-width: 84px; }
  .board-footer { flex-direction: column; gap: 5px; }
  .board-footer > span:last-child { text-align: left; }
  .how-to { gap: 16px; }
  .records { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .page-shell { padding: 0 18px; }
  .site-header { min-height: 72px; gap: 12px; }
  .home-link { font-size: 11px; gap: 6px; }
  .wordmark { font-size: 14px; }
  .header-note { display: none; }
  .hero { padding: 25px 0 23px; display: block; }
  .eyebrow { font-size: 9px; letter-spacing: .08em; margin-bottom: 10px; }
  h1 { font-size: 35px; line-height: 1.4; }
  .intro { font-size: 12px; margin-top: 10px; }
  .mobile-break { display: block; }
  h1 .mobile-break { display: none; }
  .seed-card { margin-top: 19px; transform: none; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 13px; border-radius: 12px; }
  .seed-card > span { font-size: 9px; }
  .seed-card > strong { font-size: 17px; margin: 0; letter-spacing: .12em; }
  .seed-card > small { display: none; }
  .play-layout { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .board-card { padding: 18px 17px 14px; border-radius: 22px; }
  .board-header h2 { font-size: 12px; }
  .board-header > span { font-size: 9px; }
  .board { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 12px; max-width: 338px; margin: 22px auto 20px; }
  .tube:nth-child(4) { grid-column: 2 / span 2; }
  .tube:nth-child(5) { grid-column: 4 / span 2; }
  .jar { max-width: 76px; padding: 13px 5px 8px; border-radius: 0 0 21px 21px; }
  .jelly-slot { height: 37px; min-height: 37px; border-radius: 11px 11px 9px 9px; }
  .tube-cap { min-height: 22px; font-size: 9px; }
  .tube-label { padding-top: 10px; font-size: 10px; }
  .board-footer { font-size: 9px; gap: 6px; }
  .board-footer > span { max-width: 54%; }
  .board-footer > span:last-child { max-width: 46%; }
  .side-panel { display: grid; grid-template-columns: minmax(0, 1fr); }
  .result-card { padding: 19px 22px; border-radius: 20px; }
  .result-card > p:not(.section-kicker) { min-height: 0; font-size: 11px; }
  .result-card h2 { font-size: 21px; }
  .score-grid { margin-top: 20px; }
  .score-grid > div { padding-left: 22px; }
  .score-grid > div:first-child { padding-left: 0; }
  .score-grid > div > span { font-size: 10px; }
  .score-grid strong { font-size: 30px; }
  .controls-card { margin-top: 13px; padding: 16px; }
  .primary-actions button { min-height: 48px; font-size: 12px; }
  #status { min-height: 0; font-size: 12px; }
  .rule-note { font-size: 10px; }
  .puzzle-actions button { min-height: 46px; font-size: 12px; }
  .share-note { font-size: 10px; }
  .how-to { grid-template-columns: minmax(0, 1fr); gap: 17px; padding: 21px 0; margin-top: 27px; }
  .how-to > div { gap: 13px; }
  .how-to h2 { font-size: 12px; margin-bottom: 3px; }
  .how-to p { font-size: 11px; }
  .collection { margin-top: 25px; }
  .collection-heading { display: block; margin-bottom: 17px; }
  .collection-heading > p { text-align: left; font-size: 10px; margin-top: 10px; }
  .records { grid-template-columns: minmax(0, 1fr); }
  .record-item { padding: 14px 16px; }
  .record-score { font-size: 11px; }
  .record-item button { font-size: 11px; padding: 10px 15px; }
  .empty-record { font-size: 11px; padding: 25px 12px; }
  .empty-record span { margin-right: 6px; font-size: 23px; }
  .page-footer { display: block; font-size: 10px; margin-bottom: 25px; }
  .page-footer > p:last-child { text-align: left; margin-top: 10px; font-size: 9px; }
  dialog { padding: 24px; }
  dialog h2 { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
