  @import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700;900&family=Noto+Sans+JP:wght@300;400;700&display=swap');

  :root {
    --bg:       #0a0d0a;
    --surface:  #131613;
    --surface2: #1c201c;
    --border:   #273027;
    --accent:   #7aba6e;
    --red:      #e63946;
    --green:    #4caf82;
    --text:     #dce8d8;
    --dim:      #6a7860;
  }
  /* ── 季節テーマ ── */
  body[data-season="sakura"] {
    --bg: #0d0d0d; --surface: #161616; --surface2: #1f1f1f; --border: #2a2a2a;
    --accent: #c8a96e; --text: #e8e0d0; --dim: #7a7060;
  }
  body[data-season="sakura"] .sakura-tree circle { fill: #ffb7c5 !important; }
  body[data-season="sakura"] .nature-grass path  { fill: #5a9050 !important; }

  body[data-season="tsuyu"] {
    --bg: #0a0a14; --surface: #121220; --surface2: #1a1a2c; --border: #242438;
    --accent: #7890c8; --text: #d0d4e8; --dim: #606878;
  }
  body[data-season="tsuyu"] .sakura-tree circle { fill: #c8b8e0 !important; }
  body[data-season="tsuyu"] .sakura-tree line   { stroke: #6a608a !important; }
  body[data-season="tsuyu"] .nature-grass path  { fill: #4a5870 !important; }
  body[data-season="tsuyu"] .nature-birds path  { stroke: #7070a0 !important; }

  body[data-season="natsu"] {
    --bg: #080c10; --surface: #101820; --surface2: #18222c; --border: #202e3c;
    --accent: #e8c040; --text: #e0dcc8; --dim: #706848;
  }
  body[data-season="natsu"] .sakura-tree circle { fill: #4aaa38 !important; }
  body[data-season="natsu"] .nature-grass path  { fill: #3a8030 !important; }
  body[data-season="natsu"] .nature-birds path  { stroke: #708050 !important; }

  body[data-season="koyo"] {
    --bg: #100804; --surface: #1c1008; --surface2: #261808; --border: #342010;
    --accent: #e07840; --text: #e8d8c0; --dim: #806050;
  }
  body[data-season="koyo"] .sakura-tree circle { fill: #d05820 !important; }
  body[data-season="koyo"] .sakura-tree line   { stroke: #6a3810 !important; }
  body[data-season="koyo"] .nature-grass path  { fill: #806040 !important; }
  body[data-season="koyo"] .nature-birds path  { stroke: #906040 !important; }

  body[data-season="fuyu"] {
    --bg: #080a12; --surface: #101520; --surface2: #181e2c; --border: #222838;
    --accent: #a8c8e8; --text: #d8e4f0; --dim: #607080;
  }
  body[data-season="fuyu"] .sakura-tree circle { fill: #d0e8f8 !important; }
  body[data-season="fuyu"] .sakura-tree line   { stroke: #708090 !important; }
  body[data-season="fuyu"] .nature-grass path  { fill: #404858 !important; }
  body[data-season="fuyu"] .nature-birds path  { stroke: #6080a0 !important; }

  /* ── 夜テーマ ── */
  body[data-night="true"] {
    --bg: #070707; --surface: #0e0e0e; --surface2: #161616;
    --border: #261414; --accent: #c89610; --text: #ede8df; --dim: #7a6848;
    --red: #cc3030; --green: #4a7a60;
  }
  body[data-night="true"] .sakura-tree { bottom: -150px; }
  body[data-night="true"] .sakura-tree circle { fill: #111111 !important; }
  body[data-night="true"] .sakura-tree line   { stroke: #181818 !important; }
  body[data-night="true"] .nature-grass path  { fill: #0c0808 !important; }
  body[data-night="true"] .nature-birds { display: none; }
  body[data-night="true"] .deco-leaf { display: none; }
  body[data-night="true"] .nature-shrub { display: none; }

  /* ── 背景プレビュー ── */
  body[data-bg-preview] #sec-top { min-height: calc(100vh - 56px); }
  body[data-bg-preview] #sec-top > *:not(.sakura-deco) { display: none !important; }
  body[data-bg-preview] .subnav { display: none !important; }
  body[data-bg-preview] header { cursor: pointer; }
  body[data-bg-preview] header::after {
    content: 'クリックで解除'; position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    font-size: 11px; color: var(--dim); pointer-events: none;
  }
  .night-deco { display: none; position: absolute; inset: 0; pointer-events: none; }
  body[data-night="true"] .night-deco { display: block; }
  .night-moon {
    position: absolute; top: 12%; right: 16%;
    width: 88px; height: 88px;
    filter: drop-shadow(0 0 14px rgba(240,210,70,.55)) drop-shadow(0 0 40px rgba(240,210,70,.2));
  }
  .night-star {
    position: absolute; border-radius: 50%; background: #f0d890;
    animation-name: night-twinkle;
    animation-duration: var(--d, 2s);
    animation-delay: var(--delay, 0s);
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    animation-direction: alternate;
  }
  .night-cloud {
    position: absolute; left: 0; pointer-events: none; display: none;
    animation-name: cloud-drift;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
  body[data-night="true"] .night-cloud { display: block; }
  @keyframes cloud-drift {
    from { transform: translateX(-220px); }
    to   { transform: translateX(calc(100vw + 220px)); }
  }
  @keyframes night-twinkle {
    from { opacity: .04; transform: scale(.25); box-shadow: 0 0 0 rgba(220,180,40,0); }
    to   { opacity: 1;   transform: scale(1.7); box-shadow: 0 0 8px 3px rgba(220,180,40,.7); }
  }

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  body { background: var(--bg); color: var(--text); font-family: 'Noto Sans JP', sans-serif; min-height: 100vh; overflow-x: hidden; }
  html { overflow-x: hidden; }

  /* HEADER */
  header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(13,13,13,0.95); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: env(safe-area-inset-top) 24px 0;
    height: calc(56px + env(safe-area-inset-top));
    display: flex; align-items: center; justify-content: space-between;
  }
  .logo { font-family: 'Noto Serif JP', serif; font-size: 24px; font-weight: 900; color: var(--accent); letter-spacing: .15em; }
  .logo span { color: var(--dim); font-size: 12px; font-weight: 400; margin-left: 12px; }
  nav { display: flex; gap: 4px; overflow-x: auto; flex-wrap: nowrap; min-width: 0; flex-shrink: 1; }
  nav button { white-space: nowrap; flex-shrink: 0; }
  nav button {
    background: none; border: none; color: var(--dim);
    font-family: 'Noto Sans JP', sans-serif; font-size: 13px;
    padding: 6px 14px; border-radius: 6px; cursor: pointer; transition: all .2s;
  }
  nav button:hover { color: var(--text); background: var(--surface2); }
  nav button.active { color: var(--accent); background: var(--surface2); }
  /* サブナビ（戦績タブ内） */
  .subnav {
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 0 24px; height: 40px;
    display: flex; align-items: center; gap: 4px; overflow-x: auto; flex-wrap: nowrap;
  }
  .subnav button {
    background: none; border: none; color: var(--dim);
    font-family: 'Noto Sans JP', sans-serif; font-size: 12px;
    padding: 5px 14px; border-radius: 6px; cursor: pointer; transition: all .2s;
    white-space: nowrap; flex-shrink: 0;
  }
  .subnav button:hover { color: var(--text); background: var(--surface2); }
  .subnav button.active { color: var(--accent); font-weight: 700; border-bottom: 2px solid var(--accent); border-radius: 0; }

  /* ギャラリー ハブ */
  .gallery-hub { display: flex; flex-direction: column; gap: 12px; padding: 8px 0; }
  .gallery-hub-btn {
    position: relative;
    background: var(--surface2); border: 1px solid var(--border);
    color: var(--text); font-family: 'Noto Sans JP', sans-serif; font-size: 18px; font-weight: 700;
    padding: 20px 28px; border-radius: 12px; cursor: pointer; transition: all .2s;
    width: 100%; text-align: left;
  }
  .gallery-hub-btn:hover { background: var(--border); border-color: var(--accent); color: var(--accent); }
  .gallery-hub-badge {
    display: block; font-size: 11px; font-weight: 400; color: var(--dim); margin-top: 6px;
  }
  /* 散歩ログ */
  .walk-list-item {
    padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px;
    margin-bottom: 10px; cursor: pointer; transition: all .15s;
  }
  .walk-list-item:hover { border-color: var(--accent); background: var(--surface2); }
  .walk-list-title { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
  .walk-list-meta { font-size: 12px; color: var(--dim); }
  .walk-list-marks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .walk-list-mark { display: flex; align-items: center; gap: 4px; }
  .walk-list-mark-addr { font-size: 11px; color: var(--dim); }
  .walk-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
  .walk-back-btn {
    background: none; border: 1px solid var(--border); color: var(--text);
    border-radius: 8px; padding: 6px 12px; font-size: 13px; cursor: pointer;
  }
  .walk-back-btn:hover { border-color: var(--accent); color: var(--accent); }
  .walk-detail-title { font-size: 16px; font-weight: 700; }
  .walk-detail-meta { font-size: 12px; color: var(--dim); margin-bottom: 12px; }
  .walk-sort-bar { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
  .walk-sort-btn {
    background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
    color: var(--dim); font-family: 'Noto Sans JP', sans-serif; font-size: 12px;
    padding: 4px 12px; cursor: pointer; transition: all .15s;
  }
  .walk-sort-btn.active { border-color: var(--accent); color: var(--accent); }
  .walk-sort-btn.walk-sort-dir { min-width: 36px; }
  .walk-all-routes-btn {
    display: block; width: 100%; margin-bottom: 12px;
    background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
    color: var(--text); font-family: 'Noto Sans JP', sans-serif; font-size: 13px;
    padding: 8px 14px; cursor: pointer; text-align: left; transition: all .15s;
  }
  .walk-all-routes-btn:hover { border-color: var(--accent); color: var(--accent); }
  .walk-map { height: 400px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
  .walk-km-list { margin-top: 12px; }
  .walk-km-list-title { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
  .walk-km-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px; cursor: pointer; transition: background .15s;
  }
  .walk-km-item:hover { background: var(--surface2); }
  .walk-km-badge {
    font-size: 11px; font-weight: 700; color: var(--bg);
    background: var(--accent); border-radius: 4px; padding: 2px 6px; white-space: nowrap;
  }
  .walk-km-time { font-size: 13px; color: var(--dim); white-space: nowrap; min-width: 42px; }
  .walk-km-addr { font-size: 13px; color: var(--text); }
  /* じゃれ本リスト */
  .jare-add-btn {
    float: right; background: var(--accent); border: none; color: var(--bg);
    font-family: 'Noto Sans JP', sans-serif; font-size: 13px; font-weight: 700;
    padding: 4px 14px; border-radius: 6px; cursor: pointer;
  }
  .jare-add-btn:hover { opacity: .85; }
  .jare-empty { color: var(--dim); text-align: center; padding: 32px 0; font-size: 14px; }
  .jare-group { margin-bottom: 16px; }
  .jare-group-header {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 700; color: var(--accent); letter-spacing: .06em;
    padding: 7px 8px; border-bottom: 1px solid var(--border);
    cursor: pointer; border-radius: 6px 6px 0 0; transition: background .15s;
  }
  .jare-group-header:hover { background: var(--surface2); }
  .jare-group-count { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--dim); }
  .jare-group-titles { display: none; }
  .jare-group-titles.open { display: block; }
  .jare-title-row {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 8px; border-radius: 6px; transition: background .15s;
  }
  .jare-title-row:hover { background: var(--surface2); }
  .jare-title-text { flex: 1; font-size: 14px; color: var(--text); cursor: pointer; min-width: 0; }
  .jare-title-text:hover { color: var(--accent); }
  .jare-share-btn {
    flex-shrink: 0; background: none; border: 1px solid var(--border); color: var(--text);
    font-family: 'Noto Sans JP', sans-serif; font-size: 12px; padding: 4px 12px;
    border-radius: 6px; cursor: pointer; transition: all .15s; white-space: nowrap;
  }
  .jare-share-btn:hover { border-color: var(--accent); color: var(--accent); }
  .jare-crown { font-size: 13px; margin-right: 3px; }
  .jare-winner-row { display: flex; align-items: center; gap: 8px; padding: 4px 0 6px; }
  .jare-winner-row label { font-size: 13px; color: var(--text); cursor: pointer; display: flex; align-items: center; gap: 6px; }
  .jare-winner-row input[type=checkbox] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
  .jare-combo-select { width: 100%; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: 'Noto Sans JP', sans-serif; font-size: 13px; padding: 6px 8px; border-radius: 6px; box-sizing: border-box; }
  .jare-item-arrow { font-size: 10px; color: var(--dim); transition: transform .2s; }
  .jare-item-arrow.open { transform: rotate(90deg); }
  .jare-admin-btns { display: flex; gap: 6px; flex-shrink: 0; }
  .jare-edit-btn, .jare-del-btn {
    background: none; border: 1px solid var(--border); color: var(--dim);
    font-size: 11px; padding: 2px 10px; border-radius: 4px; cursor: pointer;
  }
  .jare-edit-btn:hover { color: var(--accent); border-color: var(--accent); }
  .jare-del-btn:hover { color: var(--red); border-color: var(--red); }
  .jare-order-btn {
    background: none; border: 1px solid var(--border); color: var(--dim);
    font-size: 11px; padding: 2px 7px; border-radius: 4px; cursor: pointer; line-height: 1.2;
  }
  .jare-order-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent); }
  .jare-order-btn:disabled { opacity: .3; cursor: default; }
  /* じゃれ本 詳細ページ */
  .jare-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
  .jare-back-btn {
    background: none; border: 1px solid var(--border); color: var(--dim);
    font-family: 'Noto Sans JP', sans-serif; font-size: 13px; padding: 6px 14px;
    border-radius: 6px; cursor: pointer; transition: all .15s;
  }
  .jare-back-btn:hover { border-color: var(--accent); color: var(--accent); }
  .jare-detail-meta { font-size: 13px; color: var(--accent); font-weight: 700; letter-spacing: .06em; }
  .jare-detail-title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
  .jare-detail-title { font-size: 18px; font-weight: 700; color: var(--text); flex: 1; }
  .jare-para {
    display: flex; gap: 8px; font-size: 14px; color: var(--text);
    padding: 12px 12px 16px; background: var(--surface2); border-radius: 6px; line-height: 1.9;
  }
  .jare-para-num { font-size: 13px; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 2px; }
  .jare-para-text { white-space: pre-wrap; flex: 1; }
  .jare-para-sep { border: none; border-top: 1px dashed var(--border); margin: 6px 0; }

  /* じゃれ本モーダル */
  #jare-modal {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.6);
    z-index: 300; align-items: flex-start; justify-content: center; padding: 24px 16px; overflow-y: auto;
  }
  #jare-modal.open { display: flex; }
  .jare-modal-box {
    background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
    padding: 28px 24px; width: min(560px,100%); margin: auto;
  }
  .jare-modal-box h3 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 20px; }
  .jare-form-row { margin-bottom: 14px; display: flex; flex-direction: column; gap: 5px; }
  .jare-form-row label { font-size: 12px; color: var(--dim); }
  .jare-form-row input, .jare-form-row textarea {
    background: var(--surface2); border: 1px solid var(--border); border-radius: 6px;
    color: var(--text); font-family: 'Noto Sans JP', sans-serif; font-size: 14px;
    padding: 8px 12px; width: 100%; resize: none; box-sizing: border-box; overflow-y: hidden;
  }
  .jare-form-row input:focus, .jare-form-row textarea:focus { outline: none; border-color: var(--accent); }
  .jare-para-label { font-size: 12px; color: var(--dim); margin: 14px 0 6px; font-weight: 700; }
  .jare-modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
  .jare-cancel-btn {
    background: none; border: 1px solid var(--border); color: var(--dim);
    font-family: 'Noto Sans JP', sans-serif; font-size: 13px; padding: 7px 20px; border-radius: 6px; cursor: pointer;
  }
  .jare-cancel-btn:hover { color: var(--text); border-color: var(--text); }
  .jare-submit-btn {
    background: var(--accent); border: none; color: var(--bg);
    font-family: 'Noto Sans JP', sans-serif; font-size: 13px; font-weight: 700; padding: 7px 24px; border-radius: 6px; cursor: pointer;
  }
  .jare-submit-btn:hover { opacity: .85; }
  #jare-modal-status { font-size: 13px; color: var(--red); margin-top: 8px; text-align: right; }

  /* じゃれ本 OCR */
  .jare-ocr-section { border: 1px solid var(--border); border-radius: 8px; margin: 16px 0; overflow: hidden; }
  .jare-ocr-toggle {
    width: 100%; background: var(--surface2); border: none; color: var(--text);
    font-family: 'Noto Sans JP', sans-serif; font-size: 13px; font-weight: 700;
    padding: 10px 14px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    text-align: left;
  }
  .jare-ocr-toggle:hover { background: var(--border); }
  .jare-ocr-arrow { font-size: 10px; color: var(--dim); transition: transform .2s; display: inline-block; }
  .jare-ocr-arrow.open { transform: rotate(180deg); }
  .jare-ocr-body { display: none; padding: 14px; }
  .jare-ocr-body.open { display: block; }
  .jare-ocr-note { font-size: 11px; color: var(--dim); margin-bottom: 12px; line-height: 1.8; }
  .jare-prompt-box {
    background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
    padding: 10px 12px; display: flex; gap: 8px; align-items: flex-start; margin-bottom: 4px;
  }
  .jare-prompt-text { font-size: 11px; color: var(--dim); line-height: 1.6; flex: 1; min-width: 0; word-break: break-all; white-space: pre-wrap; }
  .jare-prompt-copy-btn {
    flex-shrink: 0; background: var(--surface2); border: 1px solid var(--border); color: var(--text);
    font-family: 'Noto Sans JP', sans-serif; font-size: 11px; padding: 4px 12px;
    border-radius: 4px; cursor: pointer; white-space: nowrap;
  }
  .jare-prompt-copy-btn:hover { border-color: var(--accent); color: var(--accent); }
  .jare-ocr-run-btn {
    width: 100%; background: var(--surface2); border: 1px solid var(--accent); color: var(--accent);
    font-family: 'Noto Sans JP', sans-serif; font-size: 14px; font-weight: 700;
    padding: 10px; border-radius: 6px; cursor: pointer; transition: all .2s;
  }
  .jare-ocr-run-btn:hover:not(:disabled) { background: var(--accent); color: var(--bg); }
  .jare-ocr-run-btn:disabled { opacity: .5; cursor: not-allowed; }
  .jare-ocr-status { font-size: 12px; margin-top: 10px; min-height: 18px; line-height: 1.6; white-space: pre-wrap; }
  .jare-ocr-status.ok { color: var(--green); }
  .jare-ocr-status.err { color: var(--red); }
  /* PERIOD FILTER BAR */
  .period-bar {
    background: var(--surface); border-bottom: 1px solid var(--border);
    padding: 10px 24px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  }
  .period-bar label { font-size: 12px; color: var(--dim); }
  .period-bar input[type=date] {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 6px; color: var(--text); font-size: 13px;
    padding: 5px 10px; font-family: 'Noto Sans JP', sans-serif; cursor: pointer;
  }
  .period-bar input[type=date]:focus { outline: none; border-color: var(--accent); }
  .period-sep { color: var(--dim); }
  .period-btns { display: flex; gap: 6px; margin-left: 8px; }
  .period-preset {
    background: var(--surface2); border: 1px solid var(--border);
    border-radius: 6px; color: var(--dim); font-size: 11px;
    padding: 4px 10px; cursor: pointer; transition: all .2s;
    font-family: 'Noto Sans JP', sans-serif;
  }
  .period-preset:hover { border-color: var(--accent); color: var(--text); }

  /* LAYOUT */
  main { max-width: 1200px; margin: 0 auto; padding: 28px 24px; }
  .section { display: none; }
  .section.active { display: block; }

  /* CARD */
  .card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-bottom: 20px; }
  .card-title {
    font-family: 'Noto Serif JP', serif; font-size: 13px; color: var(--accent);
    letter-spacing: .2em; margin-bottom: 20px; display: flex; align-items: center; gap: 8px;
  }
  .card-title::before { content:''; display:inline-block; width:3px; height:14px; background:var(--accent); border-radius:2px; }

  .swarm-pwa-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface2); border: 1px solid var(--accent); border-radius: 10px;
    padding: 12px 16px; margin-bottom: 16px;
    text-decoration: none; color: var(--accent); font-size: 13px; font-weight: 700;
    transition: background .2s;
  }
  .swarm-pwa-banner:hover { background: rgba(122,186,110,.12); }
  .swarm-pwa-banner-arrow { font-size: 15px; }

  /* RANKING TABLE */
  .rank-table { width: 100%; border-collapse: collapse; font-size: 13px; }
  .rank-table th { padding: 8px 12px; text-align: right; color: var(--dim); font-weight: 400; font-size: 11px; border-bottom: 1px solid var(--border); white-space: nowrap; }
  .rank-table th:first-child, .rank-table th:nth-child(2) { text-align: left; }
  .rank-table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--border); white-space: nowrap; }
  .rank-table td:first-child, .rank-table td:nth-child(2) { text-align: left; }
  .rank-table tr:last-child td { border-bottom: none; }
  .rank-table tr:hover td { background: var(--surface2); }
  .rank-badge { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%; font-size:11px; font-weight:700; }
  .rank-badge.r1 { background:#c8a200; color:#000; }
  .rank-badge.r2 { background:#9e9e9e; color:#000; }
  .rank-badge.r3 { background:#8d5e2a; color:#fff; }
  .rank-badge.rn { background:var(--surface2); color:var(--dim); }
  .pos { color: var(--green); } .neg { color: var(--red); }
  .name-cell { font-weight: 700; font-size: 14px; }
  .rate-cell { font-weight: 700; font-variant-numeric: tabular-nums; }

  /* MEMBER SORT */
  .member-sort-wrap { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
  .member-sort-label { font-size:12px; color:var(--dim); }
  #member-sort {
    background:var(--surface2); border:1px solid var(--border); border-radius:6px;
    color:var(--text); font-family:'Noto Sans JP',sans-serif; font-size:12px;
    padding:5px 10px; cursor:pointer; outline:none;
  }
  #member-sort:focus { border-color:var(--accent); }

  /* MEMBER GRID */
  .member-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 12px; margin-bottom: 24px; }
  .member-btn { background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:14px 16px; cursor:pointer; transition:all .2s; text-align:left; }
  .member-btn:hover { border-color: var(--accent); }
  .member-btn.active { border-color: var(--accent); background: var(--surface2); }
  .member-btn .m-name { font-weight:700; font-size:15px; color:var(--text); }
  .member-btn .m-score { font-size:18px; font-weight:700; margin-top:4px; }
  .member-btn .m-count { font-size:11px; color:var(--dim); margin-top:2px; }

  /* DETAIL */
  .detail-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
  @media(max-width:640px){ .detail-grid { grid-template-columns:1fr; } }
  .stat-block { background:var(--surface2); border-radius:10px; padding:16px; }
  .stat-block-title { font-size:11px; color:var(--dim); letter-spacing:.15em; margin-bottom:12px; }
  .stat-row { display:flex; justify-content:space-between; align-items:center; padding:5px 0; border-bottom:1px solid var(--border); font-size:13px; }
  .stat-row:last-child { border-bottom:none; }
  .stat-label { color:var(--dim); } .stat-value { font-weight:700; }
  .rank-bar-wrap { margin-top:8px; }
  .rank-bar-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; font-size:12px; }
  .rank-bar-label { width:28px; color:var(--dim); flex-shrink:0; }
  .rank-bar-track { flex:1; background:var(--border); border-radius:4px; height:8px; overflow:hidden; }
  .rank-bar-fill { height:100%; border-radius:4px; transition:width .6s ease; }
  .rank-bar-pct { width:80px; text-align:right; color:var(--dim); flex-shrink:0; }
  .rank-bar-cnt { font-size:10px; color:var(--dim); margin-left:4px; opacity:.75; }

  /* GRAPH CONTROLS */
  .graph-controls { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; align-items:center; }
  .ctrl-btn {
    background:var(--surface2); border:1px solid var(--border); border-radius:6px;
    color:var(--dim); font-family:'Noto Sans JP',sans-serif; font-size:12px;
    padding:5px 12px; cursor:pointer; transition:all .2s;
  }
  .ctrl-btn:hover { border-color:var(--accent); color:var(--text); }
  .ctrl-btn.active { border-color:var(--accent); color:var(--accent); background:var(--surface); }
  .ctrl-sep { width:1px; height:20px; background:var(--border); flex-shrink:0; }
  .chart-wrap { position:relative; height:360px; }
  .member-charts-section { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-top:20px; }
  @media(max-width:768px){ .member-charts-section { grid-template-columns:1fr; } }
  .member-chart-block { background:var(--surface2); border-radius:10px; padding:16px; }
  .chart-wrap-sm { position:relative; height:200px; }

  /* 直近N局 */
  .member-recent { margin-top: 20px; }
  .recent-games { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
  .recent-game { background: var(--surface2); border-radius: 6px; padding: 6px 8px; text-align: center; min-width: 50px; border-bottom: 2px solid transparent; }
  .recent-game.rank1 { border-bottom-color: #4caf82; }
  .recent-game.rank2 { border-bottom-color: #c8a96e; }
  .recent-game.rank3 { border-bottom-color: #e69a30; }
  .recent-game.rank4 { border-bottom-color: #e63946; }
  .rg-rank { font-size: 10px; color: var(--dim); }
  .rg-score { font-size: 13px; font-weight: 700; }
  .rg-type { font-size: 10px; color: var(--dim); margin-top: 1px; }

  /* 対戦成績 */
  .member-h2h { margin-top: 20px; }
  .h2h-grid { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
  .h2h-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
  .h2h-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
  .h2h-header-label { flex: 1; font-size: 10px; color: var(--dim); }
  .h2h-name { width: 64px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .h2h-bar-wrap { flex: 1; background: var(--border); border-radius: 4px; height: 8px; overflow: hidden; }
  .h2h-bar-fill { height: 100%; background: var(--accent); border-radius: 4px; transition: width .5s ease; }
  .h2h-pct { width: 36px; text-align: right; font-size: 12px; flex-shrink: 0; }
  .h2h-score-head { width: 40px; font-size: 10px; color: var(--dim); flex-shrink: 0; text-align: right; }
  .h2h-score { width: 40px; font-size: 12px; font-weight: 700; flex-shrink: 0; text-align: right; }
  .h2h-games { width: 30px; font-size: 11px; color: var(--dim); flex-shrink: 0; text-align: right; }

  /* HISTORY TABLE */
  .hist-table { width:100%; border-collapse:collapse; font-size:12px; }
  .hist-table th { padding:7px 10px; text-align:center; color:var(--dim); font-weight:400; font-size:11px; border-bottom:1px solid var(--border); }
  .hist-table td { padding:8px 10px; text-align:center; border-bottom:1px solid var(--border); }
  .hist-table tr:last-child td { border-bottom:none; }
  .hist-table tr:hover td { background:var(--surface2); }
  .hist-date { color:var(--dim); font-size:11px; }

  .empty { text-align:center; padding:60px 20px; color:var(--dim); font-size:14px; }

  /* SCHEDULE CALENDAR */
  .cal-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
  .cal-month-label { font-family:'Noto Serif JP',serif; font-size:15px; color:var(--accent); letter-spacing:.05em; }
  .cal-nav { background:none; border:1px solid var(--border); color:var(--dim); border-radius:6px; padding:4px 12px; cursor:pointer; font-size:16px; transition:all .2s; }
  .cal-nav:hover { border-color:var(--accent); color:var(--text); }
  .cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:4px; }
  .cal-dayname { text-align:center; font-size:11px; color:var(--dim); padding:4px 0 8px; }
  .cal-dayname.sun { color:#e06c75; }
  .cal-dayname.sat { color:#61afef; }
  .cal-cell { border-radius:8px; padding:8px 6px 10px; min-height:64px; display:flex; flex-direction:column; gap:4px; background:var(--surface2); border:1px solid transparent; }
  .cal-cell.empty-cell { background:none; border-color:transparent; }
  .cal-cell.mark-open  { background:rgba(152,195,121,.12); border-color:rgba(152,195,121,.35); }
  .cal-cell.mark-half  { background:rgba(97,175,239,.10); border-color:rgba(97,175,239,.30); }
  .cal-cell.mark-short { background:rgba(229,192,123,.12); border-color:rgba(229,192,123,.35); }
  .cal-cell.mark-closed{ background:rgba(224,108,117,.10); border-color:rgba(224,108,117,.25); }
  .cal-cell.today { box-shadow:0 0 0 2px var(--accent); }
  .cal-daynum { font-size:11px; color:var(--dim); line-height:1; }
  .cal-daynum.sun { color:#e06c75; }
  .cal-daynum.sat { color:#61afef; }
  .cal-holiday-name { font-size:9px; color:#e06c75; line-height:1.2; word-break:keep-all; overflow:hidden; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; }
  .cal-mark { font-size:17px; line-height:1; text-align:center; }
  .cal-mark.mark-open  { color:#98c379; }
  .cal-mark.mark-half  { color:#61afef; }
  .cal-mark.mark-short { color:#e5c07b; }
  .cal-mark.mark-closed{ color:#e06c75; }
  .cal-note { font-size:10px; color:var(--dim); line-height:1.3; }
  .cal-rsv-badge { margin-top:auto; font-size:10px; color:var(--accent); font-weight:700; line-height:1; }
  .cal-legend { display:flex; gap:16px; flex-wrap:wrap; margin-top:16px; padding-top:14px; border-top:1px solid var(--border); }
  .cal-legend-item { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--dim); }
  @media(max-width:640px){
    .cal-cell { min-height:52px; padding:6px 4px 8px; gap:3px; overflow:hidden; }
    .cal-mark { font-size:15px; }
    .cal-note { font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%; }
    .cal-holiday-name { -webkit-line-clamp:1; }
    .cal-daynum { font-size:10px; }
    .cal-rsv-badge { font-size:9px; }
    .cal-legend { gap:10px; margin-top:12px; }
    .cal-legend-item { font-size:11px; }
  }

  /* RESERVATION MODALS */
  .rsv-overlay { display:none; position:fixed; inset:0; z-index:1000; background:rgba(0,0,0,.75); align-items:center; justify-content:center; padding:16px; }
  .rsv-overlay.open { display:flex; }
  .rsv-modal { background:var(--surface); border:1px solid var(--border); border-radius:14px; width:100%; max-width:480px; max-height:85vh; overflow-y:auto; padding:24px; }
  .rsv-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
  .rsv-title { font-family:'Noto Serif JP',serif; font-size:16px; color:var(--accent); letter-spacing:.1em; }
  .rsv-close { background:none; border:none; color:var(--dim); font-size:20px; cursor:pointer; padding:4px 8px; border-radius:6px; transition:all .2s; }
  .rsv-close:hover { color:var(--text); background:var(--surface2); }
  .rsv-screen { display:none; }
  .rsv-screen.active { display:block; }
  .rsv-date-info { background:var(--surface2); border-radius:10px; padding:14px 16px; margin-bottom:16px; display:flex; align-items:center; gap:12px; }
  .rsv-date-label { font-size:15px; font-weight:700; }
  .rsv-date-note { font-size:12px; color:var(--dim); margin-top:2px; }
  .rsv-section-title { font-size:12px; color:var(--dim); letter-spacing:.1em; margin-bottom:10px; }
  .rsv-card { background:var(--surface2); border-radius:8px; padding:12px 14px; margin-bottom:8px; }
  .rsv-card-name { font-size:14px; font-weight:700; margin-bottom:6px; }
  .rsv-card-cats { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:4px; }
  .rsv-tag { background:rgba(200,169,110,.15); border:1px solid rgba(200,169,110,.3); border-radius:4px; font-size:11px; color:var(--accent); padding:2px 8px; }
  .rsv-card-note { font-size:12px; color:var(--dim); }
  .rsv-card-actions { display:flex; gap:8px; margin-top:8px; }
  .rsv-edit-btn { padding:5px 12px; border-radius:6px; border:1px solid var(--accent); background:transparent; color:var(--accent); font-size:12px; cursor:pointer; }
  .rsv-cancel-btn { padding:5px 12px; border-radius:6px; border:1px solid var(--red); background:transparent; color:var(--red); font-size:12px; cursor:pointer; }
  .rsv-empty { text-align:center; padding:20px; color:var(--dim); font-size:13px; }
  .rsv-btn-row { display:flex; gap:10px; margin-top:16px; }
  .rsv-btn { flex:1; padding:11px; border-radius:8px; font-family:'Noto Sans JP',sans-serif; font-size:14px; cursor:pointer; transition:all .2s; border:1px solid; }
  .rsv-btn.primary { background:var(--accent); color:#000; border-color:var(--accent); font-weight:700; }
  .rsv-btn.primary:hover { opacity:.85; }
  .rsv-btn.primary:disabled { opacity:.5; cursor:not-allowed; }
  .rsv-btn.secondary { background:none; color:var(--text); border-color:var(--border); }
  .rsv-btn.secondary:hover { border-color:var(--accent); color:var(--accent); }
  .rsv-btn.x-post { background:none; color:var(--text); border-color:var(--border); flex:none; padding:11px 18px; }
  .rsv-btn.x-post:hover { border-color:var(--accent); color:var(--accent); }
  .rsv-form-group { margin-bottom:16px; }
  .rsv-label { font-size:12px; color:var(--dim); margin-bottom:7px; display:block; }
  .rsv-input { width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:14px; padding:10px 12px; font-family:'Noto Sans JP',sans-serif; box-sizing:border-box; }
  .rsv-input:focus { outline:none; border-color:var(--accent); }
  .rsv-checkbox-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
  .rsv-checkbox-item { display:flex; align-items:center; gap:8px; background:var(--surface2); border-radius:8px; padding:10px 12px; cursor:pointer; border:1px solid transparent; transition:all .2s; }
  .rsv-checkbox-item:hover { border-color:var(--border); }
  .rsv-checkbox-item input[type=checkbox] { accent-color:var(--accent); width:15px; height:15px; cursor:pointer; flex-shrink:0; }
  .rsv-checkbox-item span { font-size:13px; }
  .rsv-other-wrap { display:none; margin-top:8px; }
  .rsv-textarea { width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:8px; color:var(--text); font-size:14px; padding:10px 12px; font-family:'Noto Sans JP',sans-serif; min-height:80px; resize:vertical; box-sizing:border-box; }
  .rsv-textarea:focus { outline:none; border-color:var(--accent); }
  .rsv-confirm-row { display:flex; justify-content:space-between; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--border); font-size:13px; gap:12px; }
  .rsv-confirm-row:last-child { border-bottom:none; }
  .rsv-confirm-key { color:var(--dim); flex-shrink:0; }
  .rsv-confirm-val { color:var(--text); text-align:right; word-break:break-word; }
  .rsv-list-item { padding:12px 14px; border-bottom:1px solid var(--border); cursor:pointer; transition:background .2s; border-radius:8px; }
  .rsv-list-item:hover { background:var(--surface2); }
  .rsv-list-date { font-size:14px; font-weight:700; margin-bottom:3px; }
  .rsv-list-count { font-size:12px; color:var(--dim); }
  .cal-cell.clickable { cursor:pointer; }
  .cal-cell.clickable:hover { border-color:var(--accent) !important; }
  .rsv-list-btn-wrap { margin-bottom:12px; display:flex; justify-content:flex-end; gap:8px; }

  /* LOADING */
  #loading { position:fixed; inset:0; background:var(--bg); display:flex; flex-direction:column; align-items:center; justify-content:center; z-index:9999; transition:opacity .4s; }
  #loading .ld-logo { font-family:'Noto Serif JP',serif; font-size:36px; font-weight:900; color:var(--accent); margin-bottom:24px; letter-spacing:.2em; }
  #loading .ld-bar { width:min(200px,80vw); height:2px; background:var(--border); border-radius:2px; overflow:hidden; }
  #loading .ld-bar-inner { height:100%; background:var(--accent); animation:ldAnim 1.2s ease-in-out infinite; }
  @keyframes ldAnim { 0%{width:0%;margin-left:0} 50%{width:60%} 100%{width:0%;margin-left:100%} }
  #error-msg { display:none; background:rgba(230,57,70,.1); border:1px solid var(--red); border-radius:10px; padding:20px 24px; margin-bottom:24px; font-size:13px; color:var(--red); }
  ::-webkit-scrollbar { width:6px; }
  ::-webkit-scrollbar-track { background:var(--bg); }
  ::-webkit-scrollbar-thumb { background:var(--border); border-radius:3px; }

  /* BOARD */
  .board-form { display:flex; flex-direction:column; gap:10px; margin-bottom:24px; }
  .board-form textarea {
    width:100%; background:var(--surface2); border:1px solid var(--border);
    border-radius:8px; color:var(--text); font-family:'Noto Sans JP',sans-serif;
    font-size:13px; padding:10px 14px; resize:vertical; min-height:80px;
    transition:border-color .2s; box-sizing:border-box;
  }
  .board-form textarea:focus { outline:none; border-color:var(--accent); }
  .board-form-footer { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  .board-anon-label { font-size:12px; color:var(--dim); }
  .board-anon-name { font-size:12px; color:var(--accent); font-weight:700; }
  .board-submit {
    margin-left:auto; background:var(--surface2); border:1px solid var(--border);
    border-radius:8px; color:var(--text); font-family:'Noto Sans JP',sans-serif;
    font-size:13px; padding:8px 24px; cursor:pointer; transition:all .2s;
  }
  .board-submit:hover { border-color:var(--accent); color:var(--accent); }
  .board-submit:disabled { cursor:not-allowed; opacity:.4; }
  .board-comments { display:flex; flex-direction:column; gap:10px; }
  .board-comment {
    background:var(--surface2); border-radius:10px; padding:12px 16px;
    border-left:3px solid var(--border);
  }
  .board-comment-header { display:flex; align-items:center; gap:10px; margin-bottom:6px; }
  .board-comment-name { font-size:12px; color:var(--accent); font-weight:700; }
  .board-comment-time { font-size:11px; color:var(--dim); }
  .board-delete-btn { margin-left:auto; background:none; border:none; color:var(--dim); font-size:11px; cursor:pointer; padding:2px 6px; border-radius:4px; }
  .board-delete-btn:hover { color:var(--red); background:rgba(230,57,70,.1); }
  .board-comment-body { font-size:13px; line-height:1.6; white-space:pre-wrap; word-break:break-all; }
  .board-empty { text-align:center; padding:40px 0; color:var(--dim); font-size:13px; }
  #board-status { font-size:12px; color:var(--dim); padding:4px 0; }

  /* FEEDBACK FORM */
  .feedback-form { display:flex; flex-direction:column; gap:16px; max-width:560px; }
  .feedback-form label { font-size:12px; color:var(--dim); letter-spacing:.1em; margin-bottom:4px; display:block; }
  .feedback-form select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    padding: 8px 10px;
    font-size: 13px;
    width: 100%;
    cursor: pointer;
  }
  .feedback-form select:focus { outline: none; border-color: var(--accent); }
  .feedback-form input[type=text],
  .feedback-form textarea {
    width:100%; background:var(--surface2); border:1px solid var(--border);
    border-radius:8px; color:var(--text); font-family:'Noto Sans JP',sans-serif;
    font-size:13px; padding:10px 14px; resize:vertical; transition:border-color .2s;
  }
  .feedback-form input[type=text]:focus,
  .feedback-form textarea:focus { outline:none; border-color:var(--accent); }
  .feedback-form textarea { min-height:120px; }
  .feedback-submit {
    align-self:flex-start; background:var(--surface2); border:1px solid var(--border);
    border-radius:8px; color:var(--text); font-family:'Noto Sans JP',sans-serif;
    font-size:13px; padding:9px 28px; cursor:pointer; transition:all .2s;
  }
  .feedback-submit:hover { border-color:var(--accent); color:var(--accent); }
  .feedback-submit:disabled { cursor:not-allowed; opacity:.4; color:var(--dim); border-color:var(--border); }
  #fb-status { font-size:13px; padding:8px 0; }
  .fb-file-label {
    display:inline-flex; align-items:center; gap:6px;
    background:var(--surface2); border:1px solid var(--border); border-radius:8px;
    color:var(--dim); font-size:13px; padding:8px 16px; cursor:pointer; transition:all .2s;
  }
  .fb-file-label:hover { border-color:var(--accent); color:var(--text); }
  .fb-file-input { display:none; }
  .fb-file-list { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
  .fb-file-chip {
    display:inline-flex; align-items:center; gap:6px;
    background:var(--surface2); border:1px solid var(--border); border-radius:20px;
    font-size:12px; color:var(--dim); padding:4px 10px; max-width:220px;
  }
  .fb-file-chip span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .fb-file-remove { cursor:pointer; font-size:14px; color:var(--dim); flex-shrink:0; line-height:1; }
  .fb-file-remove:hover { color:var(--red); }
  .fb-preview-wrap { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
  .fb-preview-img { width:72px; height:72px; object-fit:cover; border-radius:6px; border:1px solid var(--border); }

  /* flatpickr カスタマイズ */
  .flatpickr-calendar {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
    font-family: 'Noto Sans JP', sans-serif !important;
  }
  .flatpickr-month, .flatpickr-weekdays, .flatpickr-weekday {
    background: var(--surface) !important;
    color: var(--dim) !important;
    fill: var(--dim) !important;
  }
  .flatpickr-current-month, .flatpickr-current-month input.cur-year {
    color: var(--accent) !important;
    font-family: 'Noto Serif JP', serif !important;
  }
  .flatpickr-prev-month svg, .flatpickr-next-month svg { fill: var(--dim) !important; }
  .flatpickr-prev-month:hover svg, .flatpickr-next-month:hover svg { fill: var(--accent) !important; }
  .flatpickr-day { color: var(--text) !important; border-radius: 6px !important; }
  .flatpickr-day:hover { background: var(--surface2) !important; border-color: var(--accent) !important; }
  .flatpickr-day.selected, .flatpickr-day.selected:hover {
    background: var(--accent) !important; border-color: var(--accent) !important; color: #000 !important;
  }
  .flatpickr-day.today { border-color: var(--accent) !important; }
  .flatpickr-day.flatpickr-disabled { color: var(--border) !important; }
  .numInputWrapper span { border-color: var(--border) !important; }
  .numInputWrapper span svg { fill: var(--dim) !important; }

  /* ── 連番募集 ── */
  .renban-header-row { display:flex; justify-content:flex-end; margin-bottom:16px; }
  .renban-list { display:flex; flex-direction:column; gap:10px; }
  .renban-item {
    background:var(--surface2); border:1px solid var(--border); border-radius:10px;
    padding:14px 16px; cursor:pointer; transition:all .2s;
  }
  .renban-item:hover { border-color:var(--accent); }
  .renban-item-title { font-size:15px; font-weight:700; margin-bottom:4px; }
  .renban-item-meta { display:flex; flex-wrap:wrap; gap:10px; font-size:12px; color:var(--dim); }
  .renban-item-tag {
    display:inline-block; background:rgba(200,169,110,.12); border:1px solid rgba(200,169,110,.3);
    border-radius:4px; font-size:11px; color:var(--accent); padding:2px 8px;
  }
  .renban-empty { text-align:center; padding:48px 0; color:var(--dim); font-size:14px; }
  .renban-expired-section { margin-top:12px; text-align:right; }
  .renban-expired-toggle {
    background:none; border:none; cursor:pointer;
    font-size:11px; color:var(--dim); padding:4px 8px;
    opacity:.6; transition:opacity .15s; text-decoration:underline; text-underline-offset:2px;
  }
  .renban-expired-toggle:hover { opacity:1; }
  /* 募集一覧 */
  .boshu-section { margin-bottom:28px; }
  .boshu-section:last-child { margin-bottom:0; }
  .boshu-section-heading {
    font-family:'Noto Serif JP',serif; font-size:13px; color:var(--accent);
    letter-spacing:.12em; padding:0 0 8px; border-bottom:1px solid var(--border); margin-bottom:12px;
  }
  .boshu-rsv-item {
    background:var(--surface2); border:1px solid var(--border); border-radius:10px;
    padding:14px 16px; cursor:pointer; transition:all .2s;
  }
  .boshu-rsv-item:hover { border-color:var(--accent); }
  .boshu-rsv-date { font-size:15px; font-weight:700; margin-bottom:6px; }
  .boshu-rsv-entries { display:flex; flex-direction:column; gap:4px; }
  .boshu-rsv-entry { font-size:12px; color:var(--dim); display:flex; align-items:center; gap:6px; }
  .boshu-rsv-cats { color:var(--text); opacity:.7; }
  .top-boshu-card { cursor:pointer; transition:border-color .2s; }
  .top-boshu-card:hover { border-color:var(--accent); }
  /* 募集一覧 選択モード */
  .boshu-admin-bar { display:flex; justify-content:flex-end; margin-bottom:16px; }
  .boshu-confirm-bar {
    display:flex; align-items:center; justify-content:space-between;
    gap:10px; padding:14px 0 0; border-top:1px solid var(--border); margin-top:8px;
  }
  .boshu-select-count { font-size:13px; color:var(--dim); flex-shrink:0; }
  .renban-item.boshu-selected,
  .boshu-rsv-item.boshu-selected,
  .rsv-list-item.boshu-selected { border-color:var(--accent); background:rgba(200,169,110,.08); }
  .boshu-check-icon { font-size:18px; color:var(--accent); flex-shrink:0; margin-top:2px; line-height:1; }
  /* 連番詳細・モーダル */
  .rb-overlay {
    display:none; position:fixed; inset:0; z-index:1000;
    background:rgba(0,0,0,.75); align-items:center; justify-content:center; padding:16px;
  }
  .rb-overlay.open { display:flex; }
  .rb-modal {
    background:var(--surface); border:1px solid var(--border); border-radius:14px;
    width:100%; max-width:520px; max-height:88vh; overflow-y:auto; padding:24px;
  }
  .rb-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:20px; }
  .rb-title { font-family:'Noto Serif JP',serif; font-size:16px; color:var(--accent); letter-spacing:.1em; }
  .rb-close { background:none; border:none; color:var(--dim); font-size:20px; cursor:pointer; padding:4px 8px; border-radius:6px; transition:all .2s; }
  .rb-close:hover { color:var(--text); background:var(--surface2); }
  .rb-back { background:none; border:none; color:var(--dim); font-size:18px; cursor:pointer; padding:4px 8px; border-radius:6px; transition:all .2s; margin-right:4px; }
  .rb-back:hover { color:var(--text); background:var(--surface2); }
  .rb-expired-items .renban-item { opacity:.55; }
  .rb-expired-items .renban-item:hover { opacity:.85; border-color:var(--border); }
  .rb-screen { display:none; }
  .rb-screen.active { display:block; }
  .rb-form-group { margin-bottom:14px; }
  .rb-label { font-size:12px; color:var(--dim); margin-bottom:6px; display:block; }
  .rb-input {
    width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:8px;
    color:var(--text); font-size:14px; padding:10px 12px; font-family:'Noto Sans JP',sans-serif; box-sizing:border-box;
  }
  .rb-input:focus { outline:none; border-color:var(--accent); }
  .rb-textarea {
    width:100%; background:var(--surface2); border:1px solid var(--border); border-radius:8px;
    color:var(--text); font-size:14px; padding:10px 12px; font-family:'Noto Sans JP',sans-serif;
    min-height:72px; resize:vertical; box-sizing:border-box;
  }
  .rb-textarea:focus { outline:none; border-color:var(--accent); }
  .rb-btn-row { display:flex; gap:10px; margin-top:18px; }
  .rb-btn { flex:1; padding:11px; border-radius:8px; font-family:'Noto Sans JP',sans-serif; font-size:14px; cursor:pointer; transition:all .2s; border:1px solid; }
  .rb-btn.primary { background:var(--accent); color:#000; border-color:var(--accent); font-weight:700; }
  .rb-btn.primary:hover { opacity:.85; }
  .rb-btn.primary:disabled { opacity:.5; cursor:not-allowed; }
  .rb-btn.secondary { background:none; color:var(--text); border-color:var(--border); }
  .rb-btn.secondary:hover { border-color:var(--accent); color:var(--accent); }
  .rb-btn.join { background:rgba(76,175,130,.15); color:#4caf82; border-color:#4caf82; font-weight:700; }
  .rb-btn.join:hover { background:rgba(76,175,130,.3); }
  .rb-btn.interest { background:rgba(97,175,239,.15); color:#61afef; border-color:#61afef; font-weight:700; }
  .rb-btn.interest:hover { background:rgba(97,175,239,.3); }
  .rb-detail-info { background:var(--surface2); border-radius:10px; padding:14px 16px; margin-bottom:16px; }
  .rb-detail-row { display:flex; justify-content:space-between; padding:5px 0; border-bottom:1px solid var(--border); font-size:13px; }
  .rb-detail-row:last-child { border-bottom:none; }
  .rb-detail-key { color:var(--dim); }
  .rb-detail-val { font-weight:700; }
  .rb-section-label { font-size:12px; color:var(--dim); letter-spacing:.1em; margin:14px 0 8px; }
  .rb-participants { display:flex; flex-direction:column; gap:6px; }
  .rb-participant-card { background:var(--surface2); border-radius:8px; padding:10px 12px; }
  .rb-participant-name { font-size:14px; font-weight:700; }
  .rb-participant-note { font-size:12px; color:var(--dim); margin-top:2px; }
  .rb-count-badge {
    display:inline-flex; align-items:center; gap:4px;
    background:var(--surface2); border-radius:20px; padding:3px 10px; font-size:12px; color:var(--dim);
  }
  .rb-count-join { color:#4caf82; font-weight:700; }
  .rb-count-interest { color:#61afef; font-weight:700; }
  .rb-no-participants { text-align:center; padding:20px; color:var(--dim); font-size:13px; }
  .rb-participant-entry { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-top:6px; padding-top:6px; border-top:1px solid var(--border); }
  .rb-participant-entry:first-of-type { margin-top:4px; }
  .rb-type-join { font-size:11px; font-weight:700; color:#4caf82; background:rgba(76,175,130,.12); border-radius:4px; padding:2px 6px; white-space:nowrap; }
  .rb-type-interest { font-size:11px; font-weight:700; color:#61afef; background:rgba(97,175,239,.12); border-radius:4px; padding:2px 6px; white-space:nowrap; }
  .rb-entry-date { font-size:11px; color:var(--dim); margin-right:4px; }
  .rb-date-checks { display:flex; flex-direction:column; gap:8px; }
  .rb-date-row { display:flex; align-items:center; gap:10px; background:var(--surface2); border-radius:8px; padding:10px 12px; }
  .rb-date-row-label { flex:1; font-size:13px; font-weight:700; }
  .rb-date-type-group { display:flex; gap:5px; }
  .rb-type-opt { cursor:pointer; }
  .rb-type-opt input[type=radio] { display:none; }
  .rb-type-opt span { display:block; font-size:11px; font-weight:700; padding:5px 9px; border-radius:6px; border:1px solid var(--border); color:var(--dim); transition:all .15s; white-space:nowrap; }
  .rb-type-opt input[type=radio]:checked + .type-join { background:rgba(76,175,130,.2); color:#4caf82; border-color:#4caf82; }
  .rb-type-opt input[type=radio]:checked + .type-interest { background:rgba(97,175,239,.2); color:#61afef; border-color:#61afef; }
  .rb-type-opt input[type=radio]:checked + .type-none { background:var(--surface2); color:var(--dim); border-color:var(--border); }
  .rb-expired { font-size:11px; color:var(--red); background:rgba(230,57,70,.1); border-radius:4px; padding:2px 8px; }
  .rb-status-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:12px; }

  /* ── 認証UI ── */
  #auth-area { display:flex; align-items:center; gap:10px; flex-shrink:0; }
  #auth-user-info { display:flex; align-items:center; gap:8px; }
  #auth-avatar { width:28px; height:28px; border-radius:50%; border:1px solid var(--border); object-fit:cover; }
  #auth-display-name { font-size:12px; color:var(--dim); max-width:90px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  .auth-btn { background:none; border:1px solid var(--border); color:var(--dim); font-family:'Noto Sans JP',sans-serif; font-size:12px; padding:5px 12px; border-radius:6px; cursor:pointer; transition:all .2s; white-space:nowrap; }
  .auth-btn:hover { border-color:var(--accent); color:var(--accent); }
  .auth-btn.primary { background:var(--accent); border-color:var(--accent); color:#1a1610; font-weight:700; }
  .auth-btn.primary:hover { opacity:.85; }
  /* ログインモーダル */
  #login-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.75); z-index:10000; align-items:center; justify-content:center; }
  #login-modal.open { display:flex; }
  .login-box { background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:32px 28px; width:min(340px,90vw); display:flex; flex-direction:column; gap:16px; }
  .login-box h3 { margin:0; font-family:'Noto Serif JP',serif; font-size:18px; color:var(--text); text-align:center; }
  .login-box p { margin:0; font-size:13px; color:var(--dim); text-align:center; line-height:1.7; }
  .login-provider-btn { display:flex; align-items:center; justify-content:center; gap:10px; padding:12px; border-radius:10px; border:1px solid var(--border); background:var(--surface2,#1e1e1e); color:var(--text); font-family:'Noto Sans JP',sans-serif; font-size:14px; font-weight:700; cursor:pointer; transition:all .2s; }
  .login-provider-btn:hover { border-color:var(--accent); background:rgba(255,215,0,.06); }
  .login-provider-btn svg { width:20px; height:20px; flex-shrink:0; }
  .login-close-btn { background:none; border:none; color:var(--dim); font-size:13px; cursor:pointer; text-align:center; padding:4px; }
  .login-close-btn:hover { color:var(--text); }
  .auth-hint { font-size:11px; color:var(--dim); opacity:.7; text-align:center; margin-top:2px; }

  /* ── マイページモーダル ── */
  #mypage-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.75); z-index:10000; align-items:center; justify-content:center; padding:16px; }
  #mypage-modal.open { display:flex; }
  .mypage-box { box-sizing:border-box; background:var(--surface); border:1px solid var(--border); border-radius:14px; padding:28px 24px; width:min(360px,100%); max-height:90vh; overflow-y:auto; display:flex; flex-direction:column; gap:16px; }
  .mypage-box h3 { margin:0; font-family:'Noto Serif JP',serif; font-size:18px; color:var(--text); text-align:center; }
  .mypage-section { background:var(--surface2); border-radius:10px; padding:14px 16px; display:flex; flex-direction:column; gap:8px; }
  .mypage-label { font-size:11px; color:var(--dim); letter-spacing:.08em; }
  .mypage-name-row { display:flex; gap:8px; align-items:center; }
  .mypage-name-input { flex:1; min-width:0; background:var(--bg,#0d0d0d); border:1px solid var(--border); border-radius:6px; color:var(--text); font-size:14px; padding:8px 10px; font-family:'Noto Sans JP',sans-serif; }
  .mypage-name-input:focus { outline:none; border-color:var(--accent); }
  .mypage-save-btn { background:var(--accent); border:none; color:#1a1610; font-family:'Noto Sans JP',sans-serif; font-size:12px; font-weight:700; padding:8px 14px; border-radius:6px; cursor:pointer; white-space:nowrap; flex-shrink:0; transition:opacity .2s; }
  .mypage-save-btn:hover { opacity:.85; }
  .mypage-provider { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--text); }
  .mypage-provider svg { width:16px; height:16px; flex-shrink:0; }
  .mypage-save-msg { font-size:12px; text-align:center; min-height:16px; }
  .mypage-logout-btn { background:none; border:1px solid var(--red); color:var(--red); font-family:'Noto Sans JP',sans-serif; font-size:13px; padding:10px; border-radius:8px; cursor:pointer; transition:all .2s; text-align:center; }
  .mypage-logout-btn:hover { background:rgba(230,57,70,.1); }
  .mypage-close-btn { background:none; border:none; color:var(--dim); font-size:13px; cursor:pointer; text-align:center; padding:4px; }
  .mypage-close-btn:hover { color:var(--text); }
  .mypage-stamp-btn { background:none; border:1px solid var(--accent); color:var(--accent); font-family:'Noto Sans JP',sans-serif; font-size:13px; padding:10px; border-radius:8px; cursor:pointer; transition:all .2s; text-align:center; font-weight:700; }
  .mypage-stamp-btn:hover { background:rgba(200,169,110,.12); }

  #a2hs-modal { display:none; position:fixed; inset:0; background:rgba(0,0,0,.75); z-index:10000; align-items:center; justify-content:center; padding:16px; }
  #a2hs-modal.open { display:flex; }
  .a2hs-step { display:flex; align-items:center; gap:10px; font-size:13px; color:var(--text); line-height:1.5; }
  .a2hs-step-num { flex-shrink:0; width:22px; height:22px; border-radius:50%; background:var(--accent); color:#1a1610; font-size:12px; font-weight:700; display:flex; align-items:center; justify-content:center; }
  .a2hs-icon { width:15px; height:15px; vertical-align:-3px; color:var(--accent); }
  .mypage-theme-btns { display:flex; flex-wrap:wrap; gap:6px; }
  .mypage-theme-btn { background:var(--bg); border:1px solid var(--border); color:var(--dim); font-family:'Noto Sans JP',sans-serif; font-size:12px; padding:5px 12px; border-radius:20px; cursor:pointer; transition:all .2s; }
  .mypage-theme-btn:hover { border-color:var(--accent); color:var(--text); }
  .mypage-theme-btn.active { background:var(--accent); border-color:var(--accent); color:#111; font-weight:700; }
  /* スタンプカード */
  .stamp-wrap { max-width:380px; margin:0 auto; }
  .stamp-total { text-align:center; margin-bottom:20px; }
  .stamp-total-num { font-size:56px; font-weight:700; color:var(--accent); line-height:1; }
  .stamp-total-lbl { font-size:13px; color:var(--dim); margin-top:4px; }
  .stamp-card-block { margin-bottom:28px; }
  .stamp-card-block + .stamp-card-block { border-top:1px solid var(--border); padding-top:24px; }
  .stamp-grid { display:grid; grid-template-columns:repeat(5,1fr); gap:10px; margin-bottom:12px; }
  .stamp-cell {
    aspect-ratio:1; display:flex; align-items:center; justify-content:center;
  }
  .stamp-cell svg { width:100%; height:100%; }
  .stamp-cell.on  svg { filter:drop-shadow(0 1px 2px rgba(180,0,0,.35)); }
  .stamp-cell.off circle { stroke:#444; }
  .stamp-cell.off text  { display:none; }
  .stamp-card-label { text-align:center; font-size:11px; color:var(--dim); margin-bottom:16px; letter-spacing:.08em; }
  .stamp-card-used-label { text-align:center; font-size:11px; color:var(--dim); margin-top:8px; letter-spacing:.06em; opacity:.6; }
  .stamp-card-block.is-used .stamp-grid { opacity:.45; }
  .stamp-status-msg { text-align:center; font-size:13px; color:var(--dim); min-height:18px; margin-bottom:12px; }
  .stamp-btn-area { text-align:center; margin-bottom:16px; }
  .stamp-btn { padding:12px 36px; font-size:15px; border-radius:10px; font-weight:700; }
  .stamp-last { text-align:center; font-size:12px; color:var(--dim); }

  /* ── SAKURA DECORATION ── */
  #sec-top { position: relative; isolation: isolate; }
  .sakura-deco { position: absolute; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
  .sakura-tree { position: absolute; bottom: 0; width: 320px; opacity: .45; }
  .sakura-tree.s-left  { left: -40px; transform: scaleX(-1); }
  .sakura-tree.s-right { right: -40px; }
  .fuyu-tree, .natsu-deco, .tsuyu-deco { display: none; }
  .fuyu-tree { position: absolute; bottom: 0; width: 320px; opacity: .48; }
  .fuyu-tree.f-left  { left: -40px; transform: scaleX(-1); }
  .fuyu-tree.f-right { right: -40px; }
  .natsu-deco { position: absolute; bottom: 0; width: 280px; opacity: .44; }
  .natsu-deco.n-left  { left: -30px; transform: scaleX(-1); }
  .natsu-deco.n-right { right: -30px; }
  .tsuyu-deco { position: absolute; bottom: 0; width: 320px; opacity: .44; }
  .tsuyu-deco.t-left  { left: -20px; transform: scaleX(-1); }
  .tsuyu-deco.t-right { right: -20px; }
  body[data-season="fuyu"]  .sakura-tree { display: none; }
  body[data-season="fuyu"]  .fuyu-tree   { display: block; }
  body[data-season="natsu"] .sakura-tree { display: none; }
  body[data-season="natsu"] .natsu-deco  { display: block; }
  body[data-season="tsuyu"] .sakura-tree { display: none; }
  body[data-season="tsuyu"] .tsuyu-deco  { display: block; }
  @media(max-width:640px) { .fuyu-tree { width: 180px; } .natsu-deco { width: 170px; } .tsuyu-deco { width: 180px; } }
  .nature-birds { position: absolute; top: 6%; left: 0; width: 100%; opacity: .55; }
  .nature-grass { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 85%; opacity: .5; }
  .nature-shrub { position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 160px; opacity: .42; }
  body[data-season="sakura"] .nature-shrub circle { fill: #ffb7c5 !important; }
  body[data-season="koyo"]   .nature-shrub circle { fill: #c05820 !important; }
  body[data-season="tsuyu"]  .nature-shrub, body[data-season="natsu"] .nature-shrub, body[data-season="fuyu"] .nature-shrub { display: none; }
  @media(max-width:640px) { .nature-shrub { width: 110px; } }
  @keyframes leaf-fall {
    0%   { transform: translateY(-20px) rotate(0deg)   translateX(0); }
    25%  { transform: translateY(25vh)  rotate(45deg)  translateX(10px); }
    50%  { transform: translateY(50vh)  rotate(90deg)  translateX(0px); }
    75%  { transform: translateY(75vh)  rotate(135deg) translateX(-10px); }
    100% { transform: translateY(108vh) rotate(180deg) translateX(0); }
  }
  @keyframes rain-fall {
    0%   { transform: translateY(-20px) rotate(10deg); }
    100% { transform: translateY(108vh) rotate(10deg); }
  }
  .deco-leaf { position: absolute; top: 0; opacity: .45; animation: leaf-fall linear infinite; }
  body[data-season="tsuyu"] .deco-leaf { animation-name: rain-fall; animation-duration: 1.4s !important; opacity: .55; }
  body[data-season="natsu"] .deco-leaf { display: none; }
  .deco-rain { display: none; position: absolute; top: 0; opacity: .55; animation: rain-fall linear infinite; animation-duration: 1.4s; }
  body[data-season="tsuyu"] .deco-rain { display: block; }
  /* ── MIDORI BIRDS (新緑の青い小鳥) ── */
  .midori-bird { display: none; position: absolute; opacity: .58; animation: midori-bird-fly linear infinite; animation-duration: var(--dur, 12s); animation-delay: var(--delay, 0s); }
  .midori-bird.rtl { animation-name: midori-bird-fly-rtl; }
  body[data-season="midori"] .midori-bird { display: block; }
  @keyframes midori-bird-fly     { 0% { transform: translateX(-60px) translateY(var(--y0,0px)) rotate(var(--angle,0deg)); } 100% { transform: translateX(calc(100vw + 60px)) translateY(var(--y1,0px)) rotate(var(--angle,0deg)); } }
  @keyframes midori-bird-fly-rtl { 0% { transform: translateX(calc(100vw + 60px)) translateY(var(--y0,0px)) rotate(var(--angle,0deg)); } 100% { transform: translateX(-60px) translateY(var(--y1,0px)) rotate(var(--angle,0deg)); } }
  @media(max-width:640px) { .sakura-tree { width: 150px; } .nature-grass { width: 100%; } }

  /* ── FIREWORKS (夏) ── */
  .firework {
    display: none; position: absolute; bottom: 8%; width: 3px; height: 3px; border-radius: 50%;
  }
  body[data-season="natsu"] .firework { display: block; }
  .firework::before {
    content: ''; position: absolute; inset: 0; border-radius: 50%;
    background: var(--c, #ffdd44);
    box-shadow: 0 0 4px 2px var(--c, #ffdd44);
    animation: fw-rocket var(--d, 3.8s) var(--delay, 0s) infinite;
  }
  .firework::after {
    content: ''; position: absolute; top: 0; left: 0; width: 3px; height: 3px; border-radius: 50%;
    animation: fw-explode var(--d, 3.8s) var(--delay, 0s) infinite;
  }
  @keyframes fw-rocket {
    0%, 100% { transform: translateY(0);               opacity: 0; }
    5%        { transform: translateY(0);               opacity: 1; }
    45%       { transform: translateY(var(--h, -54vh)); opacity: 1; }
    52%       { transform: translateY(var(--h, -54vh)); opacity: 0; }
  }
  @keyframes fw-explode {
    0%, 48% {
      box-shadow: 0 0 0 0 var(--c, #ffdd44);
      transform: translateY(var(--h, -54vh)); opacity: 0;
    }
    55% {
      box-shadow: 0 0 3px 3px var(--c, #ffdd44);
      transform: translateY(var(--h, -54vh)); opacity: 1;
    }
    82% {
      box-shadow:
        0 -65px 4px var(--c, #ffdd44),   46px -46px 4px var(--c2, #ffaa22),
        65px 0   4px var(--c, #ffdd44),   46px  46px 4px var(--c2, #ffaa22),
        0   65px 4px var(--c, #ffdd44),  -46px  46px 4px var(--c2, #ffaa22),
       -65px 0   4px var(--c, #ffdd44),  -46px -46px 4px var(--c2, #ffaa22),
        0  -38px 3px var(--c2, #ffaa22),   27px -27px 3px var(--c, #ffdd44),
        38px 0   3px var(--c2, #ffaa22),   27px  27px 3px var(--c, #ffdd44),
        0   38px 3px var(--c2, #ffaa22),  -27px  27px 3px var(--c, #ffdd44),
       -38px 0   3px var(--c2, #ffaa22),  -27px -27px 3px var(--c, #ffdd44);
      transform: translateY(var(--h, -54vh)); opacity: 0.85;
    }
    100% {
      box-shadow:
        0 -95px 2px transparent,  67px -67px 2px transparent,
        95px 0   2px transparent,  67px  67px 2px transparent,
        0   95px 2px transparent, -67px  67px 2px transparent,
       -95px 0   2px transparent, -67px -67px 2px transparent,
        0  -55px 1px transparent,  39px -39px 1px transparent,
        55px 0   1px transparent,  39px  39px 1px transparent,
        0   55px 1px transparent, -39px  39px 1px transparent,
       -55px 0   1px transparent, -39px -39px 1px transparent;
      transform: translateY(var(--h, -54vh)); opacity: 0;
    }
  }

  /* ── TOP PAGE ── */
  .top-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; }
  @media(max-width:640px){ .top-grid { grid-template-columns:1fr; } }
  .top-next-mark { font-size:52px; text-align:center; margin:12px 0 6px; line-height:1; }
  .top-next-date { font-size:20px; font-weight:700; text-align:center; color:var(--text); margin-top:4px; }
  .top-next-note { font-size:13px; color:var(--dim); text-align:center; margin-top:4px; }
  .top-next-until { font-size:13px; color:var(--accent); text-align:center; margin-top:10px; font-weight:700; letter-spacing:.05em; }
  .top-next-rsv { font-size:13px; text-align:center; margin-top:8px; }
  .top-next-card { cursor:pointer; transition:border-color .2s; }
  .top-next-card:hover { border-color:var(--accent); }
  .top-schedule-list { display:flex; flex-direction:column; }
  .top-schedule-row { display:flex; justify-content:space-between; align-items:center; font-size:13px; padding:9px 0; border-bottom:1px solid var(--border); gap:8px; }
  .top-schedule-row:last-child { border-bottom:none; }
  .top-schedule-date { color:var(--text); }
  .top-updates-list { display:flex; flex-direction:column; }
  .top-update-item { display:flex; gap:10px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--border); }
  .top-update-item:last-child { border-bottom:none; }
  .top-update-icon { flex-shrink:0; font-size:15px; margin-top:1px; }
  .top-update-text { flex:1; font-size:13px; color:var(--text); line-height:1.5; }
  .top-update-time { font-size:11px; color:var(--dim); margin-top:2px; }
  .top-update-link { cursor:pointer; border-radius:6px; margin:0 -8px; padding-left:8px; padding-right:8px; transition:background .15s; }
  .top-update-link:hover { background:var(--surface2); }
  .top-jare-card { cursor:pointer; transition:border-color .2s; }
  .top-jare-card:hover { border-color:var(--accent); }
  .top-jare-title { font-size:17px; font-weight:700; color:var(--text); margin:6px 0 10px; line-height:1.6; }
  .top-jare-meta { font-size:12px; color:var(--dim); margin-bottom:10px; }
  .top-jare-footer { font-size:12px; color:var(--accent); text-align:right; }
  .logo { cursor:pointer; user-select:none; }

  /* ── MOBILE ── */
  @media(max-width:640px){
    /* ヘッダー：セーフエリア対応 */
    header { padding: env(safe-area-inset-top) max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); height: calc(60px + env(safe-area-inset-top)); }
    .logo { font-size: 19px; display: grid; grid-template-columns: 1fr 1fr; line-height: 1.15; flex-shrink: 0; }
    .logo span { margin-left: 6px; font-size: 11px; }
    /* ナビ：タッチターゲット改善 */
    nav button { font-size: 12px; padding: 8px 10px; }
    #auth-display-name { display:none; }
    .subnav { padding: 0 12px; height: 40px; }
    .subnav button { font-size: 11px; padding: 7px 10px; }

    /* 期間バー：折り返し対応 */
    .period-bar { padding: 8px 12px; gap: 6px; flex-wrap: wrap; }
    .period-bar input[type=date] { font-size: 12px; padding: 4px 6px; flex: 1; min-width: 120px; }
    .period-btns { margin-left: 0; gap: 4px; flex-wrap: wrap; }
    .period-preset { font-size: 10px; padding: 4px 8px; }

    /* メイン：ボトムセーフエリア */
    main { padding: 14px 10px max(14px, env(safe-area-inset-bottom)) 10px; }
    .card { padding: 14px; }
    .card-title { font-size: 12px; margin-bottom: 14px; }

    /* トップページ */

    /* ランキング表 */
    .rank-table { font-size: 12px; }
    .rank-table th, .rank-table td { padding: 8px 7px; }

    /* メンバー */
    .member-sort-wrap { margin-bottom: 10px; }
    .member-grid { grid-template-columns: repeat(auto-fill, minmax(120px,1fr)); gap: 8px; margin-bottom: 16px; }
    .member-btn { padding: 10px 12px; border-radius: 8px; }
    .member-btn .m-name { font-size: 13px; }
    .member-btn .m-score { font-size: 15px; }

    .detail-grid { grid-template-columns: 1fr; gap: 10px; }
    .stat-block { padding: 12px; }

    .member-charts-section { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; }
    .chart-wrap-sm { height: 180px; }

    .graph-controls { gap: 6px; margin-bottom: 10px; }
    .ctrl-btn { font-size: 11px; padding: 4px 9px; }
    .chart-wrap { height: 280px; }

    .hist-table { font-size: 11px; }
    .hist-table th, .hist-table td { padding: 6px 6px; }

    /* ご意見フォーム */
    .feedback-form { gap: 12px; }
    .feedback-form input[type=text],
    .feedback-form select,
    .feedback-form textarea { font-size: 16px; /* iOSズーム防止 */ }
    .feedback-form textarea { min-height: 100px; }
    .fb-file-label { font-size: 12px; padding: 7px 12px; }
    .fb-preview-img { width: 60px; height: 60px; }
    .feedback-submit { width: 100%; text-align: center; padding: 12px; }

    /* 掲示板：iOS zoom防止 */
    .board-form textarea { font-size: 16px; }

    /* じゃれ本モーダル：横幅を最大限に使う */
    #jare-modal { padding: 12px 6px; }
    .jare-modal-box { padding: 16px 12px; }
    .jare-form-row input[type="date"] { min-width: 0; width: 100%; max-width: 100%; }
    .jare-form-row { overflow: hidden; }
    .jare-form-row input,
    .jare-form-row textarea { font-size: 16px; /* iOSズーム防止 */ }
    .jare-modal-actions { flex-wrap: wrap; }
    .jare-cancel-btn, .jare-submit-btn { flex: 1; text-align: center; }
    .jare-order-btn { padding: 2px 5px; font-size: 10px; }
    .jare-edit-btn, .jare-del-btn { padding: 2px 7px; font-size: 10px; }
    .jare-admin-btns { gap: 4px; }
    .jare-combo-select { font-size: 16px; /* iOSズーム防止 */ }

    /* ギャラリーハブ */
    .gallery-hub-btn { font-size: 16px; padding: 16px 20px; }

    /* 予約モーダル */
    .rsv-modal { padding: 16px; max-height: 90vh; max-height: 90dvh; }
    .rsv-input, .rsv-textarea { font-size: 16px; /* iOSズーム防止 */ }
    .rsv-checkbox-item { padding: 8px 10px; }
    .rsv-checkbox-item span { font-size: 12px; }

    /* 連番募集フォーム */
    .rb-textarea { font-size: 16px; /* iOSズーム防止 */ }

    /* 募集一覧 選択確認バー：縦並び */
    .boshu-confirm-bar { flex-direction: column; align-items: stretch; }
    .boshu-confirm-bar > div { justify-content: space-between; }

    /* スタンプカード：グリッド余白を詰める */
    .stamp-grid { gap: 6px; }

    /* ログインモーダル */
    .login-box { padding: 24px 20px; }

    /* マイページ */
    .mypage-box { max-height: 90vh; max-height: 90dvh; }

    /* ローディングバー */
    #loading .ld-bar { width: min(200px, 80vw); }
  }

  /* ── 管理者セクション ── */
  .admin-sub-screen { display: none; }
  .admin-sub-screen.active { display: block; }
  .admin-section-title { font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
  .admin-form-group { margin-bottom: 14px; min-width: 0; }
  .admin-form-group label { display: block; font-size: 12px; color: var(--dim); margin-bottom: 4px; }
  .admin-input { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; -webkit-appearance: none; appearance: none; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: 'Noto Sans JP', sans-serif; font-size: 14px; line-height: 1.5; min-height: 38px; padding: 8px 12px; border-radius: 6px; }
  .admin-input:focus { outline: none; border-color: var(--accent); }
  .admin-select { width: 100%; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: 'Noto Sans JP', sans-serif; font-size: 14px; padding: 8px 12px; border-radius: 6px; cursor: pointer; }
  .admin-btn { background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: 'Noto Sans JP', sans-serif; font-size: 13px; padding: 8px 20px; border-radius: 6px; cursor: pointer; transition: all .2s; white-space: nowrap; }
  .admin-btn:hover { background: var(--surface); border-color: var(--accent); color: var(--accent); }
  .admin-btn.primary { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }
  .admin-btn.primary:hover { opacity: 0.85; }
  .admin-btn.danger { border-color: var(--red); color: var(--red); }
  .admin-btn.danger:hover { background: rgba(230,57,70,.1); }
  .admin-btn.sm { padding: 5px 12px; font-size: 12px; }
  .admin-status { font-size: 12px; min-height: 18px; margin: 4px 0; }
  .admin-status.error { color: var(--red); }
  .admin-status.ok { color: var(--green); }
  .admin-add-row { display: flex; gap: 8px; align-items: center; margin-bottom: 16px; }
  .admin-add-row .admin-input { flex: 1; }
  .admin-member-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
  .admin-member-item { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--surface2); border-radius: 6px; }
  .admin-member-name { font-size: 14px; }
  .admin-checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 6px; margin-bottom: 8px; }
  .admin-member-check { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: var(--surface2); border-radius: 6px; cursor: pointer; font-size: 13px; user-select: none; }
  .admin-member-check input { cursor: pointer; accent-color: var(--accent); }
  .admin-gather-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
  .admin-gather-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; cursor: pointer; transition: border-color .2s; }
  .admin-gather-card:hover { border-color: var(--accent); }
  .admin-gather-date { font-weight: 700; font-size: 14px; color: var(--accent); }
  .admin-gather-meta { font-size: 12px; color: var(--dim); margin-top: 4px; }
  .admin-match-row { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 10px; }
  .admin-match-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
  .admin-match-label { font-size: 13px; font-weight: 700; }
  .admin-score-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; margin-bottom: 8px; }
  .admin-score-item { display: flex; flex-direction: column; gap: 4px; }
  .admin-score-item label { font-size: 11px; color: var(--dim); display: flex; align-items: center; gap: 4px; }
  .admin-score-input { background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-size: 14px; padding: 6px 8px; border-radius: 4px; width: 100%; text-align: right; font-family: 'Noto Sans JP', sans-serif; }
  .admin-score-input:focus { outline: none; border-color: var(--accent); }
  .admin-rank-badge { display: inline-block; width: 20px; height: 20px; border-radius: 50%; text-align: center; line-height: 20px; font-size: 11px; font-weight: 700; }
  .admin-rank-1 { background: #c8a96e; color: #000; }
  .admin-rank-2 { background: #9e9e9e; color: #000; }
  .admin-rank-3 { background: #a5673f; color: #fff; }
  .admin-rank-4 { background: var(--surface2); color: var(--dim); border: 1px solid var(--border); }
  .admin-match-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
  .admin-row-split { display: flex; gap: 8px; flex-wrap: wrap; }
  .admin-row-split > * { flex: 1; min-width: 0; }
  @media (max-width: 480px) {
    .admin-row-split { flex-direction: column; }
  }
  @media (max-width: 640px) {
    .admin-input { font-size: 16px; /* iOSズーム防止 */ }
    .admin-select { font-size: 16px; }
  }
  .admin-divider { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
  .admin-empty { color: var(--dim); font-size: 13px; text-align: center; padding: 24px; }
  .admin-card-toggle { width: 100%; display: flex; justify-content: space-between; align-items: center; background: none; border: none; cursor: pointer; text-align: left; font-family: 'Noto Sans JP', sans-serif; font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
  .admin-card-body { display: none; }
  .admin-card-body.open { display: block; }
  .admin-textarea { display: block; width: 100%; max-width: 100%; min-width: 0; box-sizing: border-box; -webkit-appearance: none; appearance: none; background: var(--surface2); border: 1px solid var(--border); color: var(--text); font-family: 'Noto Sans JP', sans-serif; font-size: 14px; line-height: 1.6; padding: 8px 12px; border-radius: 6px; resize: vertical; }
  .admin-textarea:focus { outline: none; border-color: var(--accent); }
  @media (max-width: 640px) {
    .admin-textarea { font-size: 16px; /* iOSズーム防止 */ }
  }

  /* ── Swarm連携 ── */
  .swarm-venue-results { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
  .swarm-venue-item { background: var(--surface2); border: 1px solid var(--border); border-radius: 6px; padding: 8px 12px; cursor: pointer; transition: border-color .2s; }
  .swarm-venue-item:hover { border-color: var(--accent); }
  .swarm-venue-name { font-size: 13px; font-weight: 700; }
  .swarm-venue-addr { font-size: 11px; color: var(--dim); margin-top: 2px; }
  .swarm-checkin-list { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
  .swarm-checkin-card { background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 16px; }
  .swarm-checkin-venue { font-weight: 700; font-size: 14px; color: var(--accent); }
  .swarm-checkin-meta { font-size: 12px; color: var(--dim); margin-top: 4px; }
  .swarm-checkin-shout { font-size: 13px; margin-top: 6px; line-height: 1.6; }
  .swarm-checkin-actions { display: flex; gap: 8px; margin-top: 10px; }

  /* ── AI議論 ── */
  .ai-disc-round { margin-bottom: 12px; }
  .ai-disc-round-label { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
  .ai-disc-round-input { font-size: 13px; color: var(--dim); background: var(--surface2); border-radius: 6px; padding: 8px 12px; margin-bottom: 10px; white-space: pre-wrap; word-break: break-word; }
  .ai-disc-round-output h3 { font-size: 14px; margin: 14px 0 6px; color: var(--text); }
  .ai-disc-round-output h4 { font-size: 13px; margin: 10px 0 4px; color: var(--text); }
  .ai-disc-round-output p { font-size: 13px; line-height: 1.7; margin: 6px 0; }
  .ai-disc-round-output ul { margin: 4px 0 8px 20px; padding: 0; font-size: 13px; line-height: 1.7; }
  .ai-disc-round-output li { margin-bottom: 2px; }
  .ai-disc-round-output strong { color: var(--accent); }
  .ai-disc-hr { border: none; border-top: 1px solid var(--border); margin: 12px 0; }
  .ai-disc-round-output details.ai-disc-sources { font-size: 13px; margin: 10px 0; }
  .ai-disc-round-output details.ai-disc-sources summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--text); margin: 14px 0 6px; }
  .ai-disc-round-output details.ai-disc-sources ul { margin-top: 6px; }
  .ai-disc-top-link { margin-top: 14px; text-align: right; }

/* ── 投票箱 ── */
.vote-view { display: none; }
.vote-view.active { display: block; }

.vote-list-header { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.vote-select-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 13px; color: var(--dim); }
.vote-card-selectable { cursor: pointer; }
.vote-card-selected { border-color: var(--accent); background: var(--surface2); }
.vote-sel-check { width: 16px; height: 16px; cursor: pointer; flex-shrink: 0; }

.vote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .2s;
}
.vote-card:hover { border-color: var(--accent); }
.vote-card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.vote-card-title { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; }
.vote-card-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--dim); margin-bottom: 8px; }
.vote-card-opts { display: flex; flex-direction: column; gap: 4px; }
.vote-card-opt-row { display: flex; justify-content: space-between; font-size: 12px; }
.vote-card-opt-label { color: var(--text); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-right: 8px; }
.vote-card-opt-count { color: var(--accent); font-weight: 700; white-space: nowrap; }

.vote-section-heading {
  font-size: 13px;
  font-weight: 700;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin: 20px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.vote-expired-badge {
  display: inline-block;
  background: rgba(230,57,70,.15);
  color: var(--red);
  border: 1px solid var(--red);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}

.vote-badge {
  display: inline-block;
  background: rgba(200,169,110,.15);
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  white-space: nowrap;
}

.vote-empty { color: var(--dim); font-size: 13px; text-align: center; padding: 24px; }

.vote-detail-back-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.vote-back-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  cursor: pointer;
  padding: 4px 0;
  font-family: 'Noto Sans JP', sans-serif;
}
.vote-back-btn:hover { opacity: .75; }

.vote-detail-toggle { display: flex; gap: 4px; }
.vote-toggle-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--dim);
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 12px;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .2s;
}
.vote-toggle-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
}

.vote-detail-title { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--text); display: block; }
.vote-detail-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--dim); margin-bottom: 14px; align-items: center; }

.vote-expired-notice {
  background: rgba(230,57,70,.1);
  border: 1px solid var(--red);
  color: var(--red);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.vote-option-block { margin-bottom: 16px; }
.vote-option-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.vote-option-label { font-size: 14px; font-weight: 600; color: var(--text); flex: 1; margin-right: 8px; }
.vote-option-count { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.vote-bar-wrap { background: var(--surface2); border-radius: 4px; height: 8px; margin-bottom: 6px; overflow: hidden; }
.vote-bar { height: 100%; background: var(--accent); border-radius: 4px; transition: width .4s; }
.vote-voters { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.vote-voter-item { display: flex; align-items: center; gap: 6px; background: var(--surface2); border-radius: 6px; padding: 3px 8px; font-size: 12px; }
.vote-voter-note { color: var(--dim); font-size: 11px; }
.vote-voter-none { font-size: 12px; color: var(--dim); padding: 2px 4px; }
.vote-del-answer-btn {
  background: none;
  border: none;
  color: var(--red);
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  font-family: 'Noto Sans JP', sans-serif;
}
.vote-del-answer-btn:hover { opacity: .7; }

.vote-other-texts { margin-top: 4px; padding-left: 4px; }
.vote-other-text-item { font-size: 12px; color: var(--text); padding: 2px 0; }
.vote-other-text-name { color: var(--dim); }

.vote-notes-section { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 14px; }
.vote-notes-heading { font-size: 13px; font-weight: 700; color: var(--dim); margin-bottom: 8px; }
.vote-note-item { display: flex; gap: 8px; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.vote-note-name { color: var(--accent); font-weight: 600; white-space: nowrap; }
.vote-note-text { color: var(--text); }

.vote-ans-card { background: var(--surface2); border-radius: 8px; padding: 10px 14px; margin-bottom: 8px; }
.vote-ans-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.vote-ans-name { font-size: 13px; font-weight: 700; color: var(--accent); }
.vote-ans-selections { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.vote-ans-tag { background: rgba(200,169,110,.15); border: 1px solid var(--accent); color: var(--accent); border-radius: 6px; font-size: 11px; padding: 2px 8px; }
.vote-ans-note { font-size: 12px; color: var(--dim); margin-top: 4px; }

.vote-answer-btn-wrap { text-align: center; margin-top: 14px; }

.vote-form-title { font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 14px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.vote-login-warn {
  background: rgba(230,57,70,.08);
  border: 1px solid rgba(230,57,70,.4);
  color: var(--red);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  margin-bottom: 14px;
}

.vote-opt-row { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; }
.vote-opt-input { flex: 1; }
.vote-opt-remove-btn { flex: none; padding: 6px 12px; font-size: 14px; line-height: 1; }

.vote-check-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); cursor: pointer; }
.vote-check-label input[type="checkbox"] { accent-color: var(--accent); width: 15px; height: 15px; cursor: pointer; }

.vote-choices-list { display: flex; flex-direction: column; gap: 6px; }
.vote-choice-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--surface2); border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--text); user-select: none; }
.vote-choice-item input { accent-color: var(--accent); cursor: pointer; }

.vote-answer-box-title { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 14px; padding: 10px 12px; background: var(--surface2); border-radius: 6px; border-left: 3px solid var(--accent); }

@media (max-width: 640px) {
  .vote-card-meta { gap: 6px; }
  .vote-detail-back-row { flex-direction: column; align-items: flex-start; }
  .vote-detail-toggle { align-self: flex-end; }
  .vote-answer-note { font-size: 16px; }
  #vote-add-name, #vote-add-title, #vote-add-deadline,
  .vote-opt-input, #vote-answer-name, #vote-answer-note { font-size: 16px; }
}

/* ── コラム ── */
.column-view { display: none; }
.column-view.active { display: block; }

.col-list-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.col-login-hint { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--dim); }

.col-sort-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.col-my-only-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.col-my-only-label input { accent-color: var(--accent); }

.col-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s;
}
.col-card:hover { border-color: var(--accent); }
.col-card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.col-card-title { font-size: 14px; font-weight: 700; color: var(--text); flex: 1; min-width: 0; }
.col-card-meta { display: flex; gap: 12px; font-size: 12px; color: var(--dim); flex-wrap: wrap; }

.col-draft-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(230,57,70,.15);
  color: var(--red);
  border: 1px solid var(--red);
  white-space: nowrap;
}
.col-genre-badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: rgba(200,169,110,.15);
  color: var(--accent);
  border: 1px solid var(--accent);
  white-space: nowrap;
}

.col-empty { color: var(--dim); font-size: 13px; text-align: center; padding: 24px; }

.col-back-row { margin-bottom: 12px; }

.col-detail-title { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
#col-detail-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.col-detail-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--dim); margin-bottom: 14px; align-items: center; }

.col-body { font-size: 14px; line-height: 1.8; color: var(--text); word-break: break-word; }
.col-body img { max-width: 100%; border-radius: 8px; margin: 8px 0; }

.col-editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px;
  background: var(--surface2);
  border-radius: 6px 6px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
}
.col-toolbar-select { font-size: 12px; padding: 4px 6px; max-width: 110px; }
.col-color-btns { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.col-align-btns { display: flex; gap: 2px; }
.col-color-btn {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.col-color-btn:hover { opacity: .8; border-color: var(--text); }

.col-editor {
  min-height: 200px;
  padding: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 0 0 6px 6px;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
  word-break: break-word;
  outline: none;
}
.col-editor:empty::before { content: attr(placeholder); color: var(--dim); pointer-events: none; }
.col-editor img { max-width: 100%; border-radius: 6px; cursor: pointer; }
.col-editor img:hover { outline: 2px solid var(--accent); }
.col-img-picker {
  position: absolute; display: none; gap: 4px; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 6px; padding: 4px 8px; box-shadow: 0 2px 8px rgba(0,0,0,.3);
  z-index: 10;
}
.col-img-picker .col-img-picker-label { font-size: 12px; color: var(--dim); }
.col-img-picker button { font-size: 12px; padding: 2px 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; }
.col-img-picker button:hover { background: var(--accent); color: #fff; }

.col-submit-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

.col-ai-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.col-ai-result { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.col-ai-result-label { font-size: 12px; color: var(--dim); }
.col-ai-result-text { font-size: 13px; line-height: 1.7; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; white-space: pre-wrap; }
.col-ai-suggestion { text-align: left; }

@media (max-width: 640px) {
  .col-card-meta { gap: 6px; }
  #col-edit-title, #col-edit-author, #col-edit-genre, .col-editor { font-size: 16px; }
}

/* ── 外部公開モード ── */
body.public-mode header,
body.public-mode .subnav,
body.public-mode .period-bar { display: none !important; }
body.public-mode main { padding-top: 20px; }

/* ── AI議論 MAGIモード（黒×オレンジのターミナル風スキン） ── */
.magi-header {
  background: #000;
  color: #ff9100;
  border: 1px solid #ff9100;
  font-family: 'Courier New', monospace;
  font-weight: bold;
  letter-spacing: 3px;
  text-align: center;
  padding: 8px 12px;
  margin-bottom: 10px;
  font-size: 14px;
}

@keyframes magi-blink {
  0%, 60% { opacity: 1; }
  61%, 100% { opacity: 0.15; }
}
.magi-blink { animation: magi-blink 1s step-end infinite; }

/* 議論表示エリアのスキン（プレビューと保存済み表示の両方に適用） */
.magi-mode .ai-disc-round,
.magi-mode .ai-disc-round-output {
  background: #000;
  color: #ffb347;
}
.magi-mode .ai-disc-round {
  border: 1px solid #ff9100;
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 12px;
}
.magi-mode .ai-disc-round-output h3 {
  color: #000;
  background: #ff9100;
  display: inline-block;
  padding: 2px 10px;
  font-family: 'Courier New', monospace;
  letter-spacing: 1px;
}
.magi-mode .ai-disc-round-output h4 {
  color: #ff4400;
  border-left: 3px solid #ff4400;
  padding-left: 8px;
}
.magi-mode .ai-disc-round-output p,
.magi-mode .ai-disc-round-output li {
  color: #ffb347;
}
.magi-mode .ai-disc-round-output strong { color: #7CFC00; }
.magi-mode .ai-disc-round-output hr,
.magi-mode > .ai-disc-hr { border-color: #ff9100; }
.magi-mode .ai-disc-round-label { color: #ff9100; }
.magi-mode .ai-disc-round-input { background: #1a0e00; color: #ffd9a0; border: 1px dashed #ff9100; border-radius: 4px; }


/* ── 乗換案内 ── */
.transit-menu { display: flex; flex-direction: column; gap: 10px; }
.transit-menu-btn {
  padding: 16px; font-size: 15px; font-weight: 700; font-family: inherit;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); cursor: pointer; transition: border-color .2s;
}
.transit-menu-btn:hover { border-color: var(--accent); }
.transit-menu-btn:disabled { opacity: .45; cursor: default; }
.transit-menu-btn:disabled:hover { border-color: var(--border); }
.transit-back { background: none; border: none; color: var(--dim); font-size: 13px; font-family: inherit; cursor: pointer; padding: 0; margin-bottom: 10px; }
.transit-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 14px; }
.transit-note { font-size: 11.5px; color: var(--dim); line-height: 1.6; margin-top: 10px; }
.transit-od { display: flex; flex-direction: column; }
.transit-swap-row { text-align: center; margin-bottom: 12px; }
.transit-my-toggles { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.transit-my-toggle { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; color: var(--text); cursor: pointer; min-height: 32px; }
.transit-datetime-row { display: flex; gap: 8px; margin-bottom: 10px; }
.transit-datetime-row .admin-input { flex: 1; min-width: 0; }
.transit-bus-toggle {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-size: 12.5px; color: var(--dim); cursor: pointer;
}
.transit-bus-toggle input { width: 16px; height: 16px; flex: none; cursor: pointer; accent-color: var(--accent); }
.transit-seg-row { display: flex; gap: 6px; margin-bottom: 10px; }
.transit-seg-row button {
  flex: 1; padding: 8px 4px; font-size: 13px; font-family: inherit;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  color: var(--dim); cursor: pointer;
}
.transit-seg-row button.active { border-color: var(--accent); color: var(--accent); font-weight: 700; }
.transit-via-section { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.transit-suggest {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 60; display: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  max-height: 240px; overflow-y: auto; box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
.transit-suggest.open { display: block; }
.transit-suggest-item { padding: 10px 12px; font-size: 14px; cursor: pointer; }
.transit-suggest-item:hover { background: var(--surface2); }
.transit-suggest-loc { font-size: 11px; color: var(--dim); margin-left: 6px; }
.transit-history { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.transit-chip {
  font-size: 12px; padding: 5px 10px; border-radius: 12px; font-family: inherit;
  background: var(--surface2); border: 1px solid var(--border); color: var(--text); cursor: pointer;
}
.transit-chip:hover { border-color: var(--accent); }
.transit-st-list { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.transit-st-item {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; font-size: 14px;
}
.transit-route-card { border: 1px solid var(--border); border-radius: 8px; margin-bottom: 10px; overflow: hidden; }
.transit-route-head {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  background: var(--surface2); border: none; padding: 10px 12px; cursor: pointer; font-family: inherit; text-align: left;
}
.transit-route-time { font-size: 14.5px; font-weight: 700; color: var(--text); }
.transit-route-meta { font-size: 12px; color: var(--dim); }
.transit-route-body { display: none; padding: 12px; }
.transit-route-body.open { display: block; }
.transit-leg { border-left: 3px solid var(--border); padding-left: 10px; margin-bottom: 6px; }
.transit-leg-st { font-size: 13.5px; font-weight: 700; color: var(--text); }
.transit-leg-line { font-size: 12px; color: var(--dim); padding: 3px 0 3px 14px; }
.transit-leg-walk { font-size: 12px; color: var(--dim); padding: 4px 0 4px 13px; }
.transit-attribution { text-align: center; font-size: 10.5px; color: var(--dim); margin-top: 16px; opacity: .8; }
@media (max-width: 640px) {
  #sec-transit .admin-input { font-size: 16px; /* iOSズーム防止 */ }
}
.transit-line-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.transit-line-row:last-child { border-bottom: none; }
.transit-line-row label { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; color: var(--text); cursor: pointer; min-width: 0; }
.transit-line-row a, .transit-ext-link { font-size: 12px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.transit-line-row a:hover, .transit-ext-link:hover { text-decoration: underline; }
.transit-detour-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: #fff;
  background: var(--accent); border-radius: 8px; padding: 1px 7px; margin-right: 6px; vertical-align: 1px;
}

/* ── Xアーカイブ閲覧 ── */
.xa-filterbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.xa-accounts {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; -webkit-overflow-scrolling: touch;
}
/* 読込後（.loaded付与後）に0件のときだけプレースホルダを出す */
.xa-accounts.loaded:empty::after { content: 'アカウントがありません'; font-size: 12px; color: var(--dim); }
.xa-account-chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  min-height: 36px; padding: 6px 14px; border-radius: 20px;
  background: var(--surface2); border: 1px solid var(--border); color: var(--dim);
  font-family: 'Noto Sans JP', sans-serif; font-size: 13px; cursor: pointer; white-space: nowrap;
  transition: all .2s;
}
.xa-account-chip:hover { border-color: var(--accent); }
.xa-account-chip.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 700; }
.xa-account-chip .xa-account-handle { opacity: .75; font-weight: 400; }
.xa-account-chip.active .xa-account-handle { color: #000; opacity: .65; }
.xa-filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.xa-filter-row .admin-input { flex: 1 1 140px; min-width: 0; }
.xa-filter-row > span { color: var(--dim); font-size: 13px; }
.xa-filter-row .admin-btn { min-height: 40px; }

.xa-timeline { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.xa-date-sep {
  position: sticky; top: 0; z-index: 1; align-self: flex-start;
  background: var(--surface); color: var(--accent); font-size: 12.5px; font-weight: 700;
  padding: 5px 12px; border-radius: 14px; border: 1px solid var(--border); margin-top: 6px;
}

.xa-post {
  background: var(--surface2); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; min-width: 0;
  display: flex; gap: 10px; align-items: flex-start;
}
.xa-avatar {
  flex: 0 0 auto; position: relative; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
  color: #fff; font-weight: 700; font-size: 17px; user-select: none;
}
.xa-avatar-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.xa-post-main { flex: 1; min-width: 0; }
.xa-post-head { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; }
.xa-post-name { font-weight: 700; color: var(--text); font-size: 14px; }
.xa-post-handle { color: var(--dim); font-size: 12.5px; }
.xa-badge {
  display: inline-block; font-size: 10.5px; font-weight: 700; color: #fff;
  border-radius: 8px; padding: 1px 7px;
}
.xa-badge-rt { background: var(--green); }
.xa-badge-reply { background: var(--accent); color: #000; }
.xa-post-sub { font-size: 12px; color: var(--dim); margin-top: 2px; }
.xa-post-body {
  margin-top: 8px; font-size: 14px; line-height: 1.6; color: var(--text);
  white-space: pre-wrap; word-break: break-word; overflow-wrap: anywhere;
}
.xa-post-body a { color: var(--accent); text-decoration: underline; }
.xa-post-media {
  display: grid; gap: 4px; margin-top: 10px; border-radius: 8px; overflow: hidden;
}
.xa-post-media-1 { grid-template-columns: 1fr; }
.xa-post-media-2 { grid-template-columns: 1fr 1fr; }
.xa-post-media-3 { grid-template-columns: 1fr 1fr; }
.xa-post-media-3 .xa-media-item:first-child { grid-column: 1 / 3; }
.xa-post-media-4 { grid-template-columns: 1fr 1fr; }
.xa-media-item { display: block; position: relative; aspect-ratio: 16 / 10; background: var(--bg); }
.xa-post-media-2 .xa-media-item, .xa-post-media-4 .xa-media-item { aspect-ratio: 1 / 1; }
.xa-media-item img, .xa-media-item video {
  display: block; width: 100%; height: 100%; max-width: 100%; object-fit: cover;
}
.xa-media-item img.xa-media-err {
  visibility: hidden;
}
.xa-media-item:has(img.xa-media-err)::before {
  content: '画像を読み込めません'; position: absolute; inset: 0; display: flex;
  align-items: center; justify-content: center; text-align: center; padding: 8px;
  font-size: 11.5px; color: var(--dim); background: var(--surface);
}
.xa-post-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 10px; flex-wrap: wrap;
}
.xa-post-time { font-size: 11.5px; color: var(--dim); }
.xa-post-foot .admin-btn { min-height: 32px; padding: 6px 14px; }
.xa-sentinel { height: 1px; }

@media (max-width: 640px) {
  #sec-xarchive .admin-input { font-size: 16px; /* iOSズーム防止 */ }
  .xa-post-name { font-size: 13.5px; }
  .xa-post-body { font-size: 13.5px; }
  .xa-avatar { width: 34px; height: 34px; font-size: 14.5px; }
}

/* ── PWA案内（.pwa-note）はPWAとして起動中は表示しない ── */
@media (display-mode: standalone) {
  .pwa-note { display: none !important; }
}
.pwa-note a { color: var(--accent); }

/* ── 通知機能の告知（NEWバッジ＋吹き出し） ── */
#mypage-open-btn { position: relative; }
.new-badge {
  position: absolute; top: -7px; right: -8px;
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 1;
  padding: 3px 5px; border-radius: 8px; letter-spacing: .05em;
  pointer-events: none;
}
.notice-bubble {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}
.notice-bubble::after,
.notice-bubble::before {
  content: ''; position: absolute; left: 24px;
  border: 6px solid transparent;
}
.notice-bubble::before { bottom: -13px; border-top-color: var(--accent); }
.notice-bubble::after  { bottom: -11px; border-top-color: var(--surface); }
