/* v18.13: keep public PC pages and navigation inside the viewport at 100% size.
   Long lists use their own scroll regions. The separate admin dialog is unchanged. */
@media (min-width:1024px) {
  html { height:100%; overflow:hidden; scroll-padding-top:0; }
  body { height:100vh; height:100dvh; min-height:0; overflow:hidden; }
  .app-wrap,
  body.is-voices-tab .app-wrap {
    display:grid; grid-template-columns:minmax(0,1fr);
    grid-template-rows:60px minmax(0,1fr) 28px;
    width:100%; max-width:1440px; height:100vh; height:100dvh; min-height:0;
    padding:0 24px; overflow:clip;
  }
  .app-wrap > .masthead { grid-column:1; grid-row:1; min-width:0; min-height:0; }
  .app-wrap > .page {
    grid-column:1; grid-row:2; min-width:0; min-height:0; height:100%;
    padding-top:8px; padding-bottom:8px; overflow:clip;
  }
  .app-wrap > .footer {
    grid-column:1; grid-row:3; min-height:0; margin:0; padding:0;
    display:flex; align-items:center; justify-content:center; gap:10px;
    border-top:0; font-size:10px; line-height:1.2; white-space:nowrap;
  }
  .app-wrap > .footer span { display:inline; margin:0; font-size:9px; }
  .app-wrap > .footer .admin-entry {
    display:inline-flex; align-items:center; min-height:24px;
    margin:0; padding:3px 7px; font-size:10px; line-height:1.2;
  }

  /* Only the comment grid scrolls; the heading and page buttons keep their own rows. */
  #voicesPage { padding:8px 0; }
  #voicesListScreen.voices-panel {
    display:grid; grid-template-rows:auto auto minmax(0,1fr) auto;
    height:100%; min-height:0; margin:0; padding:0; overflow:clip;
  }
  #voicesListScreen .voices-list-header {
    grid-row:1; position:relative; top:auto; min-width:0;
    margin:0; padding:8px 12px 6px; border-radius:15px 15px 0 0; box-shadow:none;
  }
  #voicesListScreen .voices-heading { gap:12px; margin:0 0 5px; padding:0 3px; }
  #voicesListScreen .voices-heading-copy { min-width:0; }
  #voicesListScreen .voices-heading h1 { margin:0; font-size:24px; line-height:1.25; }
  #voicesListScreen .voices-heading p { font-size:11px; line-height:1.35; }
  #voicesListScreen .voices-portrait-frame { flex-basis:44px; width:44px; margin-right:5px; }
  #voicesListScreen .voices-portrait-frame::before { inset:-5px; }
  #voicesListScreen .voices-portrait-frame::after { font-size:19px; right:-6px; }
  #voicesListScreen .voices-portrait-bow { width:34px; height:14px; bottom:-7px; }
  #voicesListScreen .voices-sticky-actions { position:static; margin:0; padding:4px 5px; }
  #voicesListScreen .voices-filters { margin-bottom:4px; }
  #voicesListStatus { grid-row:2; min-height:0; max-height:64px; margin:0; padding:0 12px; overflow:auto; }
  #voicesListStatus.is-error { padding:5px 12px; border-radius:0; font-size:11px; }
  #voicesListScreen .voices-list {
    grid-row:3; min-height:0; overflow:auto; overscroll-behavior:contain;
    grid-template-columns:repeat(5,minmax(0,1fr)); grid-auto-rows:minmax(154px,max-content);
    align-content:start; gap:10px; padding:8px 10px;
    scroll-margin-top:0; scroll-padding-top:4px;
    scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#e9a3c4 #fff2f8;
  }
  #voicesListScreen .voice-card { min-height:154px; padding:8px 8px 32px; }
  #voicesListScreen .voice-card-head { margin:0 0 3px; font-size:10px; line-height:1.3; }
  #voicesListScreen .voice-category { font-size:10px; line-height:1.3; padding:2px 5px; }
  #voicesListScreen .voice-meta { flex-wrap:nowrap; gap:4px; padding:0; margin-top:2px; font-size:10px; line-height:1.3; }
  #voicesListScreen .voice-author { display:block; flex:1; min-width:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.3; }
  #voicesListScreen .voice-meta time { font-size:9px; line-height:1.3; }
  #voicesListScreen .voice-song { display:block; margin:0; padding:1px 4px; font-size:10px; line-height:1.3; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #voicesListScreen .voice-comment { margin-top:3px; font-size:13px; line-height:1.45; -webkit-line-clamp:3; }
  #voicesListScreen .voice-card.is-expanded .voice-comment { -webkit-line-clamp:unset; }
  #voicesListScreen .voice-expand { left:8px; bottom:6px; }
  #voicesListScreen .voice-like { right:6px; bottom:3px; min-height:28px; }
  #voicesListScreen .voices-pagination {
    grid-row:4; margin:0; padding:5px 12px; border-top:1px solid #efdae5;
    background:#fffafd; border-radius:0 0 15px 15px;
  }
  #voicesListScreen .voices-pagination button { min-height:32px; padding:5px 10px; font-size:12px; }
  #voicesListScreen #voicesPageInfo { margin:0; font-size:11px; line-height:1.4; }

  /* Keep Back and Submit outside the form's scrolling fields. */
  #voicesFormScreen.voices-form-panel {
    display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto minmax(0,1fr);
    gap:10px 16px; width:100%; max-width:960px; height:100%; min-height:0;
    margin:0 auto; padding:14px; overflow:clip;
  }
  #voicesFormScreen > .voices-back { grid-column:1; grid-row:1; align-self:center; min-height:34px; }
  #voicesFormScreen .voices-form-heading { grid-column:2; grid-row:1; margin:0; text-align:left; }
  #voicesFormScreen .voices-form-heading h2 { margin:0 0 2px; font-size:22px; line-height:1.3; }
  #voicesFormScreen .voices-form-heading p { font-size:11px; line-height:1.4; }
  #voicesFormScreen #voicesForm {
    grid-column:1/-1; grid-row:2; display:grid; grid-template-rows:minmax(0,1fr) auto auto auto auto;
    min-height:0; height:100%; padding:10px; gap:5px; overflow:clip;
  }
  #voicesFormFields { grid-row:1; display:block; min-height:0; overflow:auto; overscroll-behavior:contain; padding-right:6px; scrollbar-gutter:stable; scrollbar-width:thin; }
  #voicesFormFields .voices-fieldset,
  #voicesFormFields .voices-field { margin:0 0 10px; }
  #voicesFormFields .voices-legend,
  #voicesFormFields .voices-label { margin-bottom:5px; font-size:13px; line-height:1.4; }
  #voicesFormFields .voices-options { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  #voicesFormFields .voice-option { min-height:36px; padding:6px 8px; gap:6px; font-size:12px; }
  #voicesFormFields .voice-option .icon { font-size:17px; }
  #voicesFormFields .voice-option input { width:17px; height:17px; }
  #voicesFormFields .voices-field input,
  #voicesFormFields .voices-field select,
  #voicesFormFields .voices-field textarea { padding:7px 9px; font-size:13px; line-height:1.5; }
  #voicesFormFields .voices-field textarea { min-height:96px; height:120px; }
  #voicesFormFields .voices-counter,
  #voicesFormFields .voices-field-note { margin:3px 1px 0; font-size:10px; line-height:1.4; }
  #voicesFormScreen .voices-form-feedback { grid-row:2; min-height:0; max-height:72px; overflow:auto; }
  #voicesFormScreen .voices-form-feedback .voices-notice { margin:0; padding:4px 8px; font-size:11px; line-height:1.4; }
  #voicesFormScreen .voices-submit-wrap { grid-row:3; margin:0; }
  #voicesFormScreen .voices-submit-wrap .voices-primary { min-height:38px; padding:6px 24px; font-size:15px; }
  #voicesFormScreen .voices-public-note { grid-row:4; margin:0; font-size:10px; line-height:1.3; }
  #voicesFormScreen .voices-draft-note { grid-row:5; margin:0; font-size:10px; line-height:1.3; }
  #voicesThankYouScreen {
    display:grid; grid-template-columns:minmax(0,1fr) 240px;
    grid-template-rows:minmax(0,1fr) auto minmax(0,1fr); align-items:start;
    gap:12px 24px; width:100%; height:100%; min-width:0; min-height:0;
    max-width:none; margin:0 auto; padding:14px; overflow:clip; text-align:left;
    container:voices-thanks / size;
  }
  /* Fit the complete 4:3 artwork to its column and the available height, without a tall empty frame. */
  #voicesThankYouScreen .thankyou-card {
    grid-column:1; grid-row:1 / 4; align-self:center; justify-self:center;
    width:min(100%,calc(100cqh * 4 / 3)); height:auto; min-width:0; min-height:0;
    aspect-ratio:4 / 3; margin:0; border:0; border-radius:0;
    background:transparent; box-shadow:none; overflow:visible;
  }
  #voicesThankYouScreen .thankyou-card img { display:block; width:100%; height:auto; object-fit:contain; }
  #voicesThankYouScreen h2 {
    grid-column:2; grid-row:1; align-self:end; min-width:0;
    margin:0; font-size:24px; line-height:1.35;
  }
  #voicesThankYouScreen > p {
    grid-column:2; grid-row:2; min-width:0;
    margin:0; font-size:13px; line-height:1.6;
  }
  #voicesThankYouScreen .voices-primary {
    grid-column:2; grid-row:3; align-self:start; min-width:0; width:100%;
    min-height:42px; margin:0; padding:8px 12px; gap:8px;
    border-width:1px; border-radius:10px; box-shadow:none; font-size:15px; line-height:1.4;
  }
}

@media (min-width:1024px) and (max-width:1279px) {
  #voicesThankYouScreen {
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:minmax(0,1fr) auto auto auto;
    justify-items:center; gap:6px; padding:10px; text-align:center;
  }
  #voicesThankYouScreen .thankyou-card {
    grid-column:1; grid-row:1; align-self:end;
    width:min(100%,calc((100cqh - 104px) * 4 / 3));
  }
  #voicesThankYouScreen h2 { grid-column:1; grid-row:2; font-size:21px; line-height:1.3; }
  #voicesThankYouScreen > p { grid-column:1; grid-row:3; font-size:12px; line-height:1.4; }
  #voicesThankYouScreen h2 br,
  #voicesThankYouScreen > p br { display:none; }
  #voicesThankYouScreen .voices-primary {
    grid-column:1; grid-row:4; width:auto; min-height:38px;
    padding:6px 20px; font-size:14px;
  }
}

@media (min-width:1280px) {
  #voicesListScreen .voices-sticky-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; }
  #voicesListScreen .voices-filters { margin:0; }
  #voicesListScreen .voices-toolbar { gap:10px; }
}
@media (min-width:1024px) and (max-height:760px) {
  #voicesListScreen .voices-list { grid-auto-rows:minmax(128px,max-content); gap:8px; padding-block:6px; }
  #voicesListScreen .voice-card { min-height:128px; padding:6px 7px 32px; }
  #voicesListScreen .voice-category { font-size:9px; padding:1px 4px; }
  #voicesListScreen .voice-meta { font-size:9px; }
  #voicesListScreen .voice-meta time { font-size:8px; }
  #voicesListScreen .voice-song { font-size:9px; }
  #voicesListScreen .voice-comment { font-size:12px; line-height:1.4; -webkit-line-clamp:2; }
}
@media (min-width:1024px) and (max-height:680px) {
  #voicesListScreen .voices-list { grid-auto-rows:minmax(112px,max-content); gap:6px; padding-block:3px; }
  #voicesListScreen .voice-card { min-height:112px; padding:5px 7px 31px; }
  #voicesListScreen .voice-card-head { margin-bottom:1px; font-size:8.5px; line-height:1.2; }
  #voicesListScreen .voice-category { font-size:8.5px; line-height:1.2; padding:1px 4px; }
  #voicesListScreen .voice-meta { margin-top:1px; font-size:8.5px; line-height:1.2; }
  #voicesListScreen .voice-author { line-height:1.2; }
  #voicesListScreen .voice-meta time { font-size:8px; line-height:1.2; }
  #voicesListScreen .voice-song { font-size:8.5px; line-height:1.2; }
  #voicesListScreen .voice-comment { margin-top:2px; font-size:11.5px; line-height:1.3; -webkit-line-clamp:2; }
  #voicesListScreen .voice-card.is-expanded .voice-comment { -webkit-line-clamp:unset; }
  #voicesListScreen .voices-list-header { padding-block:6px 4px; }
  #voicesListScreen .voices-heading h1 { font-size:22px; }
  #voicesListScreen .voices-heading p { font-size:10px; }
  #voicesListScreen .voices-portrait-frame { flex-basis:36px; width:36px; }
  #voicesListScreen .voices-sticky-actions { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px; }
  #voicesListScreen .voices-filters { margin:0; }
  #voicesListScreen .voice-filter,
  #voicesListScreen .voices-comment-action .voices-primary { font-size:10px; }
  #voicesListScreen .voices-toolbar { gap:5px; }
  #voicesListScreen .voices-toolbar > p,
  #voicesListScreen .voices-page-size,
  #voicesListScreen .voices-sort { font-size:10px; }
  #voicesListScreen .voices-list-settings { gap:3px; }
  #voicesListScreen #voicesPageSize,
  #voicesListScreen #voicesSort { min-height:26px; font-size:10px; padding:3px 15px 3px 5px; }
  #voicesListScreen .voices-pagination { padding-block:4px; }
}

/* After desktop-layout-v18.css; the app shell provides 60px masthead + page + 28px footer. */
@media (min-width:1024px) {
  /* Home keeps its hero/profile visible while only the event list scrolls. */
  #homePage {
    height:100%; min-height:0; padding:8px 0; overflow:hidden;
    grid-template-rows:minmax(0,1fr) auto;
    align-items:stretch; gap:12px 16px;
  }
  #homePage .home-hero {
    height:100%; min-height:0; max-height:none; margin:0;
    container:kyun-home / size;
  }
  #homePage .home-title {
    top:12px; width:clamp(150px,24dvh,205px);
  }
  #homePage .home-title h1 { font-size:clamp(40px,6.6dvh,64px); }
  #homePage .home-title > .icon { width:clamp(28px,4dvh,37px); height:26px; }
  #homePage .home-title .name-line .icon { font-size:clamp(20px,3dvh,27px); }
  #homePage .countdown {
    width:min(36%,clamp(180px,30.5dvh,260px)); left:6px; bottom:18%;
    container-type:inline-size;
  }
  #homePage .countdown-label { font-size:clamp(11px,6cqw,16px); }
  #homePage .countdown-number { font-size:clamp(12px,6cqw,16px); }
  #homePage .countdown-number > span { font-size:clamp(32px,20cqw,50px); }
  #homePage .countdown-number small { font-size:clamp(11px,5.8cqw,15px); }
  #homePage .countdown-number.celebration { font-size:clamp(12px,6.5cqw,17px); }
  #homePage .countdown-note { font-size:clamp(7px,3.8cqw,10px); }
  /* A tall or narrow hero reserves space beside the original, uncropped silhouette. */
  @container kyun-home (max-aspect-ratio:23/20) or (max-width:520px) {
    #homePage .home-photo img { height:min(100%,80cqw); left:77%; }
  }
  @container kyun-home (max-height:430px) {
    #homePage .countdown { bottom:clamp(16px,3dvh,24px); }
  }
  @container kyun-home (max-width:520px) and (max-height:430px) {
    #homePage .home-photo img { height:min(100%,75cqw); left:80%; }
  }
  #homePage .profile-card {
    min-height:0; max-height:150px; padding:10px 14px; gap:8px 10px;
    overflow:auto; overscroll-behavior:contain;
  }
  #homePage .live-card {
    position:static; top:auto; height:100%; min-height:0; max-height:none;
    display:grid; grid-template-rows:auto minmax(0,1fr) auto;
    padding:14px; overflow:hidden;
  }
  #homePage .schedule-list {
    min-height:0; height:100%; overflow:auto; overscroll-behavior:contain;
  }
  #homePage .live-heading { margin-bottom:10px; }
  #homePage .source-note { margin-top:8px; padding-top:8px; }

  /* The playfield scales to the remaining viewport. Player actions have reserved rows. */
  #gamePage {
    height:100%; min-height:0; padding:8px 0; overflow:hidden;
    grid-template-columns:minmax(0,1fr) clamp(208px,20vw,260px);
    grid-template-rows:minmax(0,1fr); align-items:stretch; gap:16px;
  }
  #gamePage .game-card {
    height:100%; min-height:0; max-height:none; overflow:hidden;
    grid-template-columns:clamp(180px,16vw,232px) minmax(0,1fr);
    /* Content stays together at the top; only the final row absorbs spare height. */
    grid-template-rows:minmax(0,max-content) max-content max-content max-content minmax(0,1fr);
    padding:14px; gap:10px 14px;
  }
  #gamePage .game-intro {
    height:100%; min-height:0; overflow:hidden;
    display:grid; grid-template-columns:minmax(0,1fr);
    grid-template-rows:auto auto minmax(0,1fr) auto;
    gap:5px; align-content:stretch;
  }
  #gamePage .game-title-lead { margin:0; }
  #gamePage .game-hdr { margin:0; }
  /* Required wrapper: .game-note, .game-rules and .game-difficulty-hint only. */
  #gamePage .game-intro .game-guide {
    display:block; min-width:0; min-height:0; overflow:auto;
    overscroll-behavior:contain; scrollbar-gutter:stable; padding-right:3px;
  }
  #gamePage .game-intro .game-guide:focus-visible { outline:2px solid #8b2856; outline-offset:-2px; }
  #gamePage .game-sound-toggle {
    justify-self:start; align-self:start; min-height:32px; margin:2px 0 0;
  }
  #gamePage .game-sound-toggle:focus-visible { outline:2px solid #8b2856; outline-offset:-3px; }
  #gamePage #gameCanvas {
    grid-row:1 / 6;
    min-width:0; min-height:0; width:min(100%,calc(80dvh - 112px));
    max-width:none; height:auto; max-height:none; align-self:start;
    /* Scale the original 360:450 content uniformly; the viewport height limits the width. */
  }
  #gamePage #gameSetup {
    min-height:0; max-height:210px; padding:10px; overflow:hidden;
    display:grid; grid-template-rows:auto auto auto minmax(0,1fr) auto;
  }
  #gamePage #playerName { min-height:36px; padding:7px 8px; }
  #gamePage .game-setup-hint { margin:5px 0 6px; }
  #gamePage .game-setup-error {
    min-height:0; margin:4px 0; overflow:auto; overscroll-behavior:contain;
  }
  #gamePage .game-start-button { min-height:38px; }
  #gamePage #gameStats { min-height:0; }
  #gamePage .game-stats>span { padding:6px 3px; }
  #gamePage .game-stats strong { font-size:18px; }
  #gamePage #gameControls,
  #gamePage #gameTouchPad { min-height:0; }
  #gamePage .control-btn { min-height:38px; }
  #gamePage #gameStatus {
    min-height:0; max-height:40px; overflow:auto; overscroll-behavior:contain;
  }
  #gamePage #gameResult {
    min-height:0; max-height:250px; padding:10px; overflow:hidden;
    display:grid; grid-template-rows:auto auto minmax(0,1fr) auto;
  }
  #gamePage #gameResultStatus {
    min-height:0; overflow:auto; overscroll-behavior:contain;
  }
  #gamePage .game-result-actions { min-height:0; }
  #gamePage .game-replay-button { min-height:38px; }
  #gamePage .game-change-name { min-height:32px; }
  #gamePage .ranking-card {
    position:static; top:auto; height:100%; min-height:0; max-height:none;
    padding:14px; overflow:auto; overscroll-behavior:contain; scrollbar-gutter:stable;
  }
}

/* Calls workspace: selector / reading pane / settings and video, inside the PC shell.
   HTML prerequisite: wrap #callsVideo and .calls-settings in .calls-side-tools.
   Keep this after desktop-layout-v18.css; the mobile wrapper uses display:contents. */
@media (min-width:1024px) {
  #callsPage { min-height:0; height:100%; padding:8px 0 0; overflow:hidden; }
  #callsPage .calls-panel {
    height:100%; min-height:0; max-height:100%; padding:12px;
    grid-template-columns:clamp(176px,17vw,220px) minmax(0,1fr) clamp(220px,22vw,280px);
    grid-template-rows:auto auto minmax(0,1fr) auto;
    gap:8px 12px; align-items:stretch; overflow:hidden;
  }
  #callsPage .calls-panel > * { min-width:0; min-height:0; }
  #callsPage .calls-heading {
    grid-column:1/-1; grid-row:1;
    display:flex; align-items:baseline; flex-wrap:wrap; gap:2px 12px;
    margin:0;
  }
  #callsPage .calls-heading h1 { margin:0; font-size:22px; line-height:1.35; }
  #callsPage .calls-heading p { margin:0; font-size:11px; line-height:1.5; }
  #callsPage .calls-picker {
    grid-column:1; grid-row:2 / 5; position:static; align-self:stretch;
    display:flex; flex-direction:column; height:100%; min-height:0;
    padding:10px; overflow:hidden;
  }
  #callsPage .calls-picker > :not(.calls-song-options) { flex-shrink:0; }
  #callsPage .calls-label { margin-bottom:5px; font-size:11px; }
  #callsPage .calls-search-row { gap:4px; }
  #callsPage .calls-search-row input,
  #callsPage .calls-search-row .calls-soft-button { min-height:34px; padding:6px; font-size:12px; }
  #callsPage .calls-search-count { margin:5px 0; font-size:10px; }
  #callsPage .calls-song-options {
    flex:1 1 0; min-height:0; max-height:none; overflow:auto;
    overscroll-behavior:contain; scrollbar-gutter:stable; gap:5px;
  }
  #callsPage .calls-song-choice { min-height:36px; padding:7px; font-size:11px; }

  /* Dissolve only the layout box: the existing hidden attribute still hides its children. */
  #callsPage .calls-selection { display:contents; }
  #callsPage .calls-selection h2 {
    grid-column:2; grid-row:2; min-width:0; min-height:0; max-height:2.8em;
    overflow:auto; margin:0; font-size:20px; line-height:1.4; text-align:left;
  }
  #callsPage .calls-side-tools {
    grid-column:3; grid-row:2 / 5; display:flex; flex-direction:column;
    min-width:0; min-height:0; height:100%; gap:8px; overflow:hidden;
  }
  #callsPage .calls-settings {
    order:0; flex:0 0 auto; min-height:0; max-height:34%;
    margin:0; padding:0 3px 0 0; overflow:auto; overscroll-behavior:contain;
    scrollbar-width:thin; scrollbar-color:#e9a3c4 #fff2f8;
  }
  #callsPage .calls-modes { gap:3px; padding:3px; }
  #callsPage .calls-modes button { min-height:32px; padding:5px; font-size:11px; }
  #callsPage .calls-text-settings { gap:3px 9px; margin:3px 0; }
  #callsPage .calls-text-settings label { min-height:27px; padding:3px 0; font-size:11px; }
  #callsPage .calls-copy-button { min-height:32px; padding:5px 6px; font-size:11px; }
  #callsPage .calls-status { margin:4px 0 0; font-size:11px; line-height:1.5; }
  #callsPage .calls-manual-copy { margin-top:6px; padding:8px; }
  #callsPage .calls-manual-copy textarea { min-height:72px; max-height:110px; resize:vertical; font-size:12px; }
  #callsPage .calls-manual-copy .calls-soft-button { min-height:30px; padding:5px 7px; font-size:11px; }
  #callsPage #callsVideo {
    order:1; flex:1 1 0; min-height:0; margin:0; overflow:auto;
    overscroll-behavior:contain; scrollbar-width:thin;
  }
  #callsPage .calls-video-card { display:flex; flex-direction:column; min-height:100%; padding:8px; }
  #callsPage .calls-video-card > * { flex-shrink:0; min-width:0; }
  #callsPage .calls-video-heading { order:0; margin:0 0 4px; gap:3px 6px; }
  #callsPage .calls-video-heading h3 { font-size:11px; }
  #callsPage .calls-video-kind { padding:1px 5px; font-size:9px; }
  #callsPage .calls-video-actions {
    order:1; position:sticky; top:0; z-index:2;
    margin:0 0 4px; gap:2px 6px; background:#fff;
  }
  #callsPage .calls-video-link,
  #callsPage .calls-video-stop { min-height:26px; padding:3px 0; font-size:10px; }
  #callsPage .calls-video-stage { order:2; }
  #callsPage .calls-video-stage.is-playing,
  #callsPage .calls-video-player { min-height:200px; }
  #callsPage .calls-video-title {
    order:3; margin:5px 0 0; font-size:10px; line-height:1.4;
    display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
  }
  #callsPage .calls-video-channel { order:4; font-size:10px; line-height:1.4; }
  #callsPage .calls-video-status,
  #callsPage .calls-video-pending { order:5; margin:3px 0 0; font-size:10px; line-height:1.5; }

  #callsPage #callsContent {
    grid-column:2; grid-row:3; display:grid; min-width:0; min-height:0; height:100%;
    grid-template-rows:auto auto minmax(0,1fr) auto auto;
    gap:7px; overflow:hidden;
  }
  #callsPage .calls-part-chooser { grid-row:1; margin:0; padding:0; gap:6px; }
  #callsPage .calls-part-chooser > label { font-size:11px; }
  #callsPage .calls-part-chooser select { min-height:32px; padding:5px 24px 5px 8px; font-size:12px; }
  #callsPage .calls-single-heading { grid-row:2; margin:0; gap:6px; }
  #callsPage .calls-single-heading p { font-size:13px; line-height:1.5; }
  #callsPage .calls-single-heading > span { padding:2px 7px; font-size:10px; }
  #callsPage .calls-cards {
    grid-row:3; min-height:0; overflow:auto; overscroll-behavior:contain;
    scrollbar-gutter:stable; scrollbar-width:thin; scrollbar-color:#e9a3c4 #fff2f8;
    gap:10px; padding:2px 5px 4px 2px;
  }
  #callsPage .call-card { flex-shrink:0; padding:13px; scroll-margin-top:4px; }
  #callsPage .call-name { font-size:15px; margin-bottom:7px; }
  #callsPage .call-text { font-size:18px; line-height:1.7; }
  #callsPage.calls-large .call-text { font-size:25px; line-height:1.7; }
  #callsPage .call-reading { font-size:13px; line-height:1.8; }
  #callsPage .calls-part-nav { grid-row:4; margin:0; padding:0; gap:8px; }
  #callsPage .calls-part-nav button { min-height:36px; padding:6px; font-size:12px; }
  #callsPage .calls-references {
    grid-row:5; min-height:0; max-height:min(20dvh,140px); overflow:auto;
    margin:0; padding:3px 2px 0; scrollbar-width:thin; overscroll-behavior:contain;
  }
  #callsPage .calls-references summary {
    position:sticky; top:0; z-index:1; min-height:26px; padding:3px 0;
    background:#fffafd; font-size:11px; line-height:1.6;
  }
  #callsPage #callsStorageStatus { grid-column:2; grid-row:4; margin:0; font-size:10px; }
  #callsPage .calls-empty {
    grid-column:2 / 4; grid-row:2 / 5; min-height:0; height:100%;
    margin:0; padding:18px; overflow:auto;
  }
}
