/* 色の初期値。「設定」シートの color_* があれば、表示時に上書きされます */
  :root {
    --ink: #2A231E;
    --accent: #E9A23B;
    --tag: #C8502E;
    --leader: #3F5E2E;
    --ground: #EFE6D2;
    --paper: #FFFFFF;
    --line: color-mix(in srgb, var(--ink) 18%, transparent);
    --soft: color-mix(in srgb, var(--ink) 62%, var(--ground));
    --radius-s: 6px;
    --radius-m: 14px;
    --hand: "Yusei Magic", "Zen Maru Gothic", sans-serif;
    --font: "Zen Maru Gothic", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Yu Gothic", system-ui, sans-serif;
  }

  *, *::before, *::after { box-sizing: border-box; }
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: var(--font);
    font-weight: 500;
    font-size: 1rem;
    line-height: 1.75;
  }
  p, h2, h3, ul, ol, dl, dd { margin: 0; }
  ul, ol { padding: 0; list-style: none; }
  :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

  .masthead, .page, .footer { max-width: 36rem; margin: 0 auto; padding-left: 1.25rem; padding-right: 1.25rem; }

  /* ---------- 見出し ---------- */
  .masthead { padding-top: 2rem; padding-bottom: 1.25rem; }
  .masthead-org { font-size: 0.875rem; color: var(--soft); }
  .masthead-title {
    margin: 0.25rem 0 0;
    font-family: var(--hand);
    font-weight: 400;
    font-size: clamp(3rem, 17vw, 4.75rem);
    line-height: 1.05;
    letter-spacing: 0.06em;
  }
  .masthead-title-logo { line-height: 0; }
  .masthead-logo { display: block; width: min(100%, 22rem); height: auto; }
  .masthead-catch {
    margin-top: 0.75rem;
    font-family: var(--hand);
    font-size: 1.35rem;
    line-height: 1.4;
  }

  /* ---------- 開催状況 ---------- */
  .status {
    margin-bottom: 1.5rem;
    padding: 1rem 1.15rem;
    border: 2px solid var(--ink);
    border-radius: var(--radius-m);
    background: var(--paper);
  }
  .status-message { font-size: 1.375rem; font-weight: 900; line-height: 1.45; }
  .status-note { margin-top: 0.35rem; }
  .status-open { background: var(--leader); color: var(--paper); }
  .status-postponed, .status-cancelled { background: var(--tag); color: var(--paper); }

  /* ---------- 日時 ---------- */
  .facts {
    padding: 1.25rem 0 1.5rem;
    border-top: 2px solid var(--ink);
  }
  .facts-date {
    font-size: clamp(2rem, 10vw, 2.75rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: 0.02em;
  }
  .facts-time {
    font-size: clamp(1.75rem, 8.5vw, 2.25rem);
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
  }
  .facts-list { margin-top: 1rem; }
  .facts-list div {
    display: grid;
    grid-template-columns: 3rem 1fr;
    gap: 0.75rem;
    padding: 0.4rem 0;
    border-top: 1px solid var(--line);
  }
  .facts-list dt { font-weight: 700; color: var(--soft); }

  /* ---------- ページ内の移動 ---------- */
  .jump {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding-bottom: 1.75rem;
  }
  .jump a {
    padding: 0.4rem 0.9rem;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--paper);
    color: var(--ink);
    font-weight: 700;
    font-size: 0.9375rem;
    text-decoration: none;
  }
  .jump a:active { background: var(--accent); }

  /* ---------- 各ブロック ---------- */
  .block {
    padding: 1.5rem 0 2rem;
    border-top: 2px solid var(--ink);
    scroll-margin-top: 0.5rem;
  }
  .block-title {
    margin-bottom: 1rem;
    font-family: var(--hand);
    font-weight: 400;
    font-size: 2rem;
    line-height: 1.2;
  }
  .block-note { margin-top: 1rem; font-size: 0.9375rem; }

  /* コーナー */
  .corner { padding: 0.85rem 0; border-top: 1px solid var(--line); }
  .corner:first-child { border-top: 0; padding-top: 0; }
  .corner-name { font-size: 1.25rem; font-weight: 900; line-height: 1.4; }
  .corner-desc { margin-top: 0.15rem; }
  .corner-note { margin-top: 0.25rem; font-size: 0.875rem; color: var(--soft); }

  /* ステージ：時間順の縦の線 */
  .slot {
    position: relative;
    display: grid;
    grid-template-columns: 4rem 1fr;
    gap: 0.75rem;
    padding: 0.6rem 0 0.6rem 1.4rem;
  }
  .slot::before {
    content: "";
    position: absolute;
    left: 0.35rem; top: 0; bottom: 0;
    border-left: 2px solid var(--ink);
  }
  .slot:first-child::before { top: 1.25rem; }
  .slot:last-child::before { bottom: calc(100% - 1.25rem); }
  .slot::after {
    content: "";
    position: absolute;
    left: 0; top: 0.9rem;
    width: 0.85rem; height: 0.85rem;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid var(--ink);
  }
  .slot-time { font-weight: 900; font-variant-numeric: tabular-nums; }
  .slot-booth { font-size: 1.125rem; font-weight: 700; line-height: 1.5; }

  /* フード：お品書き */
  .food-image { margin-bottom: 1rem; color: var(--soft); font-size: 0.875rem; }
  .food-image-img { display: block; width: 100%; height: auto; border: 2px solid var(--ink); border-radius: var(--radius-s); }
  .food-list-summary { padding: 0.25rem 0 0.75rem; font-weight: 700; cursor: pointer; }
  .food-list:not([open]) .food-list-summary { padding-bottom: 0; }
  .shop + .shop { margin-top: 1.5rem; }
  .shop-name {
    display: inline-block;
    margin-bottom: 0.4rem;
    padding: 0.1rem 0.7rem;
    background: var(--ink);
    color: var(--ground);
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-s);
  }
  .menu-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.35rem 0;
    border-bottom: 1px dotted color-mix(in srgb, var(--ink) 40%, transparent);
  }
  .menu-name { flex: 1; }
  .menu-price { font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }

  /* 持ち物 */
  .bring { counter-reset: bring; }
  .bring-item {
    position: relative;
    padding: 0.6rem 0 0.6rem 2.6rem;
    border-top: 1px solid var(--line);
    counter-increment: bring;
  }
  .bring-item:first-child { border-top: 0; }
  .bring-item::before {
    content: counter(bring);
    position: absolute;
    left: 0; top: 0.55rem;
    width: 1.9rem; height: 1.9rem;
    border: 2px solid var(--ink);
    border-radius: 50%;
    background: var(--accent);
    font-weight: 900;
    text-align: center;
    line-height: 1.65rem;
  }
  .bring-name { font-weight: 700; font-size: 1.125rem; }
  .bring-note { font-size: 0.9375rem; color: var(--soft); }

  /* 注意事項 */
  .note { padding: 0.85rem 0; border-top: 1px solid var(--line); }
  .note:first-child { border-top: 0; padding-top: 0; }
  .note-title { font-weight: 900; font-size: 1.0625rem; }
  .note-text { margin-top: 0.15rem; }

  .closed { padding: 1.5rem 0; border-top: 2px solid var(--ink); font-size: 1.125rem; font-weight: 700; }

  .footer {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
    border-top: 2px solid var(--line);
    font-size: 0.9375rem;
  }
  .footer-notice { margin-top: 0.5rem; font-size: 0.8125rem; color: var(--soft); }

  /* =========================================================
     管理画面
     ========================================================= */
  .admin .masthead, .admin .page, .admin .footer { max-width: 60rem; }
  .admin .masthead-title { font-size: clamp(2rem, 8vw, 3rem); }
  .login { max-width: 24rem; padding-top: 1.25rem; border-top: 2px solid var(--ink); }
  .field-label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
  .field-row { display: flex; gap: 0.5rem; }
  .field-input {
    flex: 1; min-width: 0;
    font: inherit; font-size: 1.125rem;
    padding: 0.6rem 0.8rem;
    border: 2px solid var(--ink); border-radius: var(--radius-m);
    background: var(--paper); color: var(--ink);
  }
  .button {
    font: inherit; font-weight: 900;
    padding: 0 1.1rem;
    border: 2px solid var(--ink); border-radius: var(--radius-m);
    background: var(--accent); color: var(--ink);
    cursor: pointer;
  }
  .login-error { margin-top: 0.75rem; color: var(--tag); font-weight: 700; }
  .board { display: none; }
  .board.is-open { display: block; }
  .board h3 { margin: 1.5rem 0 0.5rem; font-size: 1.05rem; font-weight: 700; }
  .board-note { font-size: 0.875rem; color: var(--soft); margin-bottom: 0.75rem; }
  .kpis {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
  }
  .kpi { background: var(--paper); padding: 0.85rem 1rem; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .kpi dt { font-size: 0.8125rem; color: var(--soft); }
  .kpi dd { font-size: 1.75rem; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.3; }
  .kpi-unit { font-size: 0.875rem; font-weight: 700; margin-left: 0.15rem; }
  .chart { width: 100%; height: auto; display: block; }
  .chart-bar { fill: var(--accent); stroke: var(--ink); stroke-width: 1.5; }
  .chart-axis { stroke: var(--ink); stroke-width: 1.5; }
  .chart-label { fill: var(--ink); font-size: 11px; font-family: var(--font); }
  .chart-value { fill: var(--ink); font-size: 11px; font-weight: 700; font-family: var(--font); }
  .chart-empty { color: var(--soft); }
  .url-row { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.5rem; }
  .url-label { width: 7rem; font-weight: 700; }
  .url-text {
    flex: 1; min-width: 14rem;
    font: inherit; font-size: 0.875rem;
    padding: 0.45rem 0.6rem;
    border: 2px solid var(--line); border-radius: var(--radius-s);
    background: var(--paper); color: var(--ink);
  }
  .small-button {
    font: inherit; font-weight: 700;
    padding: 0.4rem 0.8rem;
    border: 2px solid var(--ink); border-radius: var(--radius-s);
    background: var(--paper); color: var(--ink); cursor: pointer;
  }
  .plain-list { padding-left: 1.25rem; list-style: disc; }


  .loading-note { color: var(--soft); font-size: 0.875rem; padding: 1rem 0; }
