/* Rocket logic-puzzle kit: the shell shared by Rocket Kakuro and Rocket Bridges. Scoped to .lk; dark by default, .lk-light for the light theme. */
.lk { --bg: transparent; --panel: #0b1328; --panel2: #0f1a35; --cell: #0c1630; --line: #22345a; --line2: #1c2b4a; --text: #dfe9ff; --strong: #ffffff; --muted: #8aa3c4; --icon: #c9d7ef;
  --accent: #55d6ff; --accent-ink: #04121c; --warm: #ffd166; --warm-ink: #1a1200; --bad: #ff6b81; --good: #5ee6a8; --sel: #24588a; --sheet: #0d1630; --tip: #f4f7fb; --tip-ink: #0b1328; --cover: rgba(8,13,28,0.96);
  --lk-bs: min(100%, 560px);
  position: relative; max-width: 1040px; margin: 0 auto; padding: 4px 0 8px; color: var(--text); background: var(--bg);
  display: grid; gap: 10px; justify-content: center; align-content: start;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
.lk.lk-light, .lk-scrim.lk-light { --bg: #eef2f8; --panel: #ffffff; --panel2: #f4f7fc; --cell: #ffffff; --line: #c9d4e6; --line2: #dbe3f0; --text: #1b2a44; --strong: #0b1528; --muted: #5a6b88; --icon: #3b4c6b;
  --accent: #0a84c6; --accent-ink: #ffffff; --warm: #e0a100; --warm-ink: #1a1200; --bad: #d6334f; --good: #138a5a; --sel: #bfe3ff; --sheet: #ffffff; --tip: #13213f; --tip-ink: #f4f7fb; --cover: rgba(238,242,248,0.96); }
.lk.lk-light { border-radius: 14px; padding: 8px 8px 10px; }
.lk [hidden], .lk-scrim[hidden] { display: none !important; }
.lk button, .lk-scrim button { font-family: inherit; line-height: inherit; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.lk :focus-visible, .lk-scrim :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- layout: portrait stacks, landscape puts the panel beside the board ---------- */
.lk-port { grid-template-columns: var(--lk-bs); grid-template-areas: "head" "info" "board" "panel"; }
.lk-land { grid-template-columns: var(--lk-bs) var(--lk-pw, 320px); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "board head" "board info" "board panel"; column-gap: 18px; row-gap: 10px; }
.lk-head { grid-area: head; } .lk-info { grid-area: info; } .lk-boardwrap { grid-area: board; } .lk-panel { grid-area: panel; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.lk.lk-fit { max-width: none; height: 100%; margin: 0; padding: 6px 4px; align-content: center; overflow: hidden; border-radius: 0; }
.lk-fit.lk-port { gap: 8px; grid-template-rows: auto minmax(0, 1fr) auto auto auto minmax(0, 1fr); grid-template-areas: "head" "." "info" "board" "panel" "."; align-content: stretch; }

/* ---------- header ---------- */
.lk-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.lk-game { display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--strong); font-weight: 750; font-size: 15px; cursor: pointer; min-width: 0; transition: border-color .15s, background-color .15s; }
.lk-game-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lk-game svg { width: 18px; height: 18px; flex: none; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .lk-game:hover { border-color: var(--accent); } .lk-daily:hover { border-color: var(--warm); } }
.lk-daily { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--warm) 40%, transparent); background: color-mix(in srgb, var(--warm) 8%, transparent); color: var(--warm); font-weight: 700; font-size: 14px; cursor: pointer; flex: none; transition: border-color .15s, background-color .15s, color .15s; }
.lk-daily svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lk-daily[aria-pressed="true"] { background: var(--warm); color: var(--warm-ink); border-color: var(--warm); }
.lk-dot { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 2px var(--panel); }
.lk-icons { display: flex; gap: 2px; margin-left: auto; flex: none; }
.lk-ibtn { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--icon); cursor: pointer; transition: background-color .15s, color .15s; }
@media (hover: hover) { .lk-ibtn:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--strong); } }
.lk-ibtn:disabled { opacity: 0.3; cursor: default; }
.lk-ibtn svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lk-tighthead .lk-daily span { display: none; }
.lk-tighthead .lk-daily { width: 40px; padding: 0; justify-content: center; }

/* ---------- info row ---------- */
.lk-info { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 30px; font-size: 13.5px; color: var(--muted); padding: 0 2px; }
.lk-level { font-weight: 600; letter-spacing: 0.02em; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lk-status { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lk-clock { display: inline-flex; align-items: center; gap: 2px; flex: none; }
.lk-time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--strong); font-size: 15px; min-width: 3.2em; text-align: right; }
.lk-notimer .lk-time { visibility: hidden; }
.lk-pause { width: 40px; height: 40px; margin: -4px -4px -4px 0; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--icon); cursor: pointer; }
.lk-pause svg { width: 18px; height: 18px; fill: currentColor; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.lk-pause:disabled { opacity: 0.3; cursor: default; }
@media (hover: hover) { .lk-pause:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 9%, transparent); } }

/* ---------- board frame ---------- */
.lk-boardwrap { position: relative; width: var(--lk-bs); height: var(--lk-bs); }
.lk-zoomview { position: absolute; inset: 0; overflow: hidden; border-radius: 10px; touch-action: none; }
.lk-zoomview > * { transform-origin: 0 0; }
.lk-zoomed .lk-zoomview { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent); }
.lk-tool[data-lk="zoom"] svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lk-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 7; }
.lk-sweep::after { content: ''; position: absolute; inset: 0; z-index: 6; pointer-events: none; border-radius: 10px; background: linear-gradient(115deg, transparent 30%, rgba(255,240,190,0.55) 48%, rgba(255,255,255,0.0) 62%) no-repeat; background-size: 250% 100%; animation: lk-sweep 1.1s .1s ease-out both; }
.lk-won .lk-zoomview { box-shadow: 0 0 0 2px var(--warm), 0 0 40px rgba(255,209,102,0.3); }
.lk-cover { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; border-radius: 10px; background: var(--cover); text-align: center; animation: lk-fade .2s ease; }
.lk-cover > div { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.lk-cover b { font-size: 20px; color: var(--strong); }
.lk-loading { background: color-mix(in srgb, var(--cover) 88%, transparent); }
.lk-loading b { font-size: 15px; color: var(--muted); font-weight: 600; padding: 0 16px; }
.lk-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: lk-spin .8s linear infinite; }
.lk-tip { position: absolute; left: 8px; right: 8px; top: 8px; z-index: 9; background: var(--tip); color: var(--tip-ink); border-radius: 14px; padding: 10px 40px 11px 14px; font-size: 14px; line-height: 1.42; box-shadow: 0 10px 30px rgba(0,0,0,0.45); animation: lk-tip .26s cubic-bezier(.2,.8,.2,1); max-height: 46%; overflow: auto; }
.lk-tip.low { top: auto; bottom: 8px; }
.lk-tip b { display: block; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: #b07c00; margin-bottom: 2px; }
.lk-light .lk-tip b { color: var(--warm); }
.lk-tip-x { position: absolute; top: 6px; right: 6px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: inherit; opacity: 0.6; cursor: pointer; }
.lk-tip-x svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.lk-toast { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -6px); background: var(--tip); color: var(--tip-ink); font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; pointer-events: none; opacity: 0; z-index: 10; max-width: 92%; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
.lk-toast.show { animation: lk-toast 1.9s ease forwards; }

/* ---------- tool row ---------- */
.lk-tools { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; }
.lk-tool { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; border: 0; border-radius: 12px; background: transparent; color: var(--icon); font-size: 12px; font-weight: 650; cursor: pointer; transition: background-color .15s, color .15s, opacity .15s, transform .1s; }
.lk-tool svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) { .lk-tool:hover:not(:disabled) { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--strong); } }
.lk-tool:active:not(:disabled) { transform: scale(0.95); }
.lk-tool:disabled { opacity: 0.32; cursor: default; }
.lk-tool[aria-pressed="true"] { color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.lk-flag { position: absolute; top: 3px; left: calc(50% + 8px); font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; padding: 1px 5px; border-radius: 6px; background: var(--line); color: var(--muted); }
.lk-tool[aria-pressed="true"] .lk-flag { background: var(--accent); color: var(--accent-ink); }
.lk-tool.lk-hint { color: var(--warm); }
.lk-count { position: absolute; top: 3px; left: calc(50% + 7px); min-width: 17px; height: 17px; padding: 0 4px; box-sizing: border-box; border-radius: 9px; background: var(--warm); color: var(--warm-ink); font-size: 11px; font-weight: 800; line-height: 17px; text-align: center; font-variant-numeric: tabular-nums; }
.lk-tool:disabled .lk-count { background: var(--line); color: var(--muted); }
.lk-is-paused .lk-panel, .lk-busy .lk-panel { opacity: 0.4; pointer-events: none; }

/* ---------- buttons ---------- */
.lk-btn { min-height: 46px; min-width: 104px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--text); font-weight: 700; font-size: 14.5px; cursor: pointer; transition: background-color .15s, border-color .15s, transform .12s; }
@media (hover: hover) { .lk-btn:hover:not(:disabled) { border-color: var(--muted); background: color-mix(in srgb, var(--text) 4%, transparent); } }
.lk-btn:active:not(:disabled) { transform: scale(0.97); }
.lk-btn-primary { background: var(--warm); color: var(--warm-ink); border-color: var(--warm); }
@media (hover: hover) { .lk-btn-primary:hover:not(:disabled) { background: #ffe08a; border-color: #ffe08a; } }

/* ---------- sheets ---------- */
.lk-scrim { position: fixed; inset: 0; z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(2,4,10,0.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: lk-fade .2s ease; user-select: none; -webkit-user-select: none; }
.lk-scrim.lk-light { background: rgba(20,30,50,0.4); }
.lk-scrim.out { animation: lk-fade .17s ease reverse forwards; }
.lk-sheet { position: relative; width: 100%; max-width: 460px; max-height: min(88vh, 780px); overflow: auto; overscroll-behavior: contain; background: var(--sheet); border: 1px solid var(--line); border-radius: 20px; padding: 22px 22px 20px; box-sizing: border-box; box-shadow: 0 30px 80px rgba(0,0,0,0.5); color: var(--text); animation: lk-sheet .28s cubic-bezier(.2,.8,.2,1); }
.lk-scrim.out .lk-sheet { animation: lk-sheet .17s ease reverse forwards; }
.lk-sheet:focus { outline: none; }
.lk-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--text) 9%, transparent); color: var(--icon); cursor: pointer; }
.lk-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
@media (hover: hover) { .lk-x:hover { background: color-mix(in srgb, var(--text) 15%, transparent); color: var(--strong); } }
.lk-sheet-title { margin: 0 44px 6px 0; font-size: 22px; font-weight: 800; color: var(--strong); letter-spacing: -0.01em; }
.lk-sheet-title.lk-center { margin: 4px 0 0; }
.lk-center { text-align: center; }
.lk-sub { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }
.lk-h4 { margin: 18px 0 8px; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 750; }
.lk-fine { margin: 14px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.lk-sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.lk-sheet-actions .lk-btn { flex: 1 1 0; min-width: 0; }
.lk-sheet-actions .lk-btn-primary { flex-basis: 100%; }
.lk-sheet-help > .lk-sheet-actions:last-child { position: sticky; bottom: -20px; margin: 14px -22px -20px; padding: 12px 22px 16px; background: linear-gradient(to bottom, transparent, var(--sheet) 22%); }

.lk-card { display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 0; padding: 12px 14px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--warm) 40%, transparent); background: color-mix(in srgb, var(--warm) 7%, transparent); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
.lk-card-cont { border-color: var(--line); background: var(--panel); }
@media (hover: hover) { .lk-card:hover { border-color: var(--warm); } .lk-card-cont:hover { border-color: var(--accent); } }
.lk-card.cur { box-shadow: inset 0 0 0 1px var(--warm); }
.lk-card-icon { width: 38px; height: 38px; border-radius: 10px; background: var(--warm); display: grid; place-items: center; flex: none; }
.lk-card-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--warm-ink); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lk-card-text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.lk-card-text b { font-size: 15.5px; color: var(--strong); } .lk-card-text small { font-size: 12.5px; color: var(--muted); }
.lk-card-state { font-size: 12.5px; font-weight: 700; color: var(--muted); text-align: right; flex: none; max-width: 40%; }
.lk-card-state.ok { color: var(--good); }
.lk-linkbtn { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 6px 4px; border: 0; background: transparent; color: var(--accent); font-weight: 650; font-size: 13.5px; cursor: pointer; }
.lk-linkbtn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.lk-levels { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lk-lv { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; padding: 11px 13px; min-height: 88px; border-radius: 14px; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s; }
@media (hover: hover) { .lk-lv:hover, .lk-sz:hover { border-color: var(--accent); } }
.lk-lv.cur, .lk-sz.cur { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel)); box-shadow: inset 0 0 0 1px var(--accent); }
.lk-lv b { font-size: 16px; color: var(--strong); }
.lk-lv small { font-size: 12px; color: var(--muted); line-height: 1.35; }
.lk-lv em { font-style: normal; font-size: 11.5px; color: var(--warm); font-weight: 650; margin-top: auto; }
.lk-pips { display: inline-flex; gap: 3px; margin-bottom: 2px; }
.lk-pips i { width: 14px; height: 4px; border-radius: 2px; background: var(--line); }
.lk-pips i.on { background: var(--accent); }
.lk-sizes { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.lk-sz { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 52px; padding: 6px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); cursor: pointer; transition: border-color .15s, background-color .15s; }
.lk-sz b { font-size: 15px; color: var(--strong); font-variant-numeric: tabular-nums; }
.lk-sz small { font-size: 10.5px; color: var(--muted); min-height: 1.2em; font-variant-numeric: tabular-nums; }
.lk-sz.ranked small { color: var(--warm); }

.lk-res-badge { width: 72px; height: 72px; margin: 2px auto 6px; }
.lk-res-badge svg { width: 100%; height: 100%; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.lk-res-badge .ring { stroke: var(--warm); stroke-width: 4; stroke-dasharray: 176 176; animation: lk-ring .6s ease-out both; }
.lk-res-badge .tick { stroke: var(--strong); stroke-width: 5; stroke-dasharray: 40 40; animation: lk-tick .35s .4s ease-out both; }
.lk-dodged .lk-res-badge { display: none; }
.lk-dodged .lk-res-time { font-size: 34px; }
.lk-res-time { margin: 2px 0 2px; text-align: center; font-size: 44px; font-weight: 800; color: var(--strong); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.lk-res-stats { display: flex; justify-content: center; gap: 8px; margin: 14px 0 0; }
.lk-res-stats > div { flex: 1 1 0; min-width: 0; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 6px; text-align: center; }
.lk-res-stats b { display: block; font-size: 19px; color: var(--strong); font-variant-numeric: tabular-nums; }
.lk-res-stats span { font-size: 11.5px; color: var(--muted); }
.lk-lb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.lk-lb-list li { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; background: var(--panel); font-size: 14px; }
.lk-lb-list li.me { box-shadow: inset 0 0 0 1px var(--warm); }
.lk-lb-list span { width: 1.6em; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }
.lk-lb-list b { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--strong); font-weight: 650; }
.lk-lb-list em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.lk-lb-all { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 650; color: var(--accent); }
.lk-table-wrap { overflow-x: auto; margin-top: 14px; }
.lk-table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.lk-table th, .lk-table td { padding: 9px 6px; text-align: right; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.lk-table th:first-child { text-align: left; color: var(--strong); }
.lk-table thead th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.lk-table small { color: var(--muted); }
.lk-table-best td, .lk-table-best th { padding: 8px 4px; font-size: 13px; }
.lk-table td.rk { color: var(--warm); font-weight: 700; }
.lk-help { margin: 0; padding: 0 0 0 18px; display: grid; gap: 8px; font-size: 14.5px; line-height: 1.45; }
.lk-help b { color: var(--strong); }
.lk-help-art { display: block; width: 100%; max-width: 300px; height: auto; margin: 6px auto 12px; }
.lk-keys { margin: 12px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.6; }
.lk-keys kbd { display: inline-block; min-width: 1.4em; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font-family: inherit; font-size: 12px; text-align: center; }
.lk-set { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line2); cursor: pointer; position: relative; }
.lk-set > span:first-child { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; }
.lk-set b { font-size: 15px; color: var(--strong); } .lk-set small { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.lk-set input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.lk-sw { flex: none; width: 46px; height: 28px; border-radius: 14px; background: var(--line); position: relative; transition: background-color .15s; }
.lk-sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,0.3); }
.lk-set input:checked + .lk-sw { background: #2ec27e; }
.lk-set input:checked + .lk-sw::after { left: 21px; }
.lk-set input:focus-visible + .lk-sw { outline: 2px solid var(--accent); outline-offset: 2px; }
.lk-set-theme { cursor: default; }
.lk-seg { display: inline-flex; flex: none; border: 1px solid var(--line); border-radius: 999px; padding: 2px; }
.lk-seg button { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; padding: 6px 11px; border-radius: 999px; cursor: pointer; }
.lk-seg button[aria-checked="true"] { background: var(--accent); color: var(--accent-ink); }

.lk-cal-head { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; }
.lk-cal-head b { font-size: 16px; color: var(--strong); }
.lk-cal-head small { color: var(--muted); font-size: 12.5px; margin-right: auto; }
.lk-cal-head .lk-ibtn:first-child { margin-left: -8px; }
.lk-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.lk-cal-w { text-align: center; font-size: 11px; font-weight: 700; color: var(--muted); padding: 2px 0; }
.lk-cal-d { position: relative; aspect-ratio: 1; min-height: 36px; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; cursor: pointer; padding: 0; }
.lk-cal-d.off { opacity: 0.35; cursor: default; background: transparent; }
.lk-cal-d.today { border-color: var(--warm); box-shadow: inset 0 0 0 1px var(--warm); }
.lk-cal-d.ok { background: color-mix(in srgb, var(--good) 22%, var(--panel)); border-color: color-mix(in srgb, var(--good) 60%, transparent); color: var(--strong); }
.lk-cal-d.ok::after { content: '✓'; position: absolute; top: 1px; right: 4px; font-size: 10px; color: var(--good); }
.lk-cal-d.prog::after { content: ''; position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lk-cal-lv { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: calc(var(--l) * 4px + 2px); height: 3px; border-radius: 2px; background: color-mix(in srgb, var(--accent) 70%, transparent); }
@media (hover: hover) { .lk-cal-d:not(.off):hover { border-color: var(--accent); } }

@keyframes lk-fade { from { opacity: 0; } }
@keyframes lk-sheet { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
@keyframes lk-up { from { transform: translateY(100%); } }
@keyframes lk-spin { to { transform: rotate(360deg); } }
@keyframes lk-tip { from { opacity: 0; transform: translateY(-6px); } }
@keyframes lk-toast { 0% { opacity: 0; transform: translate(-50%, -6px); } 12%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -4px); } }
@keyframes lk-ring { from { stroke-dashoffset: 176; } }
@keyframes lk-tick { from { stroke-dashoffset: 40; } }
@keyframes lk-sweep { from { background-position: 120% 0; opacity: 1; } to { background-position: -60% 0; opacity: 0.2; } }
@media (prefers-reduced-motion: reduce) { .lk *, .lk-scrim, .lk-sheet, .lk-sweep::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }

/* ---------- small screens ---------- */
@media (max-width: 520px) {
  .lk-scrim { align-items: flex-end; padding: 0; }
  .lk-sheet { max-width: none; border-radius: 22px 22px 0 0; max-height: 90vh; padding: 20px 18px calc(18px + env(safe-area-inset-bottom, 0px)); animation-name: lk-up; border-bottom: 0; }
  .lk-scrim.out .lk-sheet { animation-name: lk-up; }
  .lk-sheet-help > .lk-sheet-actions:last-child { margin: 14px -18px calc(-18px - env(safe-area-inset-bottom, 0px)); padding: 12px 18px calc(16px + env(safe-area-inset-bottom, 0px)); bottom: calc(-18px - env(safe-area-inset-bottom, 0px)); }
  .lk-daily span { display: none; }
  .lk-daily { width: 40px; padding: 0; justify-content: center; }
  .lk-sizes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 360px) { .lk-icons { gap: 0; } .lk-levels { grid-template-columns: 1fr; } .lk-info { font-size: 12.5px; } }
@media (max-height: 500px) {
  .lk-land { row-gap: 6px; }
  .lk-land .lk-tool { min-height: 44px; font-size: 11px; }
  .lk-land .lk-tool svg { width: 21px; height: 21px; }
  .lk-sheet { max-height: 94vh; }
}
