/* ダンドリー — 舞台人のためのサイトの仲間。ボルドーと象牙色、金の細線。書体はしっぽり明朝だけ（太さで分ける） */
:root {
  --bordeaux: #4E1020; --wine: #6B1A2C; --gold: #C9A257; --gold-soft: #E3CB92;
  --paper: #FBF6EC; --card: #FFFDF8; --line: #E4D6BD; --ink: #2E1A1E; --muted: #7B6467;
  --ng: #9B1C2C; --ng-bg: #F6DCDD; --part: #A86B00; --part-bg: #F8EBCF; --ok: #2F6B4A; --ok-bg: #E2F0E6;
}
* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.7 'Shippori Mincho', 'Hiragino Mincho ProN', serif; -webkit-font-smoothing: antialiased; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
a { color: var(--wine); }
h2 { font-size: 20px; font-weight: 800; margin: 22px 0 10px; letter-spacing: .06em; }
h3 { font-size: 17px; font-weight: 800; margin: 18px 0 8px; }
p { margin: 8px 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.right { text-align: right; }

/* 上の帯：とっておき・おとなりさんと同じ形（明るいすりガラス・左にロゴと肩書き・案内・右に9つの点）。帯の文字はメイリオ */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 6px 20px; background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(16px) saturate(150%); backdrop-filter: blur(16px) saturate(150%); border-bottom: 1px solid rgba(15, 37, 51, .08); box-shadow: 0 6px 24px rgba(15, 37, 51, .06); color: #0f2533; font-family: Meiryo, 'メイリオ', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif; line-height: 1.35; }
.logo { color: inherit; text-decoration: none; }
.brand { display: flex; align-items: center; gap: 12px; min-height: 54px; }
.brand-word { font-size: 24px; font-weight: 800; letter-spacing: .08em; color: #0f2533; }
.brand-tag { font-size: 11px; letter-spacing: .32em; font-weight: 600; }
.top nav { display: flex; gap: 2px; flex-wrap: wrap; align-items: stretch; }
.top nav a.navi { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 10px; color: inherit; text-decoration: none; }
.top nav a.navi:hover { background: rgba(15, 37, 51, .05); }
.top nav a.navi.on { background: rgba(15, 37, 51, .07); }
.navi b { display: block; font-size: 14px; font-weight: 700; }
.navi small { display: block; font-size: 10.5px; opacity: .65; letter-spacing: .02em; }
.top nav a.navi.out { opacity: .75; font-size: 12px; }
.top nav a.navi.out b { font-size: 12px; font-weight: 500; }
.ic { width: 1.15em; height: 1.15em; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.navi-i .ic { width: 22px; height: 22px; }
.htools { display: flex; gap: 6px; align-items: center; }
.hbtn { display: flex; align-items: center; gap: 6px; background: rgba(255, 255, 255, .12); color: inherit; border: 1px solid rgba(15, 37, 51, .14); border-radius: 999px; padding: 5px 8px; font: inherit; font-size: 13px; cursor: pointer; }
.hbtn:hover { background: rgba(15, 37, 51, .05); }
.hbtn .ic { width: 18px; height: 18px; }
.hmenu { position: fixed; z-index: 60; background: #fff; color: #0f2533; border: 1px solid #dbe6ee; border-radius: 12px; box-shadow: 0 12px 30px rgba(8, 40, 70, .22); padding: 6px; display: flex; flex-direction: column; min-width: 260px; font-family: Meiryo, 'メイリオ', 'Hiragino Sans', sans-serif; }
.hmenu .site-row { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: inherit; }
.hmenu .site-row img, .hmenu .site-ini { grid-row: 1 / 3; width: 44px; height: 44px; object-fit: contain; border-radius: 8px; background: #f4f8fb; }
.hmenu .site-ini { display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; color: var(--bordeaux); font-family: 'Shippori Mincho', serif; }
.hmenu .site-row b { font-size: 14px; }
.hmenu .site-row small { font-size: 12px; color: #4d6475; }
.hmenu a.site-row:hover { background: #eef5fa; }
.hmenu .site-row.hub { border-bottom: 1px solid #dbe6ee; border-radius: 10px 10px 0 0; margin-bottom: 4px; }
.hmenu .site-row.soon { opacity: .5; }
.hmenu .site-row.here { background: #f4f8fb; }
@media (max-width: 640px) {
  .top { padding: 6px 12px; gap: 6px; }
  .brand { min-height: 44px; gap: 8px; }
  .brand-word { font-size: 20px; }
  .brand-tag { font-size: 10px; letter-spacing: .2em; }
  .top nav { order: 3; width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .top nav a.navi { flex: none; padding: 6px 8px; gap: 6px; }
  .navi small { display: none; }
  .navi-i .ic { width: 18px; height: 18px; }
  .top nav a.navi.out { margin-left: auto; }
}

/* 公演名とタブ（上に貼りつく） */
#sub { position: sticky; top: var(--hh, 0); z-index: 20; background: var(--paper); border-bottom: 1px solid var(--line); }
#sub:empty { display: none; }
.ev-title { display: flex; align-items: baseline; gap: 10px; padding-top: 8px; }
.ev-title b { font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-title a { font-size: 12px; white-space: nowrap; }
.save-st { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 6px 0 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; padding: 8px 12px 10px; border-bottom: 3px solid transparent; }
.tabs a.on { color: var(--bordeaux); border-bottom-color: var(--gold); font-weight: 800; }

/* 部品 */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin: 14px 0; }
.panel.narrow { max-width: 440px; margin: 28px auto; }
.btn { font: inherit; font-weight: 800; background: var(--bordeaux); color: var(--paper); border: 1px solid var(--bordeaux); border-radius: 999px; padding: 10px 22px; cursor: pointer; text-decoration: none; display: inline-block; letter-spacing: .06em; white-space: nowrap; }
.btn.ghost { background: transparent; color: var(--bordeaux); }
.btn.sm { padding: 5px 14px; font-size: 14px; }
.btn.block { display: block; width: 100%; text-align: center; }
.btn:disabled { opacity: .45; cursor: default; }
.mini { font: inherit; font-size: 13px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 6px; padding: 3px 10px; cursor: pointer; }
.mini.on { background: var(--bordeaux); color: var(--paper); border-color: var(--bordeaux); }
.mini.danger { color: var(--ng); }
.row { display: flex; align-items: center; }
.gap { gap: 8px; }
.wrap-row { flex-wrap: wrap; }
.grow { flex: 1; }
label { display: block; font-size: 14px; font-weight: 600; margin: 10px 0 0; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; width: 100%; margin-top: 4px; }
input[type=checkbox], input[type=radio] { width: auto; margin: 0 6px 0 0; accent-color: var(--bordeaux); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 12px; }
.chip { display: inline-block; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 1px 10px; margin: 2px 4px 2px 0; background: #fff; white-space: nowrap; }
.chip.ng { background: var(--ng-bg); border-color: #E7B8BB; color: var(--ng); }
.chip.part { background: var(--part-bg); border-color: #EBD3A0; color: var(--part); }
.chip.ok { background: var(--ok-bg); border-color: #BCDAC5; color: var(--ok); }
.chip.gold { border-color: var(--gold); color: #7A5A1E; }
.note { border-left: 4px solid var(--gold); background: #FFF8E8; padding: 10px 12px; border-radius: 0 6px 6px 0; margin: 12px 0; font-size: 14px; }
.note.warn { border-left-color: var(--ng); background: #FCEDEE; }
.empty { text-align: center; color: var(--muted); padding: 28px 8px; }
.list-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.card-link { display: block; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--gold); border-radius: 8px; padding: 14px 16px; margin: 10px 0; text-decoration: none; color: var(--ink); }
.card-link b { font-size: 17px; }

/* 表 */
.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
table.tbl { border-collapse: collapse; width: 100%; font-size: 14px; }
.tbl th, .tbl td { border-bottom: 1px solid var(--line); border-right: 1px solid #F0E6D4; padding: 6px 8px; text-align: center; white-space: nowrap; }
.tbl th { background: #F6EEDF; font-weight: 800; position: sticky; top: 0; }
.tbl .stick { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; box-shadow: 1px 0 0 var(--line); }
.tbl th.stick { background: #F6EEDF; z-index: 2; }
.tbl td.cell { cursor: pointer; min-width: 40px; font-size: 18px; color: var(--bordeaux); user-select: none; }
.tbl td.cell:hover { background: #FBF3E3; }
.tbl td.ng { background: var(--ng-bg); color: var(--ng); font-weight: 800; }
.tbl td.part { background: var(--part-bg); color: var(--part); font-size: 12px; }
.tbl tr.sum td { background: #FAF5EA; font-size: 13px; }
.vhead { writing-mode: vertical-rl; text-orientation: upright; letter-spacing: .05em; line-height: 1.2; max-height: 8em; overflow: hidden; margin: 0 auto; }
.tbl th button { font: inherit; font-weight: 800; background: none; border: 0; color: inherit; cursor: pointer; padding: 0; }
.sname { display: inline-block; max-width: 14em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 560px) { .sname { max-width: 7.5em; } }
.prog { display: inline-block; width: 56px; height: 8px; background: #EFE4D0; border-radius: 4px; overflow: hidden; vertical-align: middle; }
.prog i { display: block; height: 100%; background: var(--gold); }

/* 出られない日のカレンダー（スマホ優先） */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin: 6px 0; }
.cal-head b { font-size: 18px; }
.cal-head button { font: inherit; font-size: 22px; background: none; border: 0; color: var(--bordeaux); padding: 4px 14px; cursor: pointer; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal .wd { text-align: center; font-size: 12px; color: var(--muted); }
.cal .wd.sun, .cal .day.sun .n { color: #B3261E; }
.cal .wd.sat, .cal .day.sat .n { color: #1F5BA8; }
.cal .day { font: inherit; aspect-ratio: 1 / 1.05; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 2px; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; cursor: pointer; position: relative; color: var(--ink); min-width: 0; }
.cal .day .n { font-size: 16px; font-weight: 600; line-height: 1.5; }
.cal .day .m { font-size: 10px; line-height: 1.2; text-align: center; overflow: hidden; }
.cal .day.reh { border-color: var(--gold); border-width: 2px; }
.cal .day.reh::after { content: ""; position: absolute; top: 4px; right: 4px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.cal .day.ng { background: var(--ng); border-color: var(--ng); color: #fff; }
.cal .day.ng .n { color: #fff; }
.cal .day.ng::after { background: #fff; }
.cal .day.part { background: var(--part-bg); border-color: var(--part); }
.cal .day.out { visibility: hidden; }
.cal .day.past { opacity: .4; }
.cal .day.today .n { text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 2px; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 8px 0; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; border: 1px solid var(--line); }

/* 下から出る小窓 */
.sheet-bg { position: fixed; inset: 0; background: rgba(46, 26, 30, .45); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet { background: var(--card); width: 100%; max-width: 560px; border-radius: 14px 14px 0 0; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); max-height: 88vh; overflow-y: auto; border-top: 3px double var(--gold); }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 12px; border: 1px solid var(--line); border-top: 3px double var(--gold); } }
.sheet h3 { margin-top: 0; }
.choice { display: grid; gap: 8px; margin: 12px 0; }
.choice button { font: inherit; font-size: 17px; font-weight: 800; padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; text-align: left; }
.choice button.on { border: 2px solid var(--bordeaux); background: #FBF0F1; }
.choice button small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }

/* 計画 */
.plan-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-row .t { font-weight: 800; font-size: 15px; color: var(--bordeaux); }
.plan-row.brk { color: var(--muted); }
.plan-row b { word-break: break-all; }
.plan-row .why { font-size: 12px; color: var(--muted); }
.ann-text { min-height: 280px; line-height: 1.9; }
.check { display: flex; align-items: flex-start; gap: 6px; font-weight: 400; margin: 0; cursor: pointer; }
.check input { margin-top: 6px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-size: 14px; opacity: 0; pointer-events: none; transition: .25s; z-index: 80; max-width: calc(100% - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%); }
.print-only { display: none; }
[title] { cursor: help; }
button[title], a[title], td[title] { cursor: pointer; }
@media (max-width: 560px) {
  h2 { font-size: 18px; }
  .tabs a { font-size: 14px; padding: 8px 8px 10px; }
  .tabs { gap: 0; justify-content: space-between; }
  .hide-sp { display: none; }
  .plan-row { grid-template-columns: 48px 1fr auto; }
  .plan-ctl { flex-direction: column; align-items: flex-end; gap: 4px; }
  .note .chip { max-width: 100%; }
}
@media print {
  .top, #sub, .no-print, #toast { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
  .panel { border: 0; padding: 0; }
}
