@font-face {
  font-family: Pretendard;
  src: url('./assets/PretendardVariable.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #ffffff;
  --rail: #f5f6f8;
  --raised: #f4f6f8;
  --text: #262a30;
  --ink: #15181c;
  --muted: #626b78;
  --line: #e1e4e8;
  --line-strong: #cbd0d6;
  --soft: #f0f1f3;
  --selected: #f0f3f7;
  --accent: #976022;
  --accent-soft: #f4eadb;
  --positive: #21704d;
  --danger: #ad4545;
  --chart-line: #64748b;
  --chart-grid: #e4e6e9;
  --chart-threshold: #858b94;
  --chart-band: #f8f4ee;
  --focus: #91602b;
  font-family: Pretendard, sans-serif;
  background: var(--paper);
  color: var(--text);
  font-synthesis: none;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #191c21;
  --surface: #191c21;
  --rail: #13161b;
  --raised: #22272f;
  --text: #d6d9de;
  --ink: #f0f1f3;
  --muted: #9ba2ae;
  --line: #303640;
  --line-strong: #454f5c;
  --soft: #24272d;
  --selected: #252c36;
  --accent: #d4ad70;
  --accent-soft: #30291e;
  --positive: #7bc4a0;
  --danger: #e59292;
  --chart-line: #8b95a7;
  --chart-grid: #30343c;
  --chart-threshold: #8993a0;
  --chart-band: #2a2721;
  --focus: #d4ad70;
}
* { box-sizing: border-box; }
html { scrollbar-color: var(--line-strong) var(--paper); }
body { margin: 0; display: grid; grid-template-columns: 184px minmax(0, 1fr); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, input, select, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
button, input, select, textarea, a { outline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); }
::selection { background: var(--accent-soft); color: var(--ink); }
[hidden] { display: none !important; }
svg { vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 26px; font-weight: 720; letter-spacing: -.03em; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 650; letter-spacing: -.015em; }
h3 { font-size: 14px; font-weight: 600; }
small, .small { font-size: 12px; }
.num, input[type="number"], time, .clock, .history-values dd, .history-stats strong { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
label { font-size: 13px; font-weight: 500; }
input, select, textarea { border: 1px solid var(--line-strong); background: var(--paper); border-radius: 6px; padding: 9px 11px; width: 100%; min-width: 0; min-height: 40px; caret-color: var(--accent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; line-height: 1.7; min-height: 235px; }
summary { cursor: pointer; font-size: 12px; color: var(--muted); }
details[open] > summary { margin-bottom: 12px; }
.skip-link { position: fixed; top: 12px; left: 16px; z-index: 20; background: var(--ink); color: var(--paper); width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { width: auto; height: auto; padding: 10px; clip-path: none; }
.site-header { grid-column: 1; grid-row: 1 / 3; height: 100dvh; position: sticky; top: 0; background: var(--rail); border-right: 1px solid var(--line); padding: 32px 16px 20px; display: flex; flex-direction: column; gap: 26px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 760; color: var(--ink); font-size: 20px; letter-spacing: -.035em; padding: 0 8px; white-space: nowrap; }
.brand img { image-rendering: pixelated; }
.main-nav { display: grid; gap: 4px; }
.main-nav a { padding: 11px 12px; color: var(--muted); font-size: 13px; border-radius: 6px; font-weight: 550; white-space: nowrap; display: flex; align-items: center; gap: 9px; }
.main-nav a:hover { background: var(--soft); color: var(--text); }
.main-nav a[aria-current="page"] { color: var(--ink); background: var(--line); }
.nav-mark { flex-shrink: 0; opacity: .85; }
.main-nav .nav-register { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 12px; min-height: 36px; border-radius: 4px; border: 1px solid var(--line-strong); background: var(--paper); font-size: 12px; font-weight: 550; white-space: nowrap; }
.button:hover { background: var(--soft); }
.button-dark { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.button-dark:hover { background: var(--text); }
.button-plain { background: transparent; border-color: transparent; padding: 7px; color: var(--muted); }
.button-plain:hover { color: var(--ink); }
.header-contribute { width: 100%; }
.footer-theme { display: none; }
.rail-bottom { margin-top: auto; display: grid; gap: 14px; }
.rail-bottom p { font-size: 11px; text-align: center; color: var(--muted); }
.theme-switch { display: flex; border: 1px solid var(--line-strong); border-radius: 4px; padding: 2px; min-width: 114px; }
.theme-switch button { border: 0; border-radius: 2px; padding: 6px 9px; min-height: 32px; font-size: 11px; flex: 1; white-space: nowrap; background: transparent; color: var(--muted); }
.theme-switch button[aria-pressed="true"] { background: var(--paper); color: var(--ink); }
main { grid-column: 2; width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 36px 36px; min-height: 85dvh; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 17px; }
.page-heading p { margin-top: 7px; font-size: 12px; color: var(--muted); }
.page-heading p:empty { display: none; }
.clock { display: flex; align-items: baseline; gap: 14px; font-size: 12px; text-align: right; white-space: nowrap; color: var(--muted); }
.clock strong { font-weight: 550; color: var(--text); }
.clock small { font-size: 11px; }
.status-strip { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding: 7px 0; margin-bottom: 10px; gap: 12px; font-size: 12px; color: var(--muted); }
.status-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.status-left strong { font-weight: 500; color: var(--text); }
.status-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.status-register { min-height: 34px; }
.status-detail { font-size: 11px; }
.mode-tag { color: var(--muted); font-size: 12px; }
.status-error { color: var(--danger); }
.market-layout { display: grid; gap: 28px; }
.board { min-width: 0; }
.board-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 7px 0 14px; }
.board-heading h2 { font-size: 13px; font-weight: 550; }
.board-heading p { margin-top: 4px; font-size: 11px; color: var(--muted); }
.board-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.price-head, .price-row { display: grid; grid-template-columns: minmax(170px, 1.35fr) minmax(86px, .8fr) minmax(90px, .85fr) minmax(85px, .8fr) minmax(136px, 1fr); gap: 12px; align-items: center; padding: 0 14px; }
.price-head { min-height: 39px; border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); background: var(--raised); }
.price-head > :not(:first-child) { text-align: right; }
.price-row { width: 100%; min-height: 72px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; transition: background .15s; }
@media (min-width: 721px) and (hover: hover) and (pointer: fine) {
  .price-row:hover { background: var(--raised); }
}
.price-row[aria-pressed="true"] { background: var(--selected); outline: 1px solid var(--accent); outline-offset: -1px; }
.price-row:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.item { min-width: 0; }
.item.has-rune { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 10px; }
.rune-mark { color: var(--muted); }
.price-row[aria-pressed="true"] .rune-mark { color: var(--accent); }
.item-name { display: block; color: var(--ink); font-size: 15px; font-weight: 620; word-break: keep-all; }
.item-meta { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.row-price, .row-state, .gap-cell, .last-cell { text-align: right; }
.row-price strong { font-size: 21px; font-weight: 640; color: var(--ink); letter-spacing: -.025em; }
.row-price .waiting { color: var(--muted); font-size: 12px; font-weight: 450; }
.only-mobile { display: none; }
.price-unit { font-size: 11px; font-weight: 450; margin-left: 3px; color: var(--muted); }
.row-state strong { display: block; font-size: 18px; font-weight: 570; letter-spacing: -.02em; }
.row-state .sellable { color: var(--positive); }
.row-state .near-high { color: var(--accent); }
.row-state small.sellable { color: var(--positive); }
.row-state small.near-high { color: var(--accent); }
.row-state small { display: block; font-size: 11px; margin-top: 3px; color: var(--muted); }
.gap-cell { font-size: 13px; }
.gap-cell small { color: var(--muted); font-size: 11px; }
.last-cell strong { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
.last-cell small { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.last-cell.past-quote strong { color: var(--muted); }
.quote-age { display: block; }
.missing-quote { grid-column: 2 / 5; text-align: center; padding: 11px 0; }
.missing-quote strong { display: block; font-size: 13px; font-weight: 550; color: var(--text); }
.missing-quote small { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 14px; font-size: 12px; color: var(--muted); margin-top: 5px; }
.board-bottom { padding-top: 10px; display: flex; justify-content: space-between; gap: 12px; font-size: 11px; color: var(--muted); }
.board-bottom strong { color: var(--text); font-weight: 550; }
.cook-toolbar { display: flex; gap: 12px; justify-content: space-between; margin-bottom: 13px; align-items: center; }
.cook-toolbar input { max-width: 240px; min-height: 34px; padding: 7px 10px; font-size: 12px; flex: 1; min-width: 0; }
.segments { display: flex; gap: 3px; flex-shrink: 0; }
.segments button { padding: 6px 13px; border: 1px solid transparent; background: transparent; border-radius: 4px; color: var(--muted); font-size: 12px; min-height: 34px; white-space: nowrap; }
.segments button[aria-pressed="true"] { border-color: var(--line-strong); background: var(--raised); color: var(--ink); }
.cook-board .price-row { min-height: 61px; }
.cook-board #price-rows { max-height: 390px; overflow: auto; scrollbar-gutter: stable; }
.cook-board .item-name { font-size: 13px; }
.no-results { padding: 28px 14px; font-size: 13px; color: var(--muted); }
.side-column { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, 1fr); gap: 28px; min-width: 0; }
.calc-panel { min-width: 0; border-top: 1px solid var(--line-strong); padding-top: 18px; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.section-title span { font-size: 11px; color: var(--muted); }
.calc-privacy { margin: -8px 0 16px; font-size: 11px; line-height: 1.7; color: var(--muted); }
.field-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 12px; }
.field { display: grid; gap: 7px; align-content: start; }
.field-wide { grid-column: 1 / -1; }
.input-unit { position: relative; }
.input-unit input { padding-right: 33px; }
.input-unit > span { position: absolute; right: 10px; top: 10px; color: var(--muted); font-size: 12px; pointer-events: none; }
.quick-actions { display: flex; gap: 4px; margin-top: 2px; }
.quick-actions button { background: transparent; border: 1px solid var(--line); border-radius: 3px; color: var(--muted); padding: 3px 8px; font-size: 11px; min-height: 27px; }
.quick-actions button:hover { border-color: var(--line-strong); color: var(--ink); }
.set-actions { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; width: min(100%, 252px); }
.set-actions button { min-height: 30px; min-width: 0; padding: 3px 4px; border-radius: 5px; border-color: var(--line-strong); font-size: 12px; font-weight: 550; line-height: 1; color: var(--muted); background: var(--paper); }
.set-actions button:nth-child(-n+3) { color: var(--text); background: var(--raised); border-color: var(--line); }
.set-actions button:hover { color: var(--ink); background: var(--selected); border-color: var(--muted); }
.set-actions button:active { background: var(--soft); }
.quantity-note { color: var(--muted); font-size: 11px; line-height: 1.7; }
.sale-fields > .field:last-child { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; }
.sale-fields > .field:last-child input { width: 100px; }
.assumed-prices { margin-top: 16px; font-size: 12px; color: var(--muted); }
.assumed-prices > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.assumed-prices button { min-height: 34px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 4px; background: transparent; font-size: 12px; }
.assumed-prices button:hover { background: var(--raised); border-color: var(--line-strong); color: var(--ink); }
.calc-result { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 14px; min-height: 75px; }
.result-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 12px; margin-top: 8px; }
.result-line strong { font-size: 21px; font-weight: 600; }
.result-line small { font-size: 12px; font-weight: 450; }
.result-sub { margin-top: 10px; font-size: 11px; color: var(--muted); }
.calc-empty, .calculation-error { font-size: 12px; color: var(--muted); line-height: 1.7; }
.calculation-error { color: var(--danger); }
.recipe { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line-strong); }
.recipe-heading { display: grid; gap: 5px; margin-bottom: 16px; }
.recipe-heading h3 { font-size: 16px; font-weight: 650; }
.recipe-heading > span { font-size: 12px; color: var(--muted); }
.recipe p { margin: 12px 0; font-size: 12px; line-height: 1.7; }
.recipe-note, .personal-note, #material-message { color: var(--muted); }
.recipe-mode { margin-bottom: 14px; }
.material-row, .material-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr) minmax(0, 1fr); gap: 7px; align-items: center; }
.material-head { margin: 16px 0 8px; font-size: 11px; color: var(--muted); }
.material-row { padding: 8px 0; border-top: 1px solid var(--line); }
.material-row label { font-size: 12px; word-break: keep-all; }
.material-row label small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; font-weight: 400; }
.material-row label small span { display: block; }
.material-row input, .material-row select { min-height: 44px; padding: 8px 5px; font-size: 12px; }
.material-result { padding: 9px 0 16px; }
.material-result .result-line strong { font-size: 19px; }
.recipe [data-action="material"] { min-height: 44px; }
.full { width: 100%; }
.positive, .history-up { color: var(--positive); }
.negative, .history-down { color: var(--danger); }
.assumption { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 12px; font-size: 11px; color: var(--muted); }
.history-section { min-width: 0; border-top: 1px solid var(--line-strong); padding-top: 18px; }
.history-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.history-heading h2 { font-size: 16px; font-weight: 650; }
.history-heading p { font-size: 11px; color: var(--muted); }
.history-period { display: inline-flex; gap: 0; align-items: center; padding: 2px; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; }
.history-period button, .history-date-controls button { border: 1px solid transparent; background: transparent; padding: 5px 8px; color: var(--muted); border-radius: 3px; font-size: 11px; min-height: 30px; }
.history-period button[aria-pressed="true"] { background: var(--paper); color: var(--ink); border-color: var(--line); }
.history-date-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 15px; font-size: 11px; }
.history-date-controls label { display: flex; gap: 7px; align-items: center; font-size: 11px; }
.history-date-controls input { width: 126px; padding: 5px 7px; min-height: 31px; font-size: 11px; }
.history-coverage { margin-left: auto; color: var(--muted); font-size: 11px; }
.history-legend { display: flex; gap: 8px 18px; flex-wrap: wrap; align-items: center; margin-top: 18px; color: var(--muted); font-size: 12px; }
.history-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.history-legend i { width: 18px; border-top: 1.5px dashed var(--chart-threshold); }
.history-chart { width: 100%; margin-top: 2px; overflow: hidden; }
.history-chart svg { width: 100%; display: block; }
.history-scrubber { display: grid; grid-template-columns: 42px minmax(0, 1fr) 42px; gap: 10px; align-items: center; margin: 4px 0 15px; }
.history-scrubber button { border: 1px solid var(--line-strong); background: transparent; border-radius: 3px; min-height: 32px; font-size: 12px; }
.history-scrubber input[type="range"] { min-height: 28px; width: 100%; padding: 0; border: 0; accent-color: var(--accent); }
.history-scrubber input[type="range"] { appearance: none; background: transparent; height: 30px; }
.history-scrubber input[type="range"]::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: var(--line-strong); }
.history-scrubber input[type="range"]::-webkit-slider-thumb { appearance: none; width: 13px; height: 13px; margin-top: -5px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.history-scrubber input[type="range"]::-moz-range-track { height: 3px; border-radius: 2px; background: var(--line-strong); }
.history-scrubber input[type="range"]::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.history-detail { border-top: 1px solid var(--line); padding-top: 12px; }
.history-selected-time { font-size: 12px; font-weight: 550; margin-bottom: 10px; color: var(--ink); }
.history-values { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.history-values dt { color: var(--muted); font-size: 11px; margin-bottom: 4px; }
.history-values dd { margin: 0; font-size: 14px; font-weight: 550; }
.history-source { color: var(--muted); font-size: 12px; margin-top: 10px; }
.history-stats { display: flex; gap: 8px 14px; flex-wrap: wrap; margin: 14px 0; font-size: 12px; color: var(--muted); }
.history-stats strong { color: var(--text); font-weight: 550; margin-left: 4px; }
.history-records { border-top: 1px solid var(--line); padding-top: 11px; }
.history-record-scroll { overflow: auto; max-height: 240px; margin-top: 10px; }
.history-records table { width: 100%; border-collapse: collapse; font-size: 11px; }
.history-records th, .history-records td { text-align: left; padding: 7px 5px; border-bottom: 1px solid var(--line); }
.history-records th { position: sticky; top: 0; background: var(--paper); color: var(--muted); font-weight: 500; }
.history-error { color: var(--danger); font-size: 11px; }
.lucky-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(300px, 1fr); gap: 45px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.lucky-reference { min-width: 0; }
.lucky-reference h2 { font-size: 16px; margin-bottom: 11px; }
.lucky-reference .small { color: var(--muted); font-size: 12px; margin-top: 14px; }
.probabilities { display: flex; margin: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.probabilities > div { flex: 1; padding: 15px 0; }
.probabilities b { display: block; font-size: 23px; font-weight: 600; font-variant-numeric: tabular-nums; }
.probabilities span { font-size: 12px; color: var(--muted); }
.effect-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.effect-row strong { font-weight: 500; }
.effect-row span { color: var(--muted); }
.lucky-layout .calc-panel { border-top: 0; padding-top: 0; }
.lucky-output { border-top: 1px solid var(--line-strong); margin-top: 25px; padding-top: 10px; min-height: 80px; }
.probability-note { font-size: 11px; color: var(--muted); margin-top: 14px; }
.register-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 40px; padding-top: 20px; border-top: 1px solid var(--line-strong); }
.register-form h2 { margin-bottom: 9px; }
.register-form > p { font-size: 12px; color: var(--muted); margin-bottom: 23px; }
.register-form .field-grid { margin-bottom: 20px; }
.register-form textarea { margin-top: 7px; }
.register-note { font-size: 11px; color: var(--muted); margin-top: 14px; }
.preview-panel { border-left: 1px solid var(--line); padding-left: 25px; }
.preview-empty { display: flex; align-items: center; min-height: 220px; font-size: 12px; color: var(--muted); }
.preview-list { max-height: 380px; overflow: auto; margin: 15px 0; }
.preview-grade { display: flex; justify-content: space-between; gap: 10px; margin: 18px 0 4px; font-size: 13px; }
.preview-grade:first-child { margin-top: 0; }
.preview-grade small { color: var(--muted); font-size: 12px; font-weight: 450; }
.preview-row { display: flex; justify-content: space-between; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--line); gap: 10px; font-size: 12px; }
.preview-row small { color: var(--muted); }
.error-list { white-space: pre-line; font-size: 12px; color: var(--danger); margin: 14px 0; overflow-wrap: anywhere; }
.auth-section { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 20px; }
.auth-section p { font-size: 12px; margin-bottom: 14px; }
.site-footer { grid-column: 2; width: calc(100% - 72px); max-width: 1168px; margin: 0 auto; padding: 17px 0 24px; display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.footer-brand { font-weight: 600; color: var(--text); }
.site-footer > a:nth-last-child(2) { margin-left: auto; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 12px 18px; background: var(--ink); color: var(--paper); border: 1px solid var(--line); border-radius: 5px; z-index: 30; font-size: 12px; max-width: calc(100% - 24px); }
.loading-state { padding: 60px 0; color: var(--muted); font-size: 13px; }
@media (max-width: 1150px) {
  body { grid-template-columns: 160px minmax(0, 1fr); }
  .site-header { padding-left: 12px; padding-right: 12px; }
  main { padding-left: 25px; padding-right: 25px; }
  .side-column { grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr); gap: 22px; }
  .price-head, .price-row { grid-template-columns: minmax(140px, 1.25fr) minmax(70px, .8fr) minmax(80px, .8fr) minmax(70px, .7fr) minmax(105px, 1fr); gap: 9px; padding-left: 10px; padding-right: 10px; }
  .site-footer { width: calc(100% - 50px); }
}
@media (max-width: 950px) {
  .side-column { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .calc-panel .field-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .clock { display: block; }
  .clock small { display: block; margin-top: 4px; }
  .lucky-layout { gap: 25px; grid-template-columns: minmax(0, 1fr); }
  .lucky-layout .calc-panel .field-grid { grid-template-columns: 1fr 1fr; }
  .register-layout { grid-template-columns: minmax(0, 1fr); gap: 25px; }
  .preview-panel { border-left: 0; border-top: 1px solid var(--line-strong); padding-left: 0; padding-top: 20px; }
}
@media (max-width: 780px) {
  body { display: block; }
  .site-header { position: relative; height: auto; padding: 17px 20px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 15px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 0; font-size: 19px; }
  .brand img { width: 24px; height: 24px; }
  .main-nav { grid-column: 1 / -1; grid-row: 2; display: flex; gap: 3px; }
  .main-nav a { padding: 9px 12px 10px; font-size: 12px; border-radius: 4px 4px 0 0; }
  .main-nav a { gap: 5px; }
  .nav-mark { width: 15px; height: 15px; }
  .main-nav a[aria-current="page"] { background: var(--paper); }
  .main-nav .nav-register { display: none; }
  .channel-mark { font-size: 14px; margin-right: 3px; }
  .header-contribute { grid-column: 2; grid-row: 1; width: auto; min-height: 44px; }
  .rail-bottom { display: none; }
  .footer-theme { display: flex; width: 100%; justify-content: space-between; align-items: center; gap: 14px; font-size: 12px; }
  .footer-theme .theme-switch button { min-height: 44px; font-size: 12px; }
  .rail-bottom p { display: none; }
  .theme-switch { padding: 1px; }
  .theme-switch button { font-size: 11px; padding: 5px 10px; min-height: 28px; }
  main { padding: 23px 20px 30px; }
  .page-heading { margin-bottom: 13px; align-items: flex-start; }
  h1 { font-size: 21px; }
  .page-heading p { font-size: 11px; max-width: 240px; }
  .clock { font-size: 11px; }
  .clock small { font-size: 11px; }
  .status-strip { margin-bottom: 8px; }
  .status-left { gap: 7px 12px; }
  .status-detail { font-size: 11px; }
  .status-strip { align-items: center; }
  .status-left { display: grid; gap: 4px; }
  .status-register { min-height: 44px; }
  .status-actions .button-plain { min-height: 44px; min-width: 36px; }
  .main-nav a { min-height: 44px; display: inline-flex; align-items: center; }
  .site-footer { width: calc(100% - 40px); margin: 0 auto; gap: 10px 15px; }
}
@media (max-width: 600px) {
  .price-head { display: none; }
  .price-row, .cook-board .price-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); grid-template-rows: auto auto auto; gap: 4px 12px; padding: 13px 12px; min-height: 112px; border-top: 0; }
  #price-rows { border-top: 1px solid var(--line-strong); }
  .item { grid-column: 1; grid-row: 1 / 3; }
  .row-price { grid-column: 2; grid-row: 1; }
  .row-state { grid-column: 2; grid-row: 2; display: flex; flex-direction: column-reverse; gap: 3px; }
  .row-state strong { font-size: 13px; color: var(--text); }
  .row-state .ratio-label { font-size: 12px; color: var(--muted); font-weight: 450; }
  .row-state small { font-size: 13px; margin: 0; font-weight: 600; }
  .gap-cell { grid-column: 2; grid-row: 3; font-size: 12px; color: var(--muted); }
  .last-cell { grid-column: 1; grid-row: 3; text-align: left; }
  .last-cell:not(.past-quote) strong { display: none; }
  .is-missing .last-cell { grid-column: 1 / -1; display: flex; gap: 3px 9px; flex-wrap: wrap; align-items: baseline; }
  .is-missing .last-cell strong, .is-missing .last-cell small { font-size: 12px; }
  .is-missing .last-cell small { margin-top: 0; }
  .quote-age { display: inline; }
  .missing-quote { grid-column: 2; grid-row: 1 / 3; text-align: right; padding: 0; }
  .missing-quote small { display: block; font-size: 12px; line-height: 1.65; }
  .missing-quote small span { display: block; }
  .only-mobile { display: inline; }
  .item-name { font-size: 14px; }
  .item.has-rune { grid-template-columns: 17px minmax(0, 1fr); gap: 7px; }
  .rune-mark { width: 17px; height: 17px; }
  .item-meta { font-size: 12px; margin-top: 5px; }
  .row-price strong { font-size: 21px; }
  .row-price strong.waiting { font-size: 12px; }
  .last-cell strong { font-size: 12px; }
  .last-cell small { font-size: 12px; }
  .price-unit { font-size: 11px; margin-left: 1px; }
  .board-heading { padding-bottom: 10px; }
  .board-heading h2 { font-size: 12px; }
  .board-count { font-size: 11px; }
  .board-bottom { flex-wrap: wrap; font-size: 11px; }
  .market-layout { gap: 23px; }
  .side-column { gap: 23px; }
  .calc-panel .field-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .history-heading { align-items: flex-start; flex-wrap: wrap; gap: 9px; }
  .history-heading h2 { font-size: 15px; }
  .history-date-controls { gap: 6px; }
  .history-date-controls input { width: 122px; }
  .history-date-controls input, .history-date-controls button, .history-period button, .history-scrubber button { min-height: 44px; font-size: 12px; }
  .history-scrubber input[type="range"] { min-height: 44px; }
  .history-scrubber input[type="range"]::-webkit-slider-thumb { width: 18px; height: 18px; margin-top: -7.5px; }
  .quick-actions button, .assumed-prices button, .segments button { min-height: 44px; font-size: 12px; }
  .set-actions { width: min(100%, 284px); gap: 2px; }
  .history-coverage { width: 100%; margin-left: 0; }
  .history-values dd { font-size: 13px; }
  .history-values dt { font-size: 11px; }
  .history-stats { gap: 8px 12px; font-size: 12px; }
  .cook-toolbar input { max-width: 160px; }
  .register-form > p { font-size: 11px; }
  .site-footer > a:nth-last-child(2) { margin-left: 0; }
  .site-footer > span { width: 100%; }
}
@media (max-width: 360px) {
  .site-header { padding-left: 14px; padding-right: 14px; gap: 14px 8px; }
  main { padding: 20px 14px 28px; }
  .brand { font-size: 18px; gap: 5px; }
  .theme-switch button { padding-left: 7px; padding-right: 7px; }
  .main-nav { gap: 0; }
  .main-nav a { padding-left: 7px; padding-right: 7px; }
  .price-row, .cook-board .price-row { padding-left: 9px; padding-right: 9px; gap: 4px 8px; }
  .item-name, .cook-board .item-name { font-size: 13px; }
  .item-meta { font-size: 12px; }
  .last-cell small { font-size: 12px; }
  .row-price strong { font-size: 20px; }
  .row-price strong.waiting { font-size: 12px; }
  .row-state strong { font-size: 13px; }
  .row-state small { font-size: 13px; }
  .clock strong { font-size: 11px; }
  .clock small { font-size: 11px; }
  .site-footer { width: calc(100% - 28px); }
  .cook-toolbar { gap: 7px; }
  .segments button { padding-left: 10px; padding-right: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
