/* Public layout only. Existing phone rules and player behavior stay authoritative. */
@media (min-width:768px) {
  html[data-guomi-public] #app.home-library-app,
  html[data-guomi-public] #app.work-detail-app,
  html[data-guomi-public] #app:has(.player-screen) {width:min(100%,1280px);}

  html[data-guomi-public] .home-screen .drama-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;}
  html[data-guomi-public] .home-screen :is(.topbar,.library-controls,.section) {padding-left:24px;padding-right:24px;}
  html[data-guomi-public] .home-screen .feature-card {margin-left:24px;margin-right:24px;}
  html[data-guomi-public] .home-screen .drama-card-copy strong {font-size:16px;}

  html[data-guomi-public] .work-detail-screen {
    display:grid;grid-template-columns:220px minmax(0,1fr);gap:20px;align-items:start;align-content:start;
    grid-template-areas:"top top" "hero synopsis" "hero seasons" "hero watch" "player player" "episodes episodes" "guide guide";
    max-width:none;width:100%;padding:24px;
  }
  html[data-guomi-public] .work-detail-screen > * {min-width:0;}
  html[data-guomi-public] .detail-topbar {grid-area:top;padding-bottom:0;}
  html[data-guomi-public] .detail-hero {grid-area:hero;grid-template-columns:minmax(0,1fr);gap:16px;margin-bottom:0;}
  html[data-guomi-public] .detail-cover {width:100%;max-width:280px;}
  html[data-guomi-public] .detail-heading h1 {font-size:26px;line-height:1.4;}
  html[data-guomi-public] .work-detail-screen > .detail-section {margin:0;padding:20px;}
  html[data-guomi-public] .detail-section:has(> .detail-description) {grid-area:synopsis;}
  html[data-guomi-public] .detail-section:has(> .detail-seasons) {grid-area:seasons;}
  html[data-guomi-public] .detail-watch {grid-area:watch;}
  html[data-guomi-public] .detail-preview {grid-area:player;}
  html[data-guomi-public] .detail-section:has(> .detail-episodes) {grid-area:episodes;}
  html[data-guomi-public] .detail-guide {grid-area:guide;}
  html[data-guomi-public] .detail-seasons {display:grid;grid-template-columns:repeat(auto-fit,minmax(96px,1fr));gap:10px;}
  html[data-guomi-public] .detail-episodes {grid-template-columns:repeat(auto-fill,minmax(80px,1fr));gap:10px;}
  html[data-guomi-public] .detail-preview video {width:100%;height:auto;max-height:78dvh;aspect-ratio:auto;object-fit:contain;}
  html[data-guomi-public] .detail-player-controls {gap:16px;}
  html[data-guomi-public] .player-screen .video-stage {aspect-ratio:16/9;max-height:78dvh;}
  html[data-guomi-public] .player-screen :is(.season-grid,.episode-grid) {grid-template-columns:repeat(auto-fit,minmax(96px,1fr));}
}

@media (min-width:1024px) {
  html[data-guomi-public] .home-screen .drama-grid {grid-template-columns:repeat(5,minmax(0,1fr));gap:28px 20px;}
  html[data-guomi-public] .home-screen :is(.topbar,.library-controls,.section) {padding-left:32px;padding-right:32px;}
  html[data-guomi-public] .home-screen .feature-card {margin-left:32px;margin-right:32px;min-height:360px;}
  html[data-guomi-public] .home-screen .feature-title {font-size:36px;max-width:720px;}
  html[data-guomi-public] .home-screen .library-controls {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:24px;}
  html[data-guomi-public] .home-screen .library-tabs {margin-top:0;}
  html[data-guomi-public] .work-detail-screen {grid-template-columns:280px minmax(0,1fr);gap:24px;padding:24px 32px 40px;}
  html[data-guomi-public] .work-detail-screen > .detail-section {padding:24px;}
  html[data-guomi-public] .detail-heading h1 {font-size:30px;}
  html[data-guomi-public] .detail-episodes {grid-template-columns:repeat(auto-fill,minmax(86px,1fr));gap:12px;}
}

@media (min-width:1280px) {
  html[data-guomi-public] .home-screen .drama-grid {grid-template-columns:repeat(6,minmax(0,1fr));}
}

/* Playback page only; existing home, APP and YouTube player stay intact. */
#app .simple-watch-screen{display:grid;grid-template-columns:minmax(0,1fr);grid-template-areas:"top" "player" "episodes" "hero" "guide";gap:16px;padding:16px;box-sizing:border-box}
#app .simple-watch-screen>.detail-topbar{grid-area:top;margin:0;gap:12px;min-width:0}
#app .simple-watch-screen .detail-page-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#app .simple-watch-screen>.detail-preview{grid-area:player;align-self:start;margin:0;padding:12px;background:#09090a;border:0;min-width:0;text-align:center}
#app .simple-watch-screen #detail-preview-stage{margin:0}
#app .simple-watch-screen #detail-preview-video{display:block;margin:0 auto;width:min(100%,calc(70dvh * 9 / 16));height:auto;max-height:none;aspect-ratio:9/16;object-fit:contain;background:#000;border-radius:8px}
#app .simple-watch-screen #detail-preview-start{display:flex;align-items:center;justify-content:center;margin:0 auto;width:min(100%,calc(70dvh * 9 / 16));aspect-ratio:9/16;padding:0;box-sizing:border-box;background:#000;color:#fff;border:0;border-radius:8px;font-size:20px}
#app .simple-watch-screen #detail-preview-start[hidden],#app .simple-watch-screen [hidden]{display:none!important}
#app .simple-watch-screen #detail-preview-note:empty{display:none}
#app .simple-watch-screen #detail-preview-note{color:#eee;margin:12px 0}
#app .simple-watch-screen .detail-player-controls{display:grid;grid-template-columns:90px 1fr 90px;align-items:center;gap:8px;margin:12px 0 0;color:#eee}
#app .simple-watch-screen .detail-player-controls p{margin:0;font-size:13px}
#app .simple-watch-screen .detail-player-controls button{margin:0;padding:10px 8px;min-height:40px}
#app .simple-watch-screen>.detail-selector{grid-area:episodes;min-width:0;align-self:start}
#app .simple-watch-screen .detail-selector>.detail-section{margin:0 0 12px;padding:14px}
#app .simple-watch-screen .detail-section-head{flex-wrap:wrap;gap:8px;margin-bottom:12px}
#app .simple-watch-screen .detail-section-head h2{font-size:16px}
#app .simple-watch-screen #detail-h5-watch{margin:0;padding:8px 10px;font-size:12px}
#app .simple-watch-screen .detail-seasons{display:grid;grid-template-columns:repeat(auto-fit,minmax(70px,1fr));gap:8px;padding:0;overflow:visible}
#app .simple-watch-screen .detail-seasons button{padding:10px 6px;min-width:0}
#app .simple-watch-screen .detail-ranges{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 12px}
#app .simple-watch-screen .detail-ranges button{padding:7px 9px;min-height:34px;white-space:nowrap}
#app .simple-watch-screen .detail-episodes{display:grid;grid-template-columns:repeat(auto-fill,minmax(60px,1fr));gap:8px}
#app .simple-watch-screen .detail-episode{min-height:42px;padding:10px 4px;font-size:13px}
#app .simple-watch-screen>.detail-hero{grid-area:hero;display:grid;grid-template-columns:64px minmax(0,1fr);gap:14px;margin:0;padding:0;align-items:start;min-width:0}
#app .simple-watch-screen .detail-cover{display:block;width:64px;height:auto;aspect-ratio:3/4;border-radius:6px;overflow:hidden}
#app .simple-watch-screen .detail-cover img{width:100%;height:100%;object-fit:cover}
#app .simple-watch-screen .detail-heading h1{font-size:19px;line-height:1.4;margin:0 0 8px}
#app .simple-watch-screen .detail-description{font-size:14px;line-height:1.8;margin:8px 0;white-space:pre-line}
#app .simple-watch-screen .detail-meta{font-size:12px;line-height:1.6;margin:6px 0}
#app .simple-watch-screen>.detail-guide{grid-area:guide}
#app.work-detail-app .gm-apk-entry:not(#guomi-home-apk){display:none!important}
@media(min-width:768px){
 #app .simple-watch-screen{grid-template-columns:minmax(0,1fr) minmax(320px,40%);grid-template-areas:"top top" "player episodes" "hero episodes" "guide guide";gap:20px;padding:24px}
 #app .simple-watch-screen>.detail-selector{max-height:calc(100dvh - 150px);overflow-y:auto;scrollbar-gutter:stable}
 #app .simple-watch-screen>.detail-hero{grid-template-columns:72px minmax(0,1fr)}
 #app .simple-watch-screen .detail-cover{width:72px}
}
