@charset "UTF-8";

:root {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: #374839;
  background: #eeece2;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --ink: #374839;
  --muted: #777d69;
  --paper: #f9f6eccc;
  --line: #66705526;
  --accent: #ad652e;
  --green: #3f5c46;
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; overflow: hidden; overscroll-behavior: none; }
body { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button { color: inherit; cursor: pointer; touch-action: manipulation; }
button, input { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible { outline: 3px solid #658d81; outline-offset: 4px; }
button:disabled { opacity: .4; cursor: default; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.playground { position: relative; width: 100%; height: 100%; height: 100dvh; isolation: isolate; overflow: hidden; }
#scene { position: absolute; inset: 0; touch-action: none; }
#scene canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
#scene canvas.rotation-mode { cursor: grab; }
#scene canvas.rotating { cursor: grabbing; }
#scene canvas:focus-visible { outline: 3px solid #658d81; outline-offset: -4px; }
.scene-vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 44%, transparent 47%, #e9e7da35 100%); pointer-events: none; }
.hud { position: absolute; z-index: 2; pointer-events: none; }
.hud button, .hud input, .hud label { pointer-events: auto; }

.field-header { top: 36px; left: 40px; }
.chapter-label { display: flex; align-items: center; gap: 7px; font-size: 10px; font-weight: 650; letter-spacing: .025em; color: #767a64; }
.weather-dot { width: 6px; height: 6px; border-radius: 50%; background: #b79761; box-shadow: 0 0 0 3px #b7976117; }
body[data-weather="rain"] .weather-dot { background: #6a989e; box-shadow: 0 0 0 3px #6a989e20; }
body[data-weather="storm"] .weather-dot { background: #667887; box-shadow: 0 0 0 3px #66788720; }
body[data-weather="heat"] .weather-dot { background: #c68b36; box-shadow: 0 0 0 3px #c68b3620; }
.chapter-number { padding-left: 14px; margin-left: 8px; border-left: 1px solid #777d6936; font: 9px/1.2 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .08em; }
h1 { margin: 15px 0 7px; font-family: "Iowan Old Style", "AppleMyungjo", "Nanum Myeongjo", "Batang", Georgia, serif; font-size: 34px; letter-spacing: -.075em; line-height: 1.2; font-weight: 700; }
.title-comma { color: #ab693a; margin-right: 4px; }
.title-period { color: #ab693a; }
.title-caption { font-size: 11px; letter-spacing: .15em; margin: 0; color: #7b7b66; }
.field-header-rule { width: 26px; height: 1px; margin-top: 22px; background: #6c765246; }
.first-instruction { font-size: 11px; line-height: 1.9; letter-spacing: -.015em; color: #737864; margin-top: 12px; }

.top-actions { top: 31px; right: 32px; display: flex; align-items: center; gap: 3px; z-index: 5; }
.utility-button { position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; height: 40px; border: 1px solid transparent; border-radius: 50%; background: transparent; transition: background .15s, transform .15s; }
.utility-button:hover { background: #fffaf07d; }
.utility-button:active { transform: translateY(1px); }
.utility-button svg { width: 19px; height: 19px; stroke-width: 1.6; }
.utility-button.icon-only { width: 40px; }
.weather-picker summary { display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 12px; border: 1px solid #a6b8a25c; border-radius: 24px; background: #f5f6eccc; font-size: 11px; cursor: pointer; list-style: none; pointer-events: auto; }
.weather-picker summary::-webkit-details-marker { display: none; }
.weather-picker summary:focus-visible { outline: 2px solid #658d81; outline-offset: 3px; }
.weather-picker summary > svg { width: 20px; height: 20px; }
.weather-picker summary .weather-chevron { width: 12px; height: 12px; transition: transform .15s; }
.weather-picker[open] .weather-chevron { transform: rotate(180deg); }
body[data-weather="storm"] .weather-picker summary { color: #425769; background: #e0e7e8; border-color: #9fadb7; }
body[data-weather="rain"] .weather-picker summary { color: #315b60; background: #e1eeea; border-color: #91a7a0; }
body[data-weather="heat"] .weather-picker summary { color: #8a5b21; background: #f3dfb3; border-color: #d9b96f; }
.weather-menu { position: absolute; top: calc(100% + 10px); right: 0; width: min(326px, calc(100vw - 28px)); padding: 15px; border: 1px solid #8d98714a; border-radius: 16px; background: #faf8ef; box-shadow: 0 12px 35px #43543d24; pointer-events: auto; }
.weather-menu-title { margin: 0 0 12px; color: #747b66; font-size: 10px; }
.weather-options { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 7px; }
.weather-options button { display: flex; align-items: center; gap: 9px; min-height: 65px; padding: 10px; text-align: left; border: 1px solid #a4ae9138; border-radius: 10px; background: #f1f0e5; }
.weather-options button > svg { width: 26px; height: 26px; flex-shrink: 0; }
.weather-options button strong { display: block; font-size: 12px; font-weight: 650; }
.weather-options button small { display: block; margin-top: 5px; font-size: 9px; line-height: 1.4; color: #737b68; }
.weather-options button[aria-pressed="true"] { background: #e7eedd; border-color: #8caa78; box-shadow: inset 0 0 0 1px #8caa7840; }
.weather-options #rain-toggle[aria-pressed="true"] { background: #dfede8; border-color: #91a7a0; }
.weather-options #storm-toggle[aria-pressed="true"] { background: #dfe6e9; border-color: #8298a7; }
.weather-options #heat-toggle[aria-pressed="true"] { background: #f3dfb3; border-color: #d9b96f; }
.weather-menu-note { margin: 12px 0 0; font-size: 9px; line-height: 1.5; color: #848872; }
.action-divider { width: 1px; height: 16px; margin: 0 9px; background: #6f786128; }
.sound-off-mark { position: absolute; width: 24px; height: 1.4px; background: currentColor; rotate: -45deg; box-shadow: 0 0 0 1.5px #eeece2; }
#sound-toggle[aria-pressed="true"] .sound-off-mark { display: none; }

.discovery-note { top: 119px; right: 41px; width: 213px; transform: rotate(1deg); padding: 22px 20px 16px; border: 1px solid #66705517; border-radius: 2px 2px 12px 2px; background: linear-gradient(110deg, #faf7ecce, #f7f2e4b8); box-shadow: 2px 6px 18px #5f5a3a06, inset 0 1px #ffffffe0; }
.discovery-note::before { content: ""; position: absolute; top: -8px; left: 75px; width: 61px; height: 16px; background: #dad7b561; rotate: -5deg; clip-path: polygon(2% 0, 100% 5%, 97% 100%, 0 91%); }
.note-eyebrow { font-size: 8px; letter-spacing: .035em; color: #92907a; }
.discovery-note h2 { display: flex; align-items: center; justify-content: space-between; font-family: "AppleMyungjo", "Nanum Myeongjo", "Batang", Georgia, serif; font-size: 19px; font-weight: 700; margin: 8px 0 18px; letter-spacing: -.07em; }
.note-spark { width: 20px; height: 20px; stroke-width: 1.3; color: #ae743f; transform: rotate(12deg); }
.discovery-list { list-style: none; padding: 0; margin: 0; }
.discovery-list li { display: flex; align-items: center; gap: 9px; margin-top: 12px; font-size: 11px; color: #737963; transition: color .3s; }
.goal-check { position: relative; width: 13px; height: 13px; border: 1px solid #a6a68c99; border-radius: 50%; flex: 0 0 auto; }
.done { color: #3f6448 !important; }
.done .goal-check { border-color: #5e7752; background: #5e7752; }
.done .goal-check::after { content: ""; position: absolute; top: 2px; left: 3px; width: 4px; height: 6px; border-right: 1.5px solid #fffdf4; border-bottom: 1.5px solid #fffdf4; transform: rotate(40deg); }
.note-bottom { margin-top: 21px; padding-top: 12px; border-top: 1px dashed #8c8c6433; display: flex; align-items: center; justify-content: space-between; font-size: 9px; color: #858571; }
.coin-total { display: flex; align-items: center; gap: 5px; color: #a8782f; font-size: 12px; }
.coin-total svg { width: 16px; height: 16px; stroke-width: 1.3; }
.coin-total b { min-width: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.coin-pickup { position: fixed; z-index: 20; width: 22px; height: 22px; display: grid; place-items: center; pointer-events: none; border-radius: 50%; border: 2px solid #c6933e; outline: 2px solid #fff4c766; background: #f8d67a; color: #ab7530; box-shadow: 0 3px 10px #bd8f3d44, inset 0 0 0 2px #ffe7a3; font-size: 12px; will-change: transform, opacity; }

.side-actions { left: 38px; bottom: 206px; display: flex; flex-direction: column; gap: 9px; }
.side-button { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #77816024; border-radius: 9px; font-size: 10px; background: #faf7ecb8; width: fit-content; transition: background .15s; box-shadow: 0 2px 3px #44421e02; }
.side-button svg { width: 17px; height: 17px; stroke-width: 1.6; }
.side-button:hover { background: #fffdf4; }
.side-button[aria-pressed="true"] { background: #e5dbc1; border-color: #c5b386; }

.tool-dock { bottom: max(18px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: min(814px, calc(100% - 80px)); }
.tool-context { display: flex; align-items: flex-end; justify-content: space-between; padding: 0 17px 11px; gap: 16px; }
.current-tool { display: flex; flex: 1; align-items: center; gap: 9px; min-width: 0; }
.current-tool-dot { width: 5px; height: 5px; background: #a87435; border-radius: 50%; flex: 0 0 auto; }
#tool-title { font-size: 12px; font-weight: 650; white-space: nowrap; letter-spacing: -.04em; }
#tool-hint { color: #737760; font-size: 11px; margin-left: 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.current-tool.material-context { display: grid; grid-template-columns: 5px auto minmax(0,1fr); gap: 5px 8px; }
.material-context .current-tool-dot { grid-column: 1; grid-row: 1; }
.material-context #tool-title { grid-column: 2; grid-row: 1; }
.material-context #tool-hint { grid-column: 2 / -1; grid-row: 2; margin: 0; }
.material-options { grid-column: 3; grid-row: 1; justify-self: start; display: inline-flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid #b7a57a4d; border-radius: 11px; background: #f1eddfed; pointer-events: auto; }
.material-options button { display: flex; align-items: center; justify-content: center; gap: 5px; min-width: 48px; min-height: 31px; padding: 3px 9px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: #8b8771; font-size: 11px; white-space: nowrap; }
.material-options button svg { width: 17px; height: 17px; stroke-width: 1.6; }
.material-options button:hover:not(:disabled) { background: #fffaf1a6; }
.material-options button[aria-pressed="true"] { color: #8a602b; border-color: #c9a86a70; background: #fff7e8; box-shadow: 0 1px 4px #7e663114; font-weight: 650; }
.material-options button[data-material="water"][aria-pressed="true"] { color: #356f68; border-color: #81aaa180; background: #eff8f0; }
.current-tool.watering-context { display: grid; grid-template-columns: 5px minmax(0,1fr); gap: 4px 8px; }
.current-tool.material-context.watering-context { grid-template-columns: 5px auto minmax(0,1fr); gap: 5px 8px; }
.watering-context #tool-hint { grid-column: 2; margin: 0; }
.material-context.watering-context #tool-hint { grid-column: 2 / -1; }
.material-context .water-options { grid-column: 2 / -1; grid-row: 3; }
.water-options { grid-column: 2; display: flex; gap: 4px; width: fit-content; padding: 3px; background: #e7eadfd9; border: 1px solid #9dab8b33; border-radius: 10px; pointer-events: auto; }
.water-options button { display: flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 3px 13px; border: 1px solid transparent; border-radius: 7px; font-size: 10px; color: #6c7a67; background: transparent; white-space: nowrap; }
.water-options button[aria-pressed="true"] { color: #325f50; border-color: #91b19e66; background: #fcfcf4; box-shadow: 0 1px 4px #4d634717; font-weight: 650; }
.water-options button:hover { background: #fbfcf177; }
.water-options button svg { width: 17px; height: 17px; }
.current-tool:has(.ant-options:not([hidden])) { display: grid; grid-template-columns: 5px minmax(0,1fr); gap: 4px 8px; }
.current-tool:has(.ant-options:not([hidden])) #tool-hint { grid-column: 2; margin: 0; }
.ant-options { grid-column: 2; display: flex; align-items: center; gap: 9px; color: #727d63; font-size: 10px; }
#ant-status { min-width: 0; line-height: 1.5; }
#ant-clear { flex-shrink: 0; min-height: 30px; min-width: 42px; padding: 4px 8px; border: 1px solid #a4ae9155; border-radius: 8px; background: #f8f7ed; font-size: 10px; }
#ant-clear:hover { background: #e9eddf; }
.toolbox { background: #fbf8efe8; border: 1px solid #fefcf4; border-radius: 22px; padding: 9px 11px 0; box-shadow: 0 8px 28px #4b4c3510, 0 1px 3px #4b4c3510, inset 0 0 0 1px #7770440c; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); pointer-events: auto; }
.tools-scroll { display: flex; gap: 5px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; scroll-behavior: smooth; }
.tools-scroll::-webkit-scrollbar { display: none; }
.tool-button { position: relative; display: flex; flex: 1 0 0; min-width: 74px; flex-direction: column; align-items: center; justify-content: center; gap: 5px; height: 87px; border: 1px solid transparent; border-radius: 13px; background: transparent; color: #75806a; transition: color .15s, background .15s, border-color .15s, transform .15s; }
.tool-button svg { width: 42px; height: 42px; stroke-width: 1.55; transition: transform .18s; }
.tool-button > span { font-size: 10px; font-weight: 500; letter-spacing: -.035em; white-space: nowrap; }
.tool-button > kbd { position: absolute; top: 7px; left: 9px; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 8px; font-weight: 400; color: #999d89; }
.tool-button:hover { background: #eae9d955; color: #475b42; }
.tool-button:hover svg { transform: translateY(-2px) rotate(-4deg); }
.tool-button:active { transform: translateY(1px); }
.tool-button[aria-pressed="true"] { background: #ead6b2; border-color: #d7bb8c; color: #855b28; box-shadow: inset 0 1px #ffffff70, 0 2px 3px #ab824713; }
.tool-button[aria-pressed="true"] > span { font-weight: 650; }
.tool-button[aria-pressed="true"] > kbd { color: #af8b56; }
.tool-button[aria-pressed="true"]::after { content: ""; position: absolute; bottom: -5px; left: 50%; width: 4px; height: 4px; transform: translateX(-50%); background: #aa7d40; border-radius: 50%; display: none; }
.toolbox-bottom { display: flex; align-items: center; justify-content: space-between; height: 44px; gap: 12px; margin: 8px 5px 0; border-top: 1px solid #7e855420; }
.brush-control { display: flex; align-items: center; gap: 8px; color: #788168; font-size: 9px; white-space: nowrap; }
.brush-control > span:first-child { margin-right: 3px; }
.brush-dot { border-radius: 50%; background: #7d8868; display: block; }
.brush-dot.small { width: 3px; height: 3px; }
.brush-dot.large { width: 8px; height: 8px; }
#brush-size { appearance: none; -webkit-appearance: none; width: 80px; height: 20px; background: transparent; margin: 0; cursor: pointer; touch-action: pan-x; }
#brush-size::-webkit-slider-runnable-track { height: 2px; border-radius: 2px; background: #bcc0a8; }
#brush-size::-moz-range-track { height: 2px; border-radius: 2px; background: #bcc0a8; }
#brush-size::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 11px; height: 11px; margin-top: -4.5px; border: 2px solid #fffaf0; border-radius: 50%; background: #627b53; box-shadow: 0 0 0 1px #627b53; }
#brush-size::-moz-range-thumb { width: 9px; height: 9px; border: 2px solid #fffaf0; border-radius: 50%; background: #627b53; box-shadow: 0 0 0 1px #627b53; }
#brush-value { min-width: 17px; font: 9px ui-monospace, "SFMono-Regular", Consolas, monospace; color: #8d927d; }
.tool-navigation { display: flex; flex-shrink: 0; gap: 4px; }
.tool-navigation button { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid #a4ae914d; border-radius: 8px; background: #f4f1e6; color: #667858; }
.tool-navigation button:hover:not(:disabled) { background: #e5ead9; }
.tool-navigation button:disabled { opacity: .3; }
.tool-navigation svg { width: 17px; height: 17px; }
.history-actions { display: flex; gap: 14px; }
.history-actions button { padding: 4px 0; border: 0; background: none; display: flex; align-items: center; gap: 5px; font-size: 9px; color: #7d846d; }
.history-actions button:hover { color: #314d38; }
.history-actions svg { width: 13px; height: 13px; stroke-width: 1.6; }
.dock-footnote { display: flex; justify-content: space-between; align-items: center; margin: 10px 17px 0; color: #919480; font-size: 8px; letter-spacing: .01em; }
.dock-footnote > span { display: flex; align-items: center; gap: 5px; }
.save-dot { width: 4px; height: 4px; background: #96a180; border-radius: 50%; }
.dock-footnote kbd { font: 8px ui-monospace, "SFMono-Regular", Consolas, monospace; padding: 1px 3px; border: 1px solid #96977c30; border-radius: 3px; }
.dock-footnote .desktop-hint { gap: 4px; }
.desktop-hint > span { padding: 0 5px; }
.dock-footnote .mobile-hint { display: none; }

.toast { position: absolute; z-index: 4; left: 50%; bottom: 221px; transform: translate(-50%, 8px); max-width: min(440px, calc(100% - 36px)); padding: 11px 19px; border-radius: 25px; background: #3f523eea; color: #fffdf0; box-shadow: 0 5px 18px #263a2220; font-size: 12px; line-height: 1.6; text-align: center; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none; }
.toast.show, .toast.visible, .toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast:empty { display: none; }
.playground:has(.material-context) .toast { bottom: 310px; }

.flag-panel { top: 245px; left: 40px; transform: none; width: 240px; max-width: calc(100% - 32px); padding: 20px 18px 17px; background: #fff9ecee; border: 1px solid #c3b58d75; border-radius: 4px 4px 19px 4px; box-shadow: 0 8px 30px #5d53231a; backdrop-filter: blur(12px); }
.flag-label { display: flex; gap: 6px; align-items: center; color: #a1753d; font-size: 10px; }
.flag-label svg { width: 16px; height: 16px; }
.flag-panel h2 { margin: 12px 0 9px; font-family: "AppleMyungjo", "Batang", Georgia, serif; font-size: 18px; letter-spacing: -.06em; }
.flag-panel > p { font-size: 11px; color: #82816a; line-height: 1.8; margin: 0; }
.flag-turn-line { margin-top: 18px; padding-top: 16px; border-top: 1px dashed #aaa07e55; display: flex; flex-direction: column; gap: 5px; }
.flag-turn-line strong { font-size: 12px; }
.flag-turn-line span { font-size: 10px; color: #99947a; }
.flag-panel-actions { display: flex; gap: 10px; margin-top: 15px; }
.primary-button, .secondary-button { border: 1px solid #3f5c46; border-radius: 8px; min-height: 41px; padding: 10px 17px; font-size: 11px; font-weight: 600; background: #3f5c46; color: #fffcef; transition: background .15s; }
.primary-button:hover { background: #2f4b36; }
.secondary-button { background: #f7f4e7; color: #5c6b50; border-color: #c7c9b5; }
.secondary-button:hover { background: #ecebdc; }
.text-button { border: 0; background: transparent; color: #8c896f; font-size: 11px; padding: 9px 7px; }

.paper-dialog { color: var(--ink); width: min(490px, calc(100vw - 32px)); max-height: calc(100dvh - 40px); margin: auto; padding: 37px 37px 28px; border: 1px solid #fffdf7; border-radius: 7px 7px 24px 7px; background: #faf7ec; box-shadow: 0 20px 100px #1a291b40; overflow-y: auto; }
.paper-dialog::backdrop { background: #33402c53; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
.dialog-close { position: absolute; top: 13px; right: 13px; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: none; color: #7f846c; }
.dialog-close:hover { background: #ebebdc; }
.dialog-close svg { width: 18px; height: 18px; }
.dialog-eyebrow { font-size: 10px; letter-spacing: .04em; color: #ac8454; }
.paper-dialog h2 { margin: 13px 0 15px; font-family: "AppleMyungjo", "Batang", Georgia, serif; font-size: 26px; letter-spacing: -.07em; line-height: 1.4; }
.dialog-intro { font-size: 12px; line-height: 1.95; color: #797e69; margin: 0 0 25px; }
.help-steps { border-top: 1px solid #a3a48a35; padding: 21px 0 0; }
.help-steps > div { display: flex; gap: 16px; margin-bottom: 18px; }
.help-steps > div > span { font: italic 18px/1.5 Georgia, serif; color: #bca077; }
.help-steps p { margin: 0; font-size: 11px; color: #82836e; line-height: 1.9; }
.help-steps strong { display: block; font-size: 12px; font-weight: 650; color: #58664d; margin-bottom: 2px; }
.help-shortcuts { display: flex; gap: 13px; flex-wrap: wrap; padding: 14px 0; border-top: 1px dashed #a5a28545; font-size: 10px; color: #7d846c; }
.help-shortcuts kbd { font: 9px ui-monospace, "SFMono-Regular", Consolas, monospace; padding: 3px 5px; border: 1px solid #b7b7a280; border-radius: 4px; background: #fffffa5e; }
.keyboard-help { font-size: 10px; line-height: 1.8; color: #82836e; margin: 0 0 14px; }
.keyboard-help kbd { font: 9px ui-monospace, "SFMono-Regular", Consolas, monospace; }
.dialog-smallprint { font-size: 10px; line-height: 1.8; color: #92907a; margin: 8px 0 0; }
.reset-dialog { width: min(455px, calc(100vw - 32px)); }
.reset-dialog h2 { font-size: 24px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }

.loading-screen { position: absolute; z-index: 10; inset: 0; display: flex; align-items: center; justify-content: center; flex-direction: column; background: #eeece2; color: #4d5d43; transition: opacity .6s; }
.loading-mark { display: flex; align-items: center; justify-content: center; width: 74px; height: 74px; margin-bottom: 18px; border: 1px solid #9e9e7135; border-radius: 50%; background: #f7f3e580; }
.loading-mark svg { width: 40px; height: 40px; stroke-width: 1.3; color: #9a7545; }
.loading-screen strong { font-family: "AppleMyungjo", "Batang", Georgia, serif; font-size: 22px; letter-spacing: -.055em; }
.loading-screen > span { margin-top: 12px; font-size: 11px; letter-spacing: .03em; color: #98947a; }
.loading-line { width: 88px; height: 2px; overflow: hidden; margin-top: 31px; background: #c9c9ae50; }
.loading-line::after { content: ""; display: block; width: 40%; height: 100%; background: #9d9872; animation: waiting 1.6s ease-in-out infinite alternate; }
@keyframes waiting { from { transform: translateX(-70%); } to { transform: translateX(220%); } }

@media (min-width: 1600px) {
  .field-header { top: 45px; left: 52px; }
  .top-actions { top: 41px; right: 43px; }
  .discovery-note { top: 140px; right: 52px; }
  .side-actions { left: 50px; }
  .tool-dock { bottom: 26px; }
}

@media (max-width: 1100px) {
  .field-header { top: 25px; left: 25px; }
  h1 { font-size: 30px; }
  .chapter-number { display: none; }
  .top-actions { top: 19px; right: 19px; }
  .discovery-note { right: 26px; top: 96px; width: 182px; padding: 18px 16px 14px; }
  .discovery-note::before { left: 58px; }
  .note-eyebrow { font-size: 7px; }
  .discovery-note h2 { font-size: 17px; }
  .discovery-list li { font-size: 10px; gap: 7px; }
  .tool-dock { width: min(770px, calc(100% - 42px)); }
  .side-actions { left: 25px; }
}

@media (max-width: 760px) {
  .field-header { top: max(20px, env(safe-area-inset-top)); left: 21px; }
  .chapter-label { font-size: 8px; gap: 5px; max-width: calc(100vw - 240px); }
  #weather-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .weather-dot { width: 4px; height: 4px; }
  h1 { font-size: 27px; margin: 24px 0 4px; letter-spacing: -.075em; }
  .title-caption { font-size: 9px; letter-spacing: .09em; }
  .field-header-rule, .first-instruction { display: none; }
  .discovery-note { top: 132px; right: 17px; width: auto; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; transform: none; }
  .discovery-note::before, .discovery-note .note-eyebrow, .discovery-note h2, .discovery-list, .note-bottom > span:first-child { display: none; }
  .note-bottom { margin: 0; padding: 6px 10px; border: 1px solid #7781601a; border-radius: 20px; background: #f7f5e99e; }
  .coin-total { gap: 4px; font-size: 10px; }
  .coin-total svg { width: 14px; height: 14px; }
  .top-actions { top: max(13px, env(safe-area-inset-top)); right: 14px; gap: 0; }
  .utility-button.icon-only { width: 34px; height: 34px; }
  .utility-button svg { width: 17px; height: 17px; }
  .weather-picker summary { height: 36px; padding: 0 8px; gap: 5px; font-size: 10px; }
  .weather-picker summary > svg { width: 18px; height: 18px; }
  .weather-menu { padding: 12px; }
  .action-divider { margin: 0 4px; height: 14px; }
  .sound-off-mark { width: 20px; }
  .side-actions { left: auto; right: 17px; top: 90px; bottom: auto; flex-direction: row; gap: 7px; }
  .side-button { border-radius: 50%; width: 33px; height: 33px; padding: 8px; background: #f7f5e99e; }
  .side-button span { display: none; }
  #rotate-toggle { width: auto; padding: 8px 10px; border-radius: 18px; }
  #rotate-toggle span { display: inline; font-size: 10px; white-space: nowrap; }
  .side-button svg { width: 16px; height: 16px; }
  .tool-dock { width: calc(100% - 24px); bottom: max(11px, env(safe-area-inset-bottom)); }
  .tool-context { gap: 8px; padding: 0 8px 9px; align-items: flex-end; }
  .current-tool { display: grid; grid-template-columns: 5px minmax(0,1fr); gap: 4px 7px; }
  .current-tool-dot { align-self: center; }
  .tool-context:has(.material-context) { display: grid; grid-template-columns: 5px minmax(0,1fr) auto; gap: 6px 7px; align-items: center; }
  .tool-context .current-tool.material-context { display: contents; }
  .material-context #tool-hint { grid-column: 2; grid-row: 2; align-self: start; }
  .material-context.watering-context #tool-hint { grid-column: 2; }
  .material-context #tool-title { align-self: end; }
  .material-context .current-tool-dot { align-self: end; margin-bottom: 4px; }
  .tool-context:has(.material-context) .inventory-pair { grid-column: 3; grid-row: 1 / 3; align-self: center; }
  .material-context .material-options { grid-column: 1 / 3; grid-row: 3; }
  .material-context .water-options { grid-column: 3; grid-row: 3; justify-self: end; margin: 0; }
  .material-options { gap: 2px; padding: 3px; }
  .material-options button { min-width: 46px; min-height: 32px; padding: 3px 7px; gap: 4px; }
  #tool-title { font-size: 11px; }
  #tool-hint { grid-column: 2; font-size: 9px; line-height: 1.5; margin: 0; max-width: calc(100vw - 122px); }
  .water-options button { min-height: 32px; padding: 3px 9px; font-size: 10px; }
  .ant-options { gap: 4px; font-size: 9px; }
  #ant-clear { padding: 3px 6px; min-width: 36px; min-height: 32px; font-size: 9px; }
  .toolbox { border-radius: 18px; padding: 7px 7px 0; box-shadow: 0 4px 20px #4b4c3514; }
  .tools-scroll { gap: 4px; scroll-padding: 5px; }
  .tool-button { height: 76px; min-width: 65px; flex: 1 0 65px; gap: 4px; border-radius: 11px; }
  .tool-button svg { width: 36px; height: 36px; }
  .tool-button > span { font-size: 9px; }
  .tool-button > kbd { display: none; }
  .toolbox-bottom { height: 36px; margin: 7px 5px 0; gap: 7px; }
  .brush-control { gap: 6px; font-size: 8px; }
  .brush-control > span:first-child { margin-right: 1px; }
  #brush-size { width: 54px; }
  #brush-value { display: none; }
  .brush-dot.large { width: 6px; height: 6px; }
  .history-actions { gap: 12px; }
  .history-actions button { font-size: 8px; gap: 4px; }
  .history-actions svg { width: 12px; height: 12px; }
  .dock-footnote { margin: 8px 8px 0; font-size: 7px; }
  .dock-footnote .desktop-hint { display: none; }
  .dock-footnote .mobile-hint { display: inline; }
  .toast { bottom: 244px; font-size: 11px; padding: 10px 16px; }
  .playground:has(.material-context) .toast { bottom: 282px; }
  .flag-panel { top: 115px; left: 17px; right: auto; width: min(290px, calc(100% - 100px)); padding: 11px 13px; border-radius: 4px 4px 14px 4px; }
  .flag-panel h2, .flag-panel .flag-label { display: none; }
  .flag-panel > p { font-size: 10px; line-height: 1.55; }
  .flag-turn-line { margin-top: 7px; padding-top: 0; border-top: 0; }
  .flag-turn-line strong { font-size: 10px; }
  .flag-turn-line span { display: none; }
  .flag-panel-actions { margin-top: 8px; gap: 8px; }
  .flag-panel-actions .primary-button { min-height: 32px; padding: 7px 11px; font-size: 10px; }
  .flag-panel-actions .text-button { padding: 7px 5px; font-size: 10px; }
  .paper-dialog { padding: 32px 24px 24px; }
  .paper-dialog h2 { font-size: 23px; }
  .dialog-intro { font-size: 11px; }
  .help-steps > div { gap: 13px; }
  .help-shortcuts { gap: 10px; font-size: 9px; }
  .help-shortcuts > span:not(:last-child) { display: none; }
  .keyboard-help { display: none; }
}

@media (max-width: 390px) {
  .field-header { left: 17px; }
  h1 { font-size: 25px; }
  .top-actions { right: 10px; }
  .utility-button.icon-only { width: 30px; }
  .action-divider { margin: 0 2px; }
  .tool-dock { width: calc(100% - 18px); }
  .tool-button { min-width: 61px; flex-basis: 61px; }
  .history-actions { gap: 8px; }
  .brush-control { gap: 5px; }
  #brush-size { width: 44px; }
}

@media (max-height: 540px) and (orientation: landscape) {
  .field-header { top: max(13px, env(safe-area-inset-top)); left: max(20px, env(safe-area-inset-left)); }
  .chapter-label { font-size: 8px; }
  .chapter-number, .title-caption, .field-header-rule, .first-instruction, .discovery-note { display: none; }
  h1 { font-size: 22px; margin: 7px 0 0; }
  .top-actions { top: 12px; right: max(15px, env(safe-area-inset-right)); }
  .utility-button.icon-only { width: 31px; height: 31px; }
  .weather-picker summary { height: 33px; }
  .utility-button svg { width: 16px; height: 16px; }
  .side-actions { top: auto; left: 18px; right: auto; bottom: 128px; flex-direction: row; gap: 7px; }
  .side-button { width: 32px; height: 32px; border-radius: 50%; padding: 7px; }
  .side-button span { display: none; }
  .side-button svg { width: 16px; height: 16px; }
  .tool-dock { width: min(665px, calc(100% - 34px)); bottom: max(6px, env(safe-area-inset-bottom)); }
  .tool-context { padding: 0 12px 6px; }
  .current-tool { display: flex; gap: 6px; }
  .current-tool.watering-context { display: flex; gap: 7px; }
  .tool-context:has(.material-context) { display: flex; align-items: center; gap: 8px; }
  .tool-context .current-tool.material-context { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; }
  .material-context .current-tool-dot { align-self: center; margin: 0; }
  .material-context #tool-title { align-self: center; }
  .material-context #tool-hint { display: none; }
  .material-options { padding: 2px; gap: 2px; border-radius: 9px; }
  .material-options button { min-width: 39px; min-height: 28px; padding: 2px 6px; gap: 3px; font-size: 10px; border-radius: 6px; }
  .material-options button svg { width: 14px; height: 14px; }
  .playground:has(.material-context) .side-actions { bottom: 172px; }
  .watering-context #tool-hint { display: none; }
  .current-tool:has(.ant-options:not([hidden])) { display: flex; gap: 6px; }
  .current-tool:has(.ant-options:not([hidden])) #tool-hint { display: none; }
  .ant-options { gap: 6px; font-size: 9px; }
  #ant-status { white-space: nowrap; }
  #ant-clear { min-height: 28px; padding: 3px 7px; font-size: 9px; }
  .playground:has(.ant-options:not([hidden])) .side-actions { bottom: 172px; }
  .water-options { padding: 2px; }
  .water-options button { min-height: 28px; padding: 2px 10px; }
  #tool-title { font-size: 10px; }
  #tool-hint { font-size: 9px; max-width: none; }
  .toolbox { border-radius: 15px; padding: 5px 7px 0; }
  .tools-scroll { gap: 4px; }
  .tool-button { height: 56px; min-width: 58px; flex: 1 0 58px; gap: 1px; border-radius: 9px; }
  .tool-button svg { width: 29px; height: 29px; }
  .tool-button > span { font-size: 8px; }
  .tool-button > kbd { display: none; }
  .toolbox-bottom { height: 29px; margin-top: 4px; }
  .brush-control { font-size: 8px; }
  #brush-size { width: 70px; }
  .history-actions button { font-size: 8px; }
  .dock-footnote { display: none; }
  .toast { bottom: 168px; font-size: 10px; padding: 8px 14px; }
  .playground:has(.material-context) .toast { bottom: 168px; }
  .flag-panel { top: 75px; left: max(16px, env(safe-area-inset-left)); right: auto; transform: none; width: 190px; padding: 10px 12px; border-radius: 4px 4px 12px 4px; }
  .flag-panel .flag-label, .flag-panel h2 { display: none; }
  .flag-panel > p { font-size: 9px; line-height: 1.55; }
  .flag-turn-line { margin-top: 7px; padding-top: 0; border-top: 0; gap: 4px; }
  .flag-turn-line strong { font-size: 10px; }
  .flag-turn-line span { display: none; }
  .flag-panel-actions { margin-top: 7px; gap: 6px; }
  .flag-panel-actions .primary-button { min-height: 31px; font-size: 9px; padding: 7px 12px; }
  .flag-panel-actions .text-button { font-size: 9px; padding: 7px 4px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
