@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');
:root{--bg:#f6f5ef;--paper:#fffefa;--ink:#293c32;--muted:#858a7f;--line:#e4e5da;--green:#345842;--pale:#eaf0e4;--accent:#d6e5bf;--red:#b75748;font-family:'DM Sans','Noto Sans KR',sans-serif;color:var(--ink);background:var(--bg);font-synthesis:none}
*{box-sizing:border-box}body{margin:0}button,a{-webkit-tap-highlight-color:transparent}button{font:inherit;cursor:pointer;color:inherit;border:0;background:none}button:disabled{cursor:default;opacity:.35}button:focus-visible,a:focus-visible{outline:3px solid #8ca575;outline-offset:4px}a{color:inherit;text-decoration:none}button{transition:background .15s,color .15s,transform .15s}button:hover:not(:disabled){filter:brightness(.94)}[hidden]{display:none!important}.site-header{height:92px;max-width:1400px;margin:auto;padding:0 54px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line)}.brand{display:flex;align-items:center;font-size:26px;font-weight:700;letter-spacing:-1.2px}.brand-dot{color:#80955c}.brand-icon{font-size:31px;margin-right:11px;font-weight:400}.header-right{display:flex;gap:30px;align-items:center}.quiet-label{font-size:10px;letter-spacing:1.9px;color:var(--muted)}.round-button{border:1px solid #cdd0c3;border-radius:50%;width:29px;height:29px;font-size:14px}main{max-width:1320px;margin:auto;padding:0 34px}.intro{text-align:center;padding:52px 0 43px}.eyebrow{font-size:10px;letter-spacing:2.1px;font-weight:600;color:#738164}.intro .eyebrow{display:flex;gap:9px;justify-content:center;align-items:center}.eyebrow>span{width:5px;height:5px;border-radius:50%;background:#92a274}h1{font-size:38px;letter-spacing:-1.9px;font-weight:600;margin:16px 0 12px;line-height:1.5}.intro>p{font-size:13px;color:var(--muted);margin:0;letter-spacing:-.2px}.mobile-break{display:none}.workspace{display:grid;grid-template-columns:232px minmax(360px,580px) 232px;gap:38px;justify-content:center;align-items:start}.settings,.guide{padding-top:14px}.section-label{font-size:10px;letter-spacing:1.8px;display:flex;justify-content:space-between;color:#7d8474;border-bottom:1px solid #dcdfd1;padding-bottom:17px;margin-bottom:23px}.section-label>span{color:#acb19f;font-size:10px}.mode-switch{display:flex;background:#eaece2;padding:4px;border-radius:8px;margin-bottom:29px}.mode-switch button{flex:1;font-size:12px;padding:10px 0;border-radius:5px;color:#848a7a}.mode-switch button[aria-pressed=true]{background:var(--paper);box-shadow:0 1px 4px #2837220b;color:var(--ink);font-weight:600}.field{margin-bottom:25px}.field>label{font-size:12px;font-weight:600;display:flex;justify-content:space-between;align-items:center;margin-bottom:11px}.field>label>span{font-size:8px;letter-spacing:1.4px;color:#949987;font-weight:400}.segments{display:flex;gap:7px}.segments button{border:1px solid #dfe1d4;border-radius:6px;flex:1;font-size:12px;padding:10px 0;color:#7a8271}.segments button[aria-pressed=true]{background:var(--pale);border-color:#718563;color:var(--green);font-weight:600}.field-note{font-size:10px;color:#929685;margin-top:10px;line-height:1.7}.primary-button{background:var(--green);color:#fff;border-radius:7px;padding:15px 20px;font-size:12px;font-weight:500;display:flex;align-items:center;justify-content:space-between;gap:22px}.settings>.primary-button{width:100%;margin-top:29px}.primary-button>span{font-size:18px}.daily-note{display:flex;gap:12px;margin-top:22px;padding-bottom:24px;border-bottom:1px solid var(--line)}.sun{font-size:24px;color:#9b9d6b;line-height:1.1}.daily-note strong{font-size:11px;font-weight:500}.daily-note p{font-size:10px;color:#949989;line-height:1.8;margin:5px 0 0}.personal-best{padding-top:24px}.personal-best>span{font-size:11px;color:#808773}.personal-best strong{display:block;font-size:29px;font-weight:500;margin:8px 0}.personal-best small{font-size:10px;color:#9a9f90;font-weight:400}.personal-best p{font-size:9px;color:#a0a494}.game-card{background:var(--paper);border:1px solid #e0e3d7;border-radius:14px;box-shadow:0 6px 26px #323a2010;overflow:hidden}.game-top{display:flex;justify-content:space-between;align-items:center;padding:24px 27px 0}.puzzle-tag{font-size:8px;letter-spacing:1.3px;background:var(--pale);color:#657b51;border-radius:4px;padding:5px 7px}h2{font-size:18px;font-weight:600;letter-spacing:-.6px}.game-top h2{font-size:17px;margin:12px 0 6px}.game-top p{font-size:10px;color:#959b89;margin:0}.timer-wrap{text-align:right;align-self:flex-start;padding-top:6px}.timer-wrap>span{font-size:8px;letter-spacing:1.5px;color:#9aa18e}.timer-wrap>div{display:flex;align-items:center;gap:7px;margin-top:9px;font-size:20px;font-variant-numeric:tabular-nums}.timer-wrap>div>span{font-size:19px;color:#8d9784}.timer-wrap button{font-size:12px;margin-left:5px;padding:4px;color:#909b84}.board-area{position:relative;padding:24px 36px 14px;min-height:300px;display:grid;place-items:center}#board{width:100%;max-width:440px;aspect-ratio:1;position:relative;user-select:none;touch-action:manipulation}.grid-dot{position:absolute;width:6px;height:6px;background:#69735e;border-radius:50%;transform:translate(-50%,-50%);pointer-events:none;z-index:2}.clue{position:absolute;transform:translate(-50%,-50%);font-size:clamp(17px,2.3vw,25px);font-weight:500;color:#48533e;pointer-events:none;font-variant-numeric:tabular-nums;transition:color .15s}.clue.met{color:#9aaa8a}.clue.bad{color:var(--red);font-weight:700}.edge{position:absolute;padding:0;border-radius:4px;display:flex;align-items:center;justify-content:center;z-index:1;touch-action:manipulation}.edge.horizontal{height:24px;transform:translateY(-50%)}.edge.vertical{width:24px;transform:translateX(-50%)}.edge::before{content:'';position:absolute;background:#e4e7dd;border-radius:3px}.edge.horizontal::before{height:1px;width:100%}.edge.vertical::before{width:1px;height:100%}.edge:hover::before{background:#a4b596}.edge.on::before{background:var(--green)}.edge.horizontal.on::before{height:4px}.edge.vertical.on::before{width:4px}.edge.cross::before{background:transparent}.edge.cross::after{content:'×';font-size:16px;line-height:1;color:#b5b9ad}.edge.highlight{background:#d7e6bf9e}.grid-dot.bad{background:var(--red);box-shadow:0 0 0 4px #b7574822}.board-status{padding:9px 27px 17px;display:flex;justify-content:space-between;font-size:10px;color:#959b8a;gap:10px}.board-status b{color:#647d52;font-weight:500}.board-status>span:first-child{color:#718264}.board-status.error>span:first-child{color:var(--red)}.game-toolbar{border-top:1px solid #eceee5;padding:13px 18px;display:flex;justify-content:space-between}.game-toolbar>div{display:flex;gap:4px}.tool-button{padding:8px 10px;font-size:11px;border-radius:5px;color:#7e8872}.tool-button:hover{background:#eff1e9}.tool-button>span{font-size:17px;vertical-align:-1px;margin-right:4px}.hint-button{color:#577545;background:#f0f4e8}.guide h2{font-size:23px;line-height:1.6;margin:0 0 24px;font-weight:500;letter-spacing:-1px}.rule{display:flex;gap:11px;margin-bottom:21px}.rule-number{border:1px solid #ced6c0;width:20px;height:20px;flex-shrink:0;display:grid;place-items:center;border-radius:50%;font-size:9px;color:#85916e;margin-top:1px}.rule h3{font-size:12px;font-weight:500;margin:0 0 8px}.rule p{font-size:11px;line-height:1.9;color:#8a917e;margin:0;letter-spacing:-.3px}.mini-example{display:flex;align-items:center;gap:16px;margin:-4px 0 24px 31px}.mini-example>span{font-size:9px;color:#919984}.example-cell{height:39px;width:39px;border:3px solid #688254;border-right:1px dashed #c9d0bd;display:grid;place-items:center;position:relative;font-size:18px}.example-cell::before,.example-cell::after,.example-cell i::before,.example-cell i::after{content:'';position:absolute;width:5px;height:5px;background:#60754c;border-radius:50%}.example-cell::before{left:-4px;top:-4px}.example-cell::after{left:-4px;bottom:-4px}.example-cell i::before{right:-3px;top:-4px}.example-cell i::after{right:-3px;bottom:-4px}.tip{background:#eceee3;padding:15px 18px;border-radius:7px;margin-top:26px}.tip>span{font-size:9px;color:#869371}.tip p{font-size:11px;line-height:1.9;color:#7c886b;margin:7px 0 0}.controls-note{margin-top:22px;display:grid;gap:10px}.controls-note>div{display:flex;gap:10px;align-items:center;font-size:9px;color:#919783}kbd{font:inherit;border:1px solid #dbdfcf;border-radius:3px;padding:3px 5px;min-width:48px;text-align:center;font-size:8px}.under-board{display:flex;flex-direction:column;align-items:center;gap:13px;margin:22px 0 39px}.drawing-tools{display:flex;gap:4px;border:1px solid #dce0d1;border-radius:30px;padding:4px;background:#eeefe7}.drawing-tools button{border-radius:24px;padding:8px 19px;font-size:16px;color:#9ca28e}.drawing-tools button span{font-size:10px;margin-left:6px;vertical-align:1px}.drawing-tools button[aria-pressed=true]{background:var(--paper);color:var(--green);box-shadow:0 1px 3px #273b1910}.under-board>p{font-size:9px;color:#9da390;margin:0;display:flex;align-items:center;gap:7px}.save-dot{width:4px;height:4px;background:#94a77a;border-radius:50%}footer{border-top:1px solid var(--line);max-width:1292px;margin:auto;padding:24px 0 28px;display:flex;align-items:center;justify-content:space-between}footer>span{font-size:15px;font-weight:600;letter-spacing:-.5px}.footer-by{font-size:9px;font-weight:400;color:#9ba08f;margin-left:8px;letter-spacing:0}footer>p,footer>a{font-size:10px;color:#939b87}#pause-cover{position:absolute;inset:12px;background:#fffefaee;backdrop-filter:blur(7px);z-index:4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:25px;border-radius:12px}#pause-cover>span{font-size:24px;letter-spacing:-1px}#loading{position:absolute;color:#8b957b;font-size:13px}dialog{color:var(--ink);background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:38px;max-width:480px;width:calc(100% - 32px);box-shadow:0 20px 80px #15200d26}dialog::backdrop{background:#24301e55;backdrop-filter:blur(4px)}dialog h2{font-size:24px;margin-top:18px;line-height:1.5}dialog p{font-size:13px;line-height:1.9;color:#818976}dialog .primary-button{margin-top:25px;width:100%}.dialog-close{position:absolute;top:12px;right:16px;font-size:24px;color:#879279}.dialog-actions{display:flex;gap:12px;align-items:center}.dialog-actions .primary-button{margin:10px 0 0;justify-content:center}.win-icon{font-size:60px;color:#7e9762;margin-bottom:14px}#win-dialog{text-align:center}#win-detail{background:var(--pale);padding:15px;border-radius:8px;font-size:13px;color:#60784d;margin:20px 0}.board-area:has(.solved){background:linear-gradient(0deg,#f2f6ea66,transparent)}
@media(min-width:1450px){.intro{padding-top:62px;padding-bottom:49px}.workspace{gap:46px}main{max-width:1360px}.board-area{padding-top:29px;padding-bottom:21px}.game-top{padding-top:28px}}
@media(max-width:1150px){.workspace{grid-template-columns:195px minmax(330px,540px);gap:28px}.guide{display:none}main{max-width:890px}footer{margin:0 34px}.intro{padding-top:37px}.under-board{margin-left:223px}.quiet-label{display:none}}
@media(max-width:650px){.site-header{height:70px;padding:0 22px}.brand{font-size:23px}.brand-icon{font-size:27px}.intro{padding:32px 0 28px}main{padding:0 16px}.intro .eyebrow{font-size:8px;letter-spacing:1.5px}h1{font-size:29px;letter-spacing:-1.5px;margin:14px 0 10px}.intro>p{font-size:10px}.workspace{display:flex;flex-direction:column;gap:18px}.settings{width:100%;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:14px}.settings>.section-label,.daily-note,.personal-best,.field-note,.field>label>span{display:none}.mode-switch{grid-column:1/-1;margin:0}.mode-switch button{padding:9px 0}.field{margin:0}.field>label{font-size:10px;margin:0 0 8px}.segments{gap:5px}.segments button{font-size:11px;padding:10px 0}.settings>.primary-button{grid-column:1/-1;margin:0;padding:11px 16px}.game-card{width:100%;border-radius:11px}.game-top{padding:20px 20px 0}.game-top h2{font-size:16px}.board-area{padding:24px 30px 15px;min-height:260px}.clue{font-size:23px}.board-status{padding:8px 20px 14px;font-size:9px}.game-toolbar{padding:10px 12px}.tool-button{font-size:10px;padding:7px 9px}.under-board{margin:19px 0 29px;gap:12px}footer{margin:0 20px;padding:20px 0}footer>p{display:none}dialog{padding:29px}.edge.horizontal{height:24px}.edge.vertical{width:24px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important}}

/* Theme controls and the dark palette. Keep the original light palette intact. */
:root { color-scheme: light; }
.header-actions { display: flex; gap: 12px; align-items: center; }
#theme-toggle { display: grid; place-items: center; font-size: 19px; }
#theme-toggle:hover { background: var(--pale); }
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #171e1b;
  --paper: #202a24;
  --ink: #e1e9db;
  --muted: #a1af9e;
  --line: #354238;
  --green: #a6c78e;
  --pale: #303f32;
  --accent: #bfd7a2;
  --red: #f09886;
}
:root[data-theme="dark"] .round-button,
:root[data-theme="dark"] .segments button,
:root[data-theme="dark"] .rule-number,
:root[data-theme="dark"] kbd,
:root[data-theme="dark"] .drawing-tools,
:root[data-theme="dark"] .game-card { border-color: var(--line); }
:root[data-theme="dark"] .section-label { border-color: var(--line); color: #a9b99d; }
:root[data-theme="dark"] .eyebrow,
:root[data-theme="dark"] .brand-dot,
:root[data-theme="dark"] .sun,
:root[data-theme="dark"] .win-icon { color: #b2c88e; }
:root[data-theme="dark"] :is(.section-label>span,.field>label>span,.field-note,.daily-note p,.personal-best>span,.personal-best small,.personal-best p,.game-top p,.timer-wrap>span,.timer-wrap>div>span,.timer-wrap button,.rule p,.mini-example>span,.controls-note,.under-board>p,.footer-by,footer>p,footer>a,.dialog-close,dialog p,#loading) { color: var(--muted); }
:root[data-theme="dark"] :is(.mode-switch,.drawing-tools,.tip) { background: #26322a; }
:root[data-theme="dark"] :is(.mode-switch button,.segments button,.tool-button,.drawing-tools button) { color: #afbea7; }
:root[data-theme="dark"] .mode-switch button[aria-pressed="true"] { color: var(--ink); }
:root[data-theme="dark"] .segments button[aria-pressed="true"] { color: var(--green); border-color: #8ba875; }
:root[data-theme="dark"] .primary-button { color: #19251b; }
:root[data-theme="dark"] .game-card { box-shadow: 0 6px 26px #0003; }
:root[data-theme="dark"] :is(.puzzle-tag,.tip>span,.tip p,.board-status b,.board-status>span:first-child,#win-detail) { color: #b3ce9d; }
:root[data-theme="dark"] .grid-dot { background: #b8c6ab; }
:root[data-theme="dark"] .clue { color: #e0e8d6; }
:root[data-theme="dark"] .clue.met { color: #92aa81; }
:root[data-theme="dark"] .edge::before { background: #3e4c40; }
:root[data-theme="dark"] .edge:hover::before { background: #7b946c; }
:root[data-theme="dark"] .edge.on::before { background: var(--green); }
:root[data-theme="dark"] .edge.cross::before { background: transparent; }
:root[data-theme="dark"] .edge.cross::after { color: #93a28a; }
:root[data-theme="dark"] .edge.highlight { background: #9cbd6b36; }
:root[data-theme="dark"] :is(.clue.bad,.board-status.error>span:first-child) { color: var(--red); }
:root[data-theme="dark"] .grid-dot.bad { background: var(--red); }
:root[data-theme="dark"] .board-status { color: var(--muted); }
:root[data-theme="dark"] .game-toolbar { border-color: var(--line); }
:root[data-theme="dark"] :is(.tool-button:hover,.hint-button) { background: var(--pale); }
:root[data-theme="dark"] .hint-button { color: var(--green); }
:root[data-theme="dark"] .rule-number { color: #b5c49f; }
:root[data-theme="dark"] .example-cell { border-color: #a6c78e; border-right-color: #5e7151; }
:root[data-theme="dark"] :is(.example-cell::before,.example-cell::after,.example-cell i::before,.example-cell i::after) { background: #a6c78e; }
:root[data-theme="dark"] .drawing-tools button[aria-pressed="true"] { color: var(--green); }
:root[data-theme="dark"] #pause-cover { background: #202a24ee; }
:root[data-theme="dark"] dialog::backdrop { background: #080e0bc2; }
:root[data-theme="dark"] .board-area:has(.solved) { background: linear-gradient(0deg,#a6c78e0c,transparent); }
.edge:disabled { opacity: 1; }
