/* Shared interaction geometry. Keep component states beside their base styles. */
:root { --surface: #fff; --soft: #edf2f8; --accent: #89a4c9; --radius: 16px; }
html { scrollbar-gutter: stable; scroll-padding-top: 110px; }
body { background: #f6f8fc; }
.icon { width: 18px; height: 18px; display: inline-block; flex: 0 0 auto; vertical-align: middle; }
button, .button, .file-label { min-height: 44px; line-height: 1.4; gap: 10px; }
button:hover, .button:hover { transform: none; }
button:active, .button:active { transform: scale(.97); }
.button, .file-label { align-items: center; justify-content: center; }
.text-link, .section-head>a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.text-link:hover, .section-head>a:hover { color: #496e9e; }
body>header { height: 80px; box-shadow: none; }
nav a[aria-current] { box-shadow: none; border: 0; }
nav a[aria-current]::after { content: ''; position: absolute; width: 18px; height: 3px; border-radius: 3px; background: var(--accent); left: calc(50% - 9px); bottom: 14px; }
.page-title { margin: 0 0 26px; padding: 20px 0 0; }
.page-title h1 { font-size: clamp(30px, 4vw, 46px); margin: 10px 0 12px; }
.page-title p:empty { display: none; }
.page-title p { margin: 0; }
.scene-hero { min-height: 540px; }
.hero-copy .actions { align-items: center; gap: 12px; }
.hero-copy .button { min-height: 50px; padding: 14px 22px; }
.hero-copy .button span { margin: 0; }
.hero-copy .text-link { padding: 12px 16px; border-radius: 30px; background: #e9eef6; }
.hero-word { font-weight: 800; }
.floating-photo { cursor: default; }
.home-columns { grid-template-columns: 1fr 1fr; gap: 32px; }
.section-head { gap: 12px; margin: 32px 0 16px; align-items: center; }
.section-head h2 { font-size: 23px; }
.section-head>a { font-size: 12px; white-space: nowrap; color: #6880a0; }
.schedule-teaser { display: flex; align-items: center; padding: 26px; gap: 20px; border: 1px solid #dce5f0; background: #edf2fa; min-height: 150px; border-radius: var(--radius); }
.schedule-teaser>div { min-width: 0; }
.date-stamp { flex: 0 0 58px; width: 58px; text-align: center; font-size: 28px; line-height: 1.1; padding: 12px 0; border-radius: 12px; background: #ffffffb3; }
.date-stamp .icon { width: 24px; height: 24px; color: #7191b8; }
.audio-options { margin-top: 18px; padding: 16px 0; border-top: 1px solid #dce5f0; }
.audio-options summary { cursor: pointer; color: #6880a0; font-size: 12px; padding: 8px 0; }
.audio-options .file-label { margin-top: 12px; }
.audio-options p { font-size: 12px; max-width: 540px; line-height: 1.7; }
.date-stamp small { font-size: 9px; margin: 5px 0 0; }
.schedule-teaser h3 { font-size: 16px; margin: 8px 0; }
.schedule-teaser p { font-size: 12px; margin: 0; }
.pill { background: none; color: #6782a6; padding: 0; font-size: 10px; }
.notice-row { display: grid; grid-template-columns: minmax(0,1fr); padding: 22px 24px; margin: 0; border-radius: var(--radius); gap: 0; box-shadow: none; }
.notice-row+.notice-row { margin-top: 10px; }
.notice-row h3 { margin: 0 0 8px; font-size: 17px; line-height: 1.55; }
.notice-row small { font-size: 11px; }
.notice-row>span { display: none; }
.notice-row .source-links { margin-top: 12px; gap: 8px; }
.notice-row:hover { transform: none; box-shadow: 0 4px 16px #335b8010; background: #fff; }
.source-links a { display: inline-flex; align-items: center; gap: 5px; min-height: 28px; padding: 4px 10px; background: var(--mist); border-radius: 7px; }
.source-links .icon { width: 12px; height: 12px; }
.toolbar { margin: 24px 0; }
.toolbar input { width: 100%; max-width: 540px; min-height: 48px; padding: 13px 18px; border-radius: 14px; box-shadow: none; background: #fff; }
.toolbar input:focus { border-color: var(--accent); }
.cards { gap: 28px 22px; }
.card-image-wrap { border-radius: 14px; }
.card-image { display: block; aspect-ratio: 16/9; }
.card h3 { font-size: 14px; margin: 12px 0 5px; }
.card .play { height: 36px; width: 36px; opacity: .9; transform: translateY(3px); transition: opacity .18s, transform .18s; }
.card:hover .play { opacity: 1; transform: none; }
.tabs { gap: 6px; width: fit-content; max-width: 100%; padding: 5px; border-radius: 12px; background: #eaf0f7; }
.tabs button, .tabs>a.button { min-height: 40px; padding: 9px 16px; border: 0; box-shadow: none; border-radius: 9px; background: transparent; font-size: 13px; }
.tabs button.active, .tabs>a.primary { color: var(--ink); background: var(--surface); box-shadow: 0 2px 5px #2544650c; }
.tabs small { display: inline-grid; place-items: center; min-width: 22px; margin-left: 5px; }
.song-row { border-radius: 14px; padding: 18px 22px; box-shadow: none; }
.song-row:hover { transform: none; box-shadow: none; border-color: #c3d1e4; }
.song-row .number { font-family: inherit; font-size: 12px; }
.song-row h3 { font-size: 16px; line-height: 1.5; margin: 0 0 5px; }
.song-row small { font-size: 11px; }
.song-row .controls { min-width: 0; gap: 8px; }
.date-control { width: auto; min-width: 0; flex: 1; }
.date-picker summary { min-height: 44px; padding: 10px 12px; border: 1px solid transparent; background: #f0f4f9; border-radius: 10px; }
.date-label { overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-variant-numeric: tabular-nums; }
.date-picker summary .chevron { display: grid; place-items: center; }
.date-picker summary .icon { width: 15px; height: 15px; }
.date-picker[open] summary { border-color: #a9bdd8; background: #f0f4f9; }
.date-menu { min-width: 240px; padding: 6px; border-radius: 12px; }
.date-menu button { border-radius: 7px; }
.song-row .controls>button { width: 42px; min-width: 42px; height: 44px; border-radius: 10px; background: #eef3f9; }
.song-row .controls>button[data-selected-play] { background: #dce6f4; color: #395b89; }
.heart[aria-pressed=true] .icon-heart { fill: currentColor; }
.heart[aria-pressed=true] { animation: heart-tap .25s ease-out; }
.playlist-row { grid-template-columns: 30px 24px minmax(0,1fr) auto; }
.playlist-row .controls { grid-column: 4; width: auto; }
.playlist-row .controls>button { width: 44px; min-width: 44px; padding: 0; }
.drag-handle { min-width: 30px; min-height: 44px; padding: 0; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; margin: 32px 0; }
.pagination>span { color: #788aa2; font-size: 12px; font-variant-numeric: tabular-nums; }
.pagination button, [data-more-media] { background: white; border-radius: 12px; padding: 12px 22px; font-size: 13px; }
.calendar-head .actions { flex-wrap: nowrap; align-items: center; }
.calendar-head .actions>button { width: 40px; min-height: 40px; padding: 0; border: 0; background: #ffffffb3; border-radius: 10px; }
.calendar-head .actions h2 { min-width: 105px; justify-content: center; }
.day-label { background: #f7f9fc; }
.diary-day:hover { transform: none; }
.motion-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 8px 12px; border-radius: 10px; color: #617c9f; }
.motion-toggle .icon { width: 14px; height: 14px; }
.settings-grid { gap: 20px; }
.setting { display: flex; flex-direction: column; padding: 26px; }
.setting .actions { margin-top: auto; align-items: stretch; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.setting .actions>a, .setting .actions>button, .setting .file-label { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 12px; border: 1px solid #dce5f0; border-radius: 10px; background: #f7f9fc; font-size: 12px; margin: 0; white-space: nowrap; }
.file-label:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.file-label { position: relative; }
.file-label input { display: block; position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; overflow: hidden; }
.gallery-grid { gap: 16px; }
.gallery-photo { border-radius: 14px; }
.gallery-photo:hover { transform: none; }
.media-library { padding: 28px 0; background: transparent; border: 0; }
.media-library>.section-head { margin-top: 0; }
[data-more-media] { display: flex; margin: 24px auto 0; }
.account-orbit { animation: none; }
.account-intro { background: #dfe8f4; }
.account-panel, .connection-panel { border-radius: 18px; }
#player { z-index: 15; border-radius: 16px; }
#player .player-actions button { border: 0; min-height: 36px; background: #f0f4f9; border-radius: 9px; }
#close-player .icon, #close-dialog .icon { width: 17px; height: 17px; }
#toast { border-radius: 12px; bottom: 22px; box-shadow: 0 8px 32px #20314922; }
dialog[open] { animation: dialog-in .2s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes heart-tap { 50% { transform: scale(1.12); } }
@media(min-width:1100px) {
  .song-row:not(.playlist-row) { grid-template-columns: 24px minmax(0,1fr) 330px; gap: 16px; }
  .song-row:not(.playlist-row) .controls { grid-column: 3; }
  .playlist-row { grid-template-columns: 30px 24px minmax(0,1fr) auto; }
  .playlist-row .controls { grid-column: 4; }
}
@media(max-width:900px) {
  .home-columns { grid-template-columns: 1fr; gap: 8px; }
  .section-head h2 { white-space: normal; }
}
@media(max-width:700px) {
  html { scroll-padding-top: 120px; }
  body>header { height: auto; min-height: 104px; padding: 12px 5% 0; }
  nav a[aria-current]::after { bottom: 5px; }
  main { padding: 22px 5% 50px; }
  .scene-hero { min-height: 0; }
  .hero-copy .actions { gap: 10px; }
  .hero-copy .button, .hero-copy .text-link { min-height: 46px; font-size: 12px; padding: 12px 15px; }
  .hero-copy h1 { font-size: 39px; }
  .hero-word { font-size: clamp(58px,18vw,76px); }
  .section-head { align-items: center; }
  .section-head h2 { font-size: 20px; }
  .section-head>a { font-size: 11px; }
  .schedule-teaser { padding: 20px; gap: 16px; }
  .notice-row { padding: 20px; }
  .notice-row h3 { font-size: 16px; }
  .cards { gap: 22px 12px; }
  .card h3 { font-size: 12px; }
  .song-row { padding: 16px; grid-template-columns: 20px minmax(0,1fr); gap: 8px 10px; }
  .song-row h3 { font-size: 15px; }
  .song-row .controls { grid-column: 2; display: flex; flex-wrap: nowrap; width: 100%; }
  .song-row .controls>button { width: 40px; min-width: 40px; padding: 0; }
  .date-picker summary { padding: 10px 8px; gap: 4px; }
  .date-label { font-size: 10px; }
  .date-menu { min-width: 0; width: calc(100% + 96px); max-width: calc(100vw - 100px); }
  .playlist-row { grid-template-columns: 24px 20px minmax(0,1fr); }
  .playlist-row .controls { grid-column: 3; justify-content: flex-end; }
  .playlist-row .drag-handle { grid-row: 1 / 3; }
  .calendar-head .actions { gap: 4px; }
  .diary-book .calendar-head { padding: 12px; gap: 8px; }
  .calendar-head .actions h2 { min-width: 90px; gap: 8px; }
  .calendar-head .motion-toggle { margin-left: auto; font-size: 10px; padding: 8px; }
  .setting { padding: 22px; }
  .setting .actions { gap: 8px; }
  .setting .actions>a, .setting .actions>button, .setting .file-label { font-size: 11px; padding: 10px 8px; }
  .setting .icon { width: 15px; height: 15px; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  .gallery-photo video { height: 185px; }
  .media-library { padding: 20px 0; }
  .pagination { gap: 12px; margin: 28px 0; }
  #player { width: 290px; }
}
@media(prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation: none!important; transition: none!important; scroll-behavior: auto!important; }
}

/* Mobile diary: one readable week and one full-size day, rather than 35 tiny tiles. */
.mobile-diary { display: none; }
.week-navigation { display:flex; align-items:center; gap:8px; }
.week-navigation>button { width:38px; min-height:38px; padding:0; border:0; background:#edf2f8; }
.week-navigation>span { flex:1; text-align:center; font-size:12px; font-variant-numeric:tabular-nums; color:#667e9f; }
.week-navigation [data-diary-today] { width:auto; padding:0 12px; font-size:12px; margin-left:4px; }
.week-strip { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin:18px 0 24px; }
.week-strip>button { padding:10px 0 7px; border:0; border-radius:24px; display:flex; flex-direction:column; gap:7px; background:transparent; color:#445c7c; }
.week-strip small { font-size:11px; }
.week-strip b { font-size:17px; font-weight:600; }
.week-strip i { width:4px; height:4px; border-radius:50%; background:transparent; }
.week-strip i.has-record { background:#89a4c9; }
.week-strip>button[aria-pressed="true"] { background:#324e72; color:#fff; box-shadow:0 6px 15px #324e7220; }
.week-strip>button[aria-pressed="true"] i.has-record { background:#fff; }
.day-feature { border-top:1px solid #e3e9f1; padding-top:23px; }
.day-feature-heading { display:flex; align-items:center; gap:12px; }
.day-feature-heading>div { min-width:0; flex:1; }
.day-feature-heading .eyebrow { font-size:10px; letter-spacing:.08em; }
.day-feature-heading h2 { font-size:21px; margin:8px 0 18px; letter-spacing:-.04em; }
.day-feature-heading .broadcast-badge { flex-shrink:0; margin:0 0 12px; font-size:11px; padding:5px 9px; }
.day-holiday { color:var(--sun); font-size:12px; margin:0 0 14px; }
.day-feature-photo { position:relative; display:block; width:100%; padding:0; border:0; border-radius:18px; overflow:hidden; background:var(--mist); }
.day-feature-photo video,.day-feature-photo img { display:block; width:100%; height:245px; object-fit:cover; object-position:center 35%; }
.day-feature-photo>span { position:absolute; inset:auto 0 0; padding:30px 16px 14px; display:flex; align-items:center; justify-content:space-between; font-size:12px; color:#fff; background:linear-gradient(transparent,#253b5a99); }
.day-feature-empty { display:flex; align-items:center; gap:18px; background:#f2f5fa; padding:25px 20px; border-radius:18px; }
.day-feature-empty img { width:64px; height:64px; border-radius:50%; object-fit:cover; }
.day-feature-empty p { color:var(--muted); font-size:13px; line-height:1.7; }
.day-feature-event { display:flex; gap:14px; padding:18px 0; border-bottom:1px solid var(--line-soft); }
.day-feature-event time { min-width:52px; color:#7e96b4; font-size:12px; padding-top:3px; }
.day-feature-event h3 { font-size:15px; margin:0; overflow-wrap:anywhere; }
.day-feature-event p { font-size:13px; line-height:1.7; white-space:pre-line; overflow-wrap:anywhere; }
.day-replay { display:flex; align-items:center; gap:12px; padding:18px 0; border-bottom:1px solid var(--line-soft); }
.day-replay>span { min-width:0; flex:1; }
.day-replay small { display:block; font-size:10px; color:var(--muted); margin-bottom:4px; }
.day-replay b { display:block; font-size:13px; font-weight:500; line-height:1.6; overflow-wrap:anywhere; }
.day-replay>.icon:first-child { width:34px; height:34px; padding:9px; border-radius:50%; background:#e9eff7; }
.day-detail-button { margin-top:16px; width:100%; display:flex; align-items:center; justify-content:space-between; border:0; border-radius:12px; padding:12px 14px; background:#f0f4fa; font-size:12px; }
@media(max-width:700px) {
  .monthly-calendar { display:none!important; }
  .mobile-diary { display:block; padding:18px; }
  .diary-book { border-radius:22px; }
  .diary-book .calendar-head { padding:18px; border-bottom:1px solid #e2e9f2; background:#eef3fa; }
  .calendar-head .actions h2 { min-width:100px; }
  .calendar-head .motion-toggle { padding:8px 0 8px 8px; }
  .page-title { padding-top:6px; margin-bottom:24px; }
  .page-title h1 { font-size:30px; }
  .page-title p { font-size:13px; line-height:1.7; }
  .account-panel { display:flex; flex-direction:column; }
  .account-intro { padding:24px!important; }
  .account-intro h2 { font-size:24px!important; margin:10px 0!important; }
  .account-intro p { display:none; }
  .account-orbit { display:none; }
  .account-panel form { padding:24px!important; min-width:0; }
  .connection-panel { padding:24px 20px; }
  .connection-row { gap:12px; flex-wrap:wrap; }
  .connection-row>div { min-width:0; flex:1; }
  .connection-row>a { font-size:11px; min-height:40px; padding:9px 12px; }
  .settings-grid { grid-template-columns:1fr; }
  .hades-banner { padding:28px 22px; gap:20px; }
  .hades-banner h2 { font-size:26px; }
  .hades-banner strong { font-size:22px; }
  .hero-copy h1 { font-size:38px; line-height:1.25; }
  .scene-hero { gap:22px; }
  .hero-foot { margin-top:24px; }
  .moment-banner { margin-top:28px; }
  .quick-rail { gap:0; padding:10px 0; }
  .quick-rail a { font-size:12px; padding:14px 6px; }
  .gallery-photo video { height:170px; }
  .song-row h3 { overflow-wrap:anywhere; }
  .song-row .meta { line-height:1.6; }
  .tabs { display:flex; width:100%; }
  .tabs button { flex:1; padding:10px 8px; font-size:12px; white-space:nowrap; }
  .tabs small { margin-left:5px; }
  .letter-head { padding:35px 22px 22px; }
  .letter-body { padding:22px; overflow-wrap:anywhere; }
  .letter-head h2 { padding-right:16px; }
  .diary-detail { padding:16px; }
  .diary-detail h2 { font-size:25px; }
  .replay-list a { overflow-wrap:anywhere; }
  .replay-list article { gap:10px; }
  #toast { max-width:calc(100vw - 36px); width:max-content; font-size:13px; }
}
@media(max-width:360px) {
  nav a { font-size:10px; padding:10px 5px; }
  .mobile-diary { padding:14px; }
  .week-strip { gap:2px; }
  .calendar-head .motion-toggle { font-size:9px; gap:3px; }
  .song-row { padding:14px 10px; grid-template-columns:16px minmax(0,1fr); gap:8px; }
  .song-row .controls>button { width:36px; min-width:36px; }
  .date-label { font-size:10px; }
}
.diary-book .week-strip>button[aria-pressed="true"] { color:var(--on-ink); }
.week-strip small { color:inherit; opacity:1; }
@media(max-width:700px) {
  .account-intro { display:none; }
  .account-content { padding:24px; }
  .account-panel form { padding:0!important; }
  .auth-tabs { margin-bottom:20px; }
  .connection-row .button { margin-left:0; }
  .connection-row p { line-height:1.6; }
}
@media(max-width:360px) {
  .diary-book .calendar-head { padding:14px; gap:6px; }
  .calendar-head .actions { gap:3px; }
  .calendar-head .actions>button { width:32px; height:36px; min-height:36px; }
  .calendar-head .actions h2 { min-width:76px; font-size:12px; gap:6px; }
  .calendar-head em { font-size:25px; }
}
@media(max-width:700px) {
  .moment-banner { grid-template-columns:.8fr 1.2fr; min-height:190px; }
  .moment-banner>video,.moment-banner>img { height:190px; mask-image:linear-gradient(90deg,#000 85%,transparent); }
  .moment-banner>div { padding:20px 15px 26px; }
  .moment-banner h2 { font-size:21px; line-height:1.5; }
  .moment-banner .eyebrow { font-size:8px; letter-spacing:.12em; }
  .moment-banner .text-link { font-size:11px; gap:4px; }
  .moment-banner .art-credit { font-size:7px; right:12px; }
}
/* Owner-only management workspace. */
.admin-entry { display:flex; align-items:center; gap:16px; margin-bottom:24px; padding:22px; background:#304e74; color:white; border-radius:18px; }
.admin-entry span { flex:1; font-size:13px; }
.admin-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; margin:24px 0; }
.admin-stats span { padding:20px; background:var(--surface); border:1px solid var(--line); border-radius:16px; color:var(--muted); font-size:12px; }
.admin-stats b { color:var(--ink); font-size:27px; margin-right:10px; }
.admin-tabs { display:flex; width:auto; gap:8px; margin:0 0 20px; }
.admin-tabs button { background:transparent; border:0; padding:12px 22px; }
.admin-tabs button[aria-pressed="true"] { background:#304e74; color:white; }
.admin-content { max-width:900px; }
.admin-content h2 { font-size:22px; }
.admin-card { margin:14px 0; background:var(--surface); border:1px solid var(--line); border-radius:16px; padding:22px; }
.admin-card summary { cursor:pointer; min-height:36px; line-height:1.8; }
.admin-card summary time { display:block; font-size:12px; color:var(--muted); }
.admin-card form { padding-top:20px; }
.admin-card label { display:block; font-size:13px; }
.admin-card input:not([type="checkbox"]),.admin-card textarea,.admin-card select { width:100%; min-width:0; }
.admin-card input[type="checkbox"] { width:18px; height:18px; margin-right:7px; }
.admin-card textarea { min-height:90px; }
.admin-field-row { display:grid; grid-template-columns:minmax(0,1fr) 100px; gap:16px; }
.admin-card input[type="color"] { padding:4px; height:44px; }
.admin-danger { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:25px; border-top:1px solid var(--line); padding-top:18px; color:var(--danger); }
.admin-danger label { margin:0; }
.admin-danger button { color:var(--danger); border-color:var(--line-2); }
.member-card { display:flex; align-items:center; gap:22px; }
.member-card>div { flex:1; min-width:0; }
.member-card strong,.member-card small { display:block; overflow-wrap:anywhere; }
.member-card small { margin-top:5px; color:var(--muted); }
.member-card label { margin:0; }
.admin-tag { font-size:12px; color:var(--brand-ink); }
.admin-media-preview img,.admin-media-preview video { width:100%; max-height:250px; object-fit:contain; border-radius:12px; background:var(--mist); }
.admin-message { color:var(--brand-ink); min-height:24px; }
@media(max-width:700px){
 .admin-entry{flex-wrap:wrap;gap:9px;padding:18px}.admin-entry span{font-size:11px}
 .admin-stats{gap:7px}.admin-stats span{padding:14px 10px}.admin-stats b{display:block;margin:0 0 4px}
 .admin-tabs{gap:0}.admin-tabs button{flex:1;padding:10px 8px;font-size:12px}
 .admin-card{padding:18px}.member-card{flex-wrap:wrap;gap:14px}.member-card>div{flex-basis:100%}
 .admin-field-row{grid-template-columns:minmax(0,1fr) 66px;gap:10px}
 .admin-danger{align-items:flex-start;font-size:11px;flex-wrap:wrap}
}
