:root {
  --blue: #244cc4;
  --deep: #183b97;
  --ink: #1b2940;
  --muted: #526278;
  --line: #d9dee7;
  --paper: #f8f7ef;
  --pale: #edf2ff;
  --ui: Inter, "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 80px; scrollbar-gutter: stable; }
body { margin: 0; background: #f6f7f9; color: var(--ink); font: 15px/1.6 var(--ui); -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; background: none; }
button, a, select { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button:focus-visible, a:focus-visible, select:focus-visible, input:focus-visible { outline: 3px solid #ad5e0b; outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
.wrap { width: min(1152px, calc(100% - 80px)); margin-inline: auto; }
.top { position: sticky; top: 0; z-index: 4; background: white; border-bottom: 1px solid var(--line); }
.toolbar { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.home { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 7px; }
.home img { display: block; }
.search { display: flex; align-items: center; gap: 12px; border: 1px solid #d1d9e3; border-radius: 8px; background: #f7f8fa; padding: 0 13px; width: min(370px, 44%); }
.search:focus-within { box-shadow: 0 0 0 2px var(--blue); }
.glass { display: block; width: 14px; height: 14px; border: 1.7px solid var(--muted); border-radius: 50%; position: relative; flex-shrink: 0; }
.glass::after { content: ""; display: block; width: 7px; height: 1.7px; background: var(--muted); position: absolute; left: 10px; top: 12px; transform: rotate(45deg); }
.search input { width: 100%; min-width: 0; background: transparent; border: none; min-height: 39px; line-height: 1.4; font-size: 14px; }
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline: none; }
.share-action { margin-left: auto; border: 1px solid #abbbd1; border-radius: 7px; color: var(--deep); background: white; min-height: 40px; padding: 4px 15px; font-size: 13px; font-weight: 650; white-space: nowrap; }
.share-action span { font-size: 18px; margin-right: 3px; }
.workspace { display: grid; grid-template-columns: 246px minmax(0, 1fr); align-items: start; gap: clamp(28px, 3.6vw, 55px); margin-block: 30px 55px; }
aside { position: sticky; top: 87px; max-height: calc(100dvh - 97px); overflow-y: auto; scrollbar-width: thin; }
.summary { padding: 17px 17px 0; border: 1px solid #c1cfe3; border-radius: 11px; background: white; }
.summary-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 3px; color: var(--muted); font-size: 12px; font-weight: 650; }
.save-indicator { display: inline-flex; gap: 5px; align-items: center; font-size: 10px; font-weight: 500; color: #48624e; }
.save-indicator::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #4f7757; }
.save-indicator.unsaved { color: #a44428; }
.save-indicator.unsaved::before { background: #a44428; }
.summary-metric { display: flex; align-items: baseline; gap: 7px; margin-top: 2px; color: var(--muted); font-size: 12px; }
.summary-metric b { line-height: 1.35; font: 650 42px/1.35 var(--ui); font-variant-numeric: tabular-nums; letter-spacing: -.06em; color: var(--deep); }
.track { height: 4px; margin: 1px 0 12px; background: #e0e8f7; border-radius: 6px; overflow: hidden; }
.track span { display: block; height: 100%; width: 0; background: var(--blue); transition: width .18s ease-out; }
#review { display: flex; width: 100%; align-items: center; justify-content: space-between; gap: 4px; min-height: 41px; border-top: 1px solid var(--line); padding: 3px 0; color: var(--deep); font-weight: 650; font-size: 12px; }
#review span { font-size: 17px; }
.category-heading { display: flex; gap: 8px; align-items: baseline; padding: 20px 10px 9px; font-weight: 700; font-size: 13px; }
#category-count, .count { font-size: 11px; color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
#nav { display: grid; gap: 3px; }
.cat { display: flex; align-items: center; justify-content: space-between; min-height: 39px; padding: 6px 13px 6px 16px; border-radius: 6px; font-weight: 600; font-size: 14px; text-align: left; }
.cat[aria-current="true"] { background: #e3eaff; color: var(--deep); box-shadow: inset 3px 0 var(--blue); }
.cat[aria-current="true"] .count { color: var(--deep); }
.mobile-nav { display: none; }
.sheet { min-width: 0; border: 1px solid #cad3de; border-radius: 13px; background: white; }
.section-head { display: flex; align-items: center; justify-content: space-between; min-height: 103px; padding: 10px 26px; background: var(--paper); border-radius: 12px 12px 0 0; overflow: hidden; }
.section-heading { display: flex; flex-wrap: wrap; column-gap: 13px; align-items: baseline; }
h1 { color: var(--deep); font-size: clamp(27px, 2.6vw, 39px); letter-spacing: -.055em; line-height: 1.35; font-weight: 750; }
h1:focus { outline: none; }
#section-count { white-space: nowrap; color: var(--muted); font-size: 12px; }
#kitchen-art { width: 194px; height: 82px; object-fit: contain; }
.item-grid { display: grid; grid-template-columns: minmax(0, 1fr) 104px 120px; align-items: center; padding-inline: 24px 15px; }
.table-head { min-height: 37px; border-block: 1px solid #c7d2e1; background: #f2f5fa; color: #425677; font-size: 12px; font-weight: 650; position: sticky; top: 68px; z-index: 2; }
.table-head span:not(:first-child) { text-align: center; }
.item { min-height: 50px; border-bottom: 1px solid #e3e7ee; }
.item[data-state="1"], .item[data-state="2"] { background: #edf3ff; }
.item-name { font-size: 15px; font-weight: 600; line-height: 1.45; padding-block: 8px; }
.mark { align-self: stretch; display: grid; place-items: center; min-height: 49px; color: #6a7c94; }
.mark:focus-visible { outline-offset: -4px; border-radius: 8px; }
.circle { width: 22px; height: 22px; border: 1.6px solid currentColor; border-radius: 50%; display: grid; place-items: center; }
.double::after { content: ""; width: 12px; height: 12px; border: 1.5px solid currentColor; border-radius: 50%; }
.mark[aria-pressed="true"] .circle { background: var(--blue); border-color: var(--blue); color: white; box-shadow: 0 0 0 3px #d8e3ff; }
.mark[aria-pressed="true"] .circle:not(.double)::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: white; }
.bottom-nav { display: flex; gap: 15px; padding: 7px 19px; }
.bottom-nav:empty { display: none; }
.bottom-nav button, .empty button { min-height: 44px; color: var(--deep); font-weight: 650; font-size: 13px; }
.next { margin-left: auto; }
.result-group { font-size: 13px; padding: 8px 24px; background: var(--paper); color: var(--deep); border-bottom: 1px solid var(--line); }
.empty, .empty-record { text-align: center; color: var(--muted); padding: 28px 14px; }
.empty button { display: block; margin: 4px auto 0; text-decoration: underline; }
dialog { width: min(475px, calc(100% - 28px)); max-height: 84dvh; border: 1px solid #bdc8d6; border-radius: 15px; padding: 20px 24px; color: var(--ink); box-shadow: 0 18px 72px #19314730; }
dialog::backdrop { background: #182a415e; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.modal-head h2 { font-size: 21px; color: var(--deep); }
#close { width: 42px; height: 42px; font-size: 24px; }
#dialog-body { font-size: 14px; line-height: 1.8; }
#dialog-body h3 { border-bottom: 1px solid var(--line); padding-bottom: 4px; font-size: 14px; }
.record-total { margin-bottom: 15px; color: var(--deep); }
.records { list-style: none; margin: 5px 0 15px; padding: 0; }
.records li { display: flex; column-gap: 10px; }
.records b { color: var(--blue); }
.share-url { width: 100%; border: 1px solid #abb8ca; border-radius: 5px; padding: 8px 9px; margin: 13px 0; }
.primary { padding: 8px 15px; min-height: 42px; color: white; background: var(--blue); border-radius: 6px; font-weight: 650; }
.feedback { color: var(--deep); margin-top: 6px; }
.skip, .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { clip-path: none; width: auto; height: auto; background: white; padding: 9px; z-index: 8; }
@media (hover: hover) {
  .cat:hover, .share-action:hover { background: var(--pale); }
  .mark:hover { background: #e5edfc; }
  .bottom-nav button:hover, #review:hover { text-decoration: underline; }
}
@media (max-width: 920px) {
  .wrap { width: calc(100% - 40px); }
  .workspace { grid-template-columns: 205px minmax(0, 1fr); gap: 22px; }
  .item-grid { grid-template-columns: minmax(0, 1fr) 80px 94px; padding-inline: 18px 8px; }
  #kitchen-art { width: 155px; }
}
@media (max-width: 700px) {
  html { scroll-padding-top: 62px; }
  body { background: white; }
  .wrap { width: calc(100% - 28px); }
  .toolbar { min-height: 56px; gap: 9px; }
  .home { width: 32px; height: 44px; }
  .home img { width: 29px; height: 29px; }
  .search { flex: 1; width: auto; min-width: 0; padding: 0 9px; gap: 9px; }
  .search input { font-size: 16px; min-height: 36px; }
  .share-action { min-height: 40px; padding-inline: 7px; font-size: 11px; }
  .share-action span { font-size: 15px; margin: 0; }
  .workspace { display: block; margin-block: 15px 32px; }
  aside { position: static; max-height: none; overflow: visible; }
  .summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 14px; padding: 10px 13px 12px; background: #f7f9fd; border-radius: 9px; }
  .summary-head { grid-column: 1; justify-content: start; column-gap: 8px; font-size: 11px; }
  .summary-metric { grid-column: 1; grid-row: 2; gap: 5px; font-size: 11px; }
  .summary-metric b { font-size: 25px; }
  .track { grid-column: 1; grid-row: 3; margin: 4px 0 0; height: 3px; }
  #review { grid-row: 1/4; grid-column: 2; border: 0; gap: 6px; font-size: 11px; min-height: 44px; }
  .category-heading, #nav { display: none; }
  .mobile-nav { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-block: 12px; font-weight: 650; font-size: 13px; }
  .mobile-nav select { width: min(69%, 260px); min-height: 42px; padding: 5px 8px; border: 1px solid #b4c2d5; border-radius: 6px; background: white; font-size: 16px; }
  .section-head { min-height: 74px; padding: 8px 13px; }
  h1 { font-size: 25px; }
  .section-heading { column-gap: 8px; }
  #section-count { font-size: 11px; }
  #kitchen-art { width: 120px; height: 57px; }
  .table-head { top: 56px; font-size: 10px; min-height: 32px; }
  .item-grid { grid-template-columns: minmax(0, 1fr) 62px 81px; padding-inline: 11px 3px; }
  .item-name { font-size: 14px; }
  .item, .mark { min-height: 47px; }
  .bottom-nav { padding-inline: 9px; }
  .result-group { padding-inline: 11px; }
}
@media (max-width: 360px) {
  .wrap { width: calc(100% - 18px); }
  .toolbar { gap: 5px; }
  .item-grid { grid-template-columns: minmax(0, 1fr) 54px 72px; }
  .share-action { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) { .track span { transition: none; } }
