@charset "UTF-8";
:root {
  color-scheme: light;
  --paper: #f2f0e6; --ink: #294940; --muted: #69796b; --line: #d5dacb;
  --green: #294f41; --leaf: #bfd38e; --cream: #faf8ee;
  font-family: "Yu Gothic", "Hiragino Kaku Gothic ProN", system-ui, sans-serif;
  color: var(--ink); background: var(--paper); font-synthesis: none;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 15% 0%, #ffffff99, transparent 60%), var(--paper); }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; } button:disabled { cursor: default; opacity: .4; }
button, canvas, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid #ad803e; outline-offset: 4px; }
[hidden] { display: none !important; }
.keep-word { display: inline-block; white-space: nowrap; }
.garden-app { max-width: 1190px; margin: 0 auto; padding: 30px 32px 20px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.eyebrow { margin: 0; font: 650 10px/1.5 system-ui, sans-serif; letter-spacing: .19em; }
.eyebrow span { margin-left: 9px; color: #889384; }
h1 { margin: 8px 0 3px; font: 500 clamp(30px, 4vw, 43px)/1.4 "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .12em; }
.title-seed { display: inline-block; color: #899b62; font: 400 30px/1 serif; margin-left: 16px; vertical-align: 3px; transform: rotate(15deg); }
.tagline { margin: 0; color: var(--muted); font-size: 12px; letter-spacing: .14em; }
.help-button { display: flex; flex-shrink: 0; white-space: nowrap; gap: 9px; align-items: center; min-height: 46px; padding: 9px 15px; border: 1px solid #bbc6b5; border-radius: 30px; color: var(--ink); background: transparent; font-size: 12px; }
.help-button span { display: grid; place-items: center; border: 1px solid #7e947f; border-radius: 50%; width: 19px; height: 19px; font: 13px serif; }
.mode-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 0 0 16px; padding: 4px; border: 1px solid var(--line); border-radius: 10px; background: #e9eddf; }
.mode-picker button { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 3px 13px; min-height: 52px; padding: 9px 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #738367; }
.mode-picker b { font-size: 13px; } .mode-picker span { font-size: 10px; }
.mode-picker button[aria-pressed="true"] { background: #faf8ef; border-color: #c7d2b9; color: #355c45; box-shadow: 0 2px 5px #4c614612; }
.free-note { border-block: 1px solid #d0d8c1; padding: 18px 0; margin: 18px 0 0; color: #687e5b; font-size: 11px; line-height: 2; }
.garden-shell { display: grid; grid-template-columns: minmax(0, 1fr) 274px; border: 1px solid #cdd4c3; border-radius: 18px; background: var(--cream); box-shadow: 0 18px 60px #273c3310; overflow: hidden; }
.garden-main { padding: 23px 24px 12px; min-width: 0; }
.scoreboard { display: flex; align-items: center; gap: 28px; padding-bottom: 18px; font-variant-numeric: tabular-nums; }
.scoreboard span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 2px; }
.scoreboard strong { font: 500 37px/1.1 Georgia, serif; letter-spacing: -.04em; }
.scoreboard small { font-size: 10px; margin-left: 6px; color: var(--muted); }
.initial-count { border-left: 1px solid #d9ddcc; padding-left: 25px; }
.initial-count strong { font-size: 27px; color: #6c7e58; }
.generation-count { margin-left: auto; text-align: right; }
.generation-count strong { font-size: 29px; }
.compact-goals { display: none; }
.field-wrap { position: relative; overflow: hidden; background: #173d35; border-radius: 9px; box-shadow: inset 0 0 0 1px #2e5445; }
#garden { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; cursor: crosshair; touch-action: pinch-zoom; outline-offset: -4px; }
#garden:focus-visible { outline: 3px solid #ead293; }
.field-label { position: absolute; left: 14px; top: 12px; color: #c9d9b9b3; font: 9px/1.5 system-ui; letter-spacing: .16em; pointer-events: none; }
.field-label i { margin-left: 7px; font: inherit; color: #d5d7ae; }
.phase-label { position: absolute; top: 10px; right: 11px; background: #15342de0; border: 1px solid #486455; border-radius: 20px; padding: 4px 9px; color: #e1e8d3; font-size: 9px; pointer-events: none; }
.field-caption { position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%); color: #e5e8d7; border: 1px solid #53736580; background: #193e35dd; padding: 5px 12px; border-radius: 20px; font-size: 10px; white-space: nowrap; pointer-events: none; }
.placement-note { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 16px; margin: 10px 0 0; font-size: 10px; line-height: 1.65; color: #6b795e; }
.placement-note > span { display: flex; align-items: center; gap: 7px; }
.placement-note i { flex-shrink: 0; width: 14px; height: 14px; border: 1px solid #a7b895; border-radius: 2px; background: repeating-linear-gradient(135deg, #b7c99c30 0 3px, #93a57860 3px 4px); }
.placement-note i.fixed-mark { border-radius: 50%; border-color: #a29c6b; background: #e4dec73b; }
.observation { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; color: var(--muted); font-size: 10px; }
.change-count { display: flex; align-items: center; gap: 5px; font-variant-numeric: tabular-nums; } .change-count b { color: #486247; min-width: 19px; }
.birth-dot, .death-dot, .stay-dot { display: inline-block; flex-shrink: 0; width: 7px; height: 7px; border-radius: 50%; background: #88a64f; }
.death-dot { background: #b98957; margin-left: 9px; } .stay-dot { background: #b2bba1; }
.prediction-toggle { display: flex; align-items: center; gap: 5px; min-height: 36px; cursor: pointer; } .prediction-toggle input { accent-color: #54764d; margin: 0; }
.playback { display: flex; flex-wrap: wrap; gap: 8px; }
.primary-button, .plain-button { min-height: 46px; border: 1px solid var(--green); border-radius: 6px; padding: 11px 16px; font-size: 12px; font-weight: 650; }
.primary-button { color: #f8f7e9; background: var(--green); } .primary-button:hover:not(:disabled) { background: #38614f; } .primary-button span { margin-left: 10px; }
.plain-button { background: transparent; color: var(--ink); border-color: #c9d3bd; } .plain-button:hover:not(:disabled) { background: #edf0e3; }
#play-button { flex: 1 1 140px; } #step-button { flex: 1 1 125px; }
.speed-control { display: flex; border: 1px solid #ccd4c0; border-radius: 6px; padding: 2px; gap: 2px; background: #eff1e7; }
.speed-control button { min-width: 44px; min-height: 44px; border: 0; border-radius: 4px; background: transparent; color: #63735d; font-size: 12px; font-variant-numeric: tabular-nums; }
.speed-control button[aria-pressed="true"] { color: #294f41; background: #fffdf4; box-shadow: 0 1px 5px #304b3521; font-weight: 750; }
.restart-controls { display: flex; flex-wrap: wrap; gap: 0 20px; align-items: center; margin-top: 4px; }
.restart-controls button { min-height: 44px; padding: 5px 0; border: 0; background: transparent; color: #597052; font-size: 11px; text-decoration: underline; text-decoration-color: #c9d3bd; text-underline-offset: 4px; }
#result-button { margin-left: auto; color: #4b793f; }
.status { min-height: 34px; margin: 3px 0 0; font-size: 11px; line-height: 1.75; color: #617562; }
.goal-panel { border-left: 1px solid var(--line); padding: 27px 22px 20px; background: #edf0e2; min-width: 0; }
.goal-heading { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.goal-heading .eyebrow { font-size: 8px; } #goal-summary { font: 500 13px Georgia, serif; color: #647b50; white-space: nowrap; }
h2 { margin: 12px 0; font: 500 25px/1.5 "Yu Mincho", "Hiragino Mincho ProN", serif; letter-spacing: .05em; }
.goal-guide { color: #62745c; font-size: 11px; line-height: 1.9; margin: 10px 0 17px; }
.goal-guide b { font-weight: 650; color: #48603f; }
.goal-cards { display: grid; gap: 10px; }
.goal-card { border: 1px solid #d1d9c5; background: #f8f9ef; border-radius: 8px; padding: 12px; transition: background .25s, border-color .25s; }
.goal-card.in-range { background: #e5edce; border-color: #a7bd82; }
#goal-B.in-range { background: #deede3; border-color: #9bbbb0; }
.goal-card-top { display: flex; align-items: center; gap: 7px; font-size: 10px; color: #61705b; }
.area-mark { display: inline-grid; place-items: center; width: 23px; height: 23px; border: 1px solid #a7bc83; border-radius: 5px; background: #e2ebc9; color: #52663a; font: 600 12px Georgia, serif; }
.area-b { border-color: #99bbb1; background: #dcebe4; color: #3d6b60; }
.goal-state { margin-left: auto; font-size: 9px; font-weight: 500; white-space: nowrap; }
.goal-numbers { display: flex; align-items: baseline; gap: 5px; margin: 10px 0 12px; }
.goal-numbers strong { font: 500 31px/1 Georgia, serif; font-variant-numeric: tabular-nums; }
.goal-numbers small { font-size: 9px; color: #78816c; }
.goal-numbers > span { margin-left: auto; font-size: 10px; color: #7a846c; } .goal-numbers b { font-size: 13px; color: #546a42; font-weight: 600; }
.goal-track { height: 5px; background: #e0e4d8; border-radius: 4px; position: relative; }
.target-range { position: absolute; left: 20%; width: 16%; height: 5px; background: #abc481; } #goal-B .target-range { background: #9dc2b9; }
.goal-position { position: absolute; width: 5px; height: 11px; top: -3px; border-radius: 2px; transform: translateX(-50%); background: #627647; transition: left .2s; }
#goal-B .goal-position { background: #49796b; }
.setup-controls { margin-top: 23px; }
.setup-heading { display: flex; justify-content: space-between; align-items: center; gap: 6px; } .setup-heading h3 { margin: 0; font-size: 11px; } .setup-heading > span { font-size: 9px; color: #77836b; }
.setup-controls p { margin: 9px 0 12px; font-size: 10px; line-height: 1.8; color: #718063; min-height: 36px; }
.setup-buttons { display: flex; gap: 6px; } .setup-buttons button { flex: 1; padding: 8px 5px; font-size: 10px; font-weight: 500; background: #f6f7ed; }
.rule-note { border-top: 1px solid #ccd5bd; padding-top: 16px; margin-top: 20px; }
.rule-note h3 { font-size: 11px; font-weight: 700; margin: 0 0 11px; }
.rule-note p { display: flex; gap: 7px; align-items: center; margin: 0 0 8px; font-size: 10px; line-height: 1.8; }
.rule-note > small { display: block; color: #7d846c; font-size: 9px; line-height: 1.8; }
.garden-journal { grid-column: 1 / -1; display: flex; min-width: 0; align-items: center; gap: 28px; padding: 16px 24px; border-top: 1px solid var(--line); }
.journal-title { white-space: nowrap; } .journal-title .eyebrow { font-size: 8px; } .journal-title p { font-size: 10px; margin: 5px 0 0; color: var(--muted); }
#history-chart { flex: 1 1 0; width: 0; min-width: 60px; max-width: 450px; height: 46px; overflow: visible; }
.journal-note { text-align: right; margin-left: auto; white-space: nowrap; } .journal-note span { display: block; font-size: 9px; color: #7e8b74; } .journal-note strong { display: block; font-size: 10px; font-weight: 500; margin-top: 7px; }
.page-footer { margin-top: 18px; color: #7c8370; font-size: 10px; text-align: center; line-height: 1.8; }
.keyboard-help { color: #879079; font-size: 9px; text-align: center; margin: 12px 0 0; }
dialog { border: 1px solid #ccd3bc; border-radius: 16px; background: #faf8ef; color: var(--ink); padding: 32px; width: min(530px, calc(100% - 28px)); max-width: calc(100% - 28px); max-height: calc(100dvh - 32px); overflow-y: auto; box-shadow: 0 24px 100px #112e3750; }
dialog::backdrop { background: #14372d94; backdrop-filter: blur(5px); } dialog > p { font-size: 12px; line-height: 1.9; } dialog > .primary-button { width: 100%; margin-top: 11px; min-height: 50px; }
.dialog-close { position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border: 0; background: transparent; color: var(--ink); font: 25px system-ui; }
.intro-dialog { text-align: center; } .intro-dialog h2 { font-size: 35px; line-height: 1.5; margin: 17px 0 13px; letter-spacing: .06em; } .intro-dialog > .eyebrow { font-size: 8px; }
.intro-art { position: relative; height: 80px; width: 260px; margin: 0 auto 15px; color: #8eaa6c; } .intro-art span { position: absolute; font: 56px/1 Georgia, serif; }
.intro-art span:nth-child(1) { left: 25px; top: 29px; font-size: 48px; } .intro-art span:nth-child(2) { left: 104px; top: 9px; } .intro-art span:nth-child(3) { right: 23px; top: 1px; font-size: 33px; } .intro-art span:nth-child(4) { left: 160px; top: 50px; font-size: 22px; } .intro-art span:nth-child(5) { left: 3px; top: 2px; font-size: 23px; }
.intro-art i { position: absolute; top: 45px; left: 60px; width: 139px; height: 23px; border-top: 1px solid #a7b99b; border-radius: 50%; transform: rotate(-21deg); }
.intro-facts { display: flex; justify-content: space-around; gap: 5px; border-block: 1px solid #d8decc; margin-top: 22px; padding: 15px 0; font-size: 10px; color: #71805f; } .intro-facts b { color: var(--ink); font-size: 17px; } .intro-tip { color: #758265; font-size: 10px; }
.help-steps { padding-left: 21px; font-size: 12px; margin: 21px 0; } .help-steps li { padding-left: 4px; margin-bottom: 15px; } .help-steps b { display: block; margin-bottom: 5px; } .help-steps span { display: block; color: #68765f; font-size: 11px; line-height: 1.8; }
.help-rule { padding: 16px; background: #edf0e1; border-radius: 8px; font-size: 11px; } .help-rule p { line-height: 1.8; margin: 7px 0 0; } .birth-text { color: #4a792a; } .death-text { color: #985c25; } .help-small { font-size: 10px; color: #73806b; }
.result-dialog { text-align: center; } .result-dialog h2 { margin-top: 18px; font-size: 30px; } .result-dialog > p:not(.eyebrow) { color: #6c7e5f; font-size: 11px; }
.result-generation { margin: 16px 0; } .result-generation strong { font: 500 72px/1.2 Georgia, serif; color: #607c47; letter-spacing: -.05em; } .result-generation > span { margin-left: 10px; font-size: 12px; color: #71805f; }
.result-goals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .result-goals > div { padding: 14px; border: 1px solid #d2dec0; background: #edf2df; border-radius: 8px; } .result-goals > div:nth-child(2) { background: #e9f0e8; border-color: #c5d7cb; }
.result-goals strong { display: block; margin: 7px 0; font: 500 30px/1 Georgia, serif; } .result-goals small { font: 10px system-ui; } .result-goals > div > span:last-child { font-size: 10px; color: #6c7e5f; }
.result-actions { display: flex; gap: 9px; margin-top: 9px; } .result-actions button { flex: 1; padding-inline: 8px; font-size: 11px; }
@media (max-width: 950px) {
  .garden-app { padding: 25px 20px 18px; } .garden-shell { grid-template-columns: minmax(0, 1fr) 247px; } .garden-main { padding: 19px 17px 10px; } .goal-panel { padding: 24px 16px 16px; }
  .scoreboard { gap: 20px; } .initial-count { padding-left: 18px; } .scoreboard strong { font-size: 32px; } .initial-count strong, .generation-count strong { font-size: 26px; } .garden-journal { gap: 18px; }
  .speed-control { flex: 1 0 100%; justify-content: center; } .speed-control button { flex: 1; }
}
@media (max-width: 720px) {
  .garden-app { padding: 20px 12px; } .page-header { margin: 0 4px 20px; } h1 { font-size: 32px; } .tagline { font-size: 10px; } .help-button { padding: 9px 12px; font-size: 11px; }
  .garden-shell { grid-template-columns: minmax(0, 1fr); border-radius: 12px; } .garden-main { padding: 16px 12px 8px; } .scoreboard { gap: 22px; padding-bottom: 15px; }
  .compact-goals { display: flex; align-items: center; gap: 13px; padding: 0 0 12px; color: #63735d; font-size: 10px; }
  .compact-goals > span { display: flex; align-items: center; gap: 4px; } .compact-goals i { font-style: normal; } .compact-goals b { min-width: 12px; font: 500 17px Georgia, serif; } .compact-goals > small { margin-left: auto; font-size: 9px; }
  .compact-goals .in-range b { color: #47732c; } .compact-goals .in-range::after { content: "✓"; color: #47732c; font-size: 10px; }
  .field-label { font-size: 7px; left: 10px; top: 9px; } .phase-label { top: 7px; right: 8px; font-size: 8px; } .field-caption { font-size: 9px; bottom: 8px; padding: 4px 9px; }
  .goal-panel { border-left: 0; border-top: 1px solid var(--line); padding: 19px 16px; }
  .goal-panel h2 { font-size: 23px; margin: 8px 0 6px; } .goal-panel h2 br, .goal-guide br { display: none; } .goal-guide { margin: 8px 0 15px; }
  .goal-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } .goal-card { padding: 11px 10px; }
  .goal-card-top { flex-wrap: wrap; gap: 4px; } .goal-state { flex-basis: 100%; margin: 2px 0 0 1px; }
  .goal-numbers { flex-wrap: wrap; gap: 4px; margin: 7px 0 10px; } .goal-numbers > span { margin-left: auto; font-size: 9px; } .goal-numbers b { font-size: 11px; }
  .setup-controls { margin-top: 20px; } .setup-controls p { min-height: 0; } .setup-buttons button { font-size: 11px; }
  .rule-note { margin-top: 18px; padding-top: 14px; } .rule-note p { margin-bottom: 5px; } .rule-note > small { display: none; }
  .garden-journal { padding: 15px 13px; gap: 13px; } .journal-title { display: none; } #history-chart { max-width: none; } .journal-note strong { font-size: 9px; }
  .page-footer { padding: 0 8px; font-size: 9px; } .keyboard-help { display: none; }
}
@media (max-width: 370px) {
  h1 { font-size: 28px; white-space: nowrap; } .page-header { gap: 8px; } .help-button { gap: 6px; padding-inline: 10px; font-size: 10px; }
  .garden-app { padding-inline: 8px; } .garden-main { padding-inline: 9px; } .scoreboard { gap: 12px; } .initial-count { padding-left: 12px; }
  .scoreboard strong { font-size: 29px; } .initial-count strong, .generation-count strong { font-size: 25px; } .scoreboard span { font-size: 9px; }
  .observation { font-size: 9px; gap: 4px; } .change-count { gap: 3px; } .primary-button, .plain-button { padding-inline: 11px; font-size: 11px; }
  .title-seed { margin-left: 7px; font-size: 24px; } .goal-panel { padding-inline: 12px; } .goal-panel h2 { font-size: 21px; } .goal-numbers > span { flex-basis: 100%; margin: 2px 0 0; }
  .goal-numbers strong { font-size: 28px; } .restart-controls { column-gap: 15px; }
  dialog { padding: 25px 20px; } .intro-dialog h2, .result-dialog h2 { font-size: 24px; } .intro-art { max-width: 100%; } dialog > p { font-size: 11px; } .intro-facts b { font-size: 15px; } .intro-facts span { display: flex; flex-direction: column; gap: 3px; }
}
@media (min-width: 721px) and (max-height: 800px) {
  .garden-app { max-width: 1020px; padding-top: 18px; } .page-header { margin-bottom: 16px; } h1 { font-size: 32px; margin-top: 4px; }
  .garden-main { padding: 16px 18px 10px; } .scoreboard { padding-bottom: 12px; } .scoreboard strong { font-size: 32px; } .initial-count strong, .generation-count strong { font-size: 27px; }
  .goal-panel { padding-top: 20px; } .goal-panel h2 { font-size: 23px; margin-block: 8px; } .goal-guide { margin-block: 8px 13px; } .setup-controls { margin-top: 18px; } .rule-note { margin-top: 15px; padding-top: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
