/* screens.css — 画面固有のスタイル（ヘッダー・ドロワー・Dock・一覧・詳細・仕分け・設定）*/
/* ヘッダー */
#hdr-left,#hdr-right{flex:none;display:flex;align-items:center;gap:2px;min-width:44px}
#hdr-right{justify-content:flex-end}
#hdr-title{flex:1;min-width:0;text-align:center;font-size:1rem;font-weight:700;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.hbtn{width:42px;height:42px;display:flex;align-items:center;justify-content:center;background:none;border:0;color:var(--text-main);border-radius:12px}
.hlabel{height:34px;padding:0 12px;background:none;border:1px solid var(--border-glass);border-radius:10px;color:var(--text-main);font-size:.8rem}
.hlabel.dng{color:var(--danger);border-color:rgba(var(--danger-rgb),.6)}
/* ドロワー */
#drawer{position:absolute;inset:0;z-index:var(--z-modal);overflow:hidden}
#drawer[hidden]{display:none}
#drawer-bg{position:absolute;inset:0;background:rgba(0,0,0,.6);opacity:0;transition:opacity .25s}
#drawer.open #drawer-bg{opacity:1}
#drawer-panel{position:absolute;top:0;right:0;bottom:0;width:78%;max-width:320px;background:var(--bg-primary);border-left:1px solid var(--border-glass);padding:calc(env(safe-area-inset-top) + 16px) 12px calc(var(--safe-b) + 16px);transform:translateX(100%);transition:transform .28s cubic-bezier(.16,1,.3,1);overflow-y:auto;overscroll-behavior:contain}
#drawer.open #drawer-panel{transform:none}
.drawer-head{padding:6px 12px 14px;font-size:1.1rem;font-weight:700;letter-spacing:.02em}
.drawer-item{display:flex;align-items:center;gap:14px;width:100%;height:50px;padding:0 12px;margin:0 0 2px;background:none;border:0;border-radius:12px;color:var(--text-sub);font-size:.95rem;text-align:left}
.drawer-item.on{background:var(--sel-bg);color:#fff;font-weight:700;box-shadow:inset 0 0 0 1px var(--sel-ring)}
.drawer-item:nth-last-child(1){margin-top:14px;border-top:1px solid var(--border-subtle);border-radius:0 0 12px 12px}
/* Dock */
#dock{position:absolute;left:50%;bottom:calc(var(--safe-b) + 14px);transform:translateX(-50%);z-index:55}
#dock-btn{position:relative;display:flex;align-items:center;justify-content:center;padding:0;color:var(--text-main);background:rgba(22,20,31,.72);border:1px solid var(--border-glass);-webkit-backdrop-filter:blur(14px);backdrop-filter:blur(14px);box-shadow:0 8px 24px rgba(0,0,0,.55);touch-action:none;transition:transform .15s cubic-bezier(.2,.8,.2,1),opacity .15s}
#dock-btn:active{transform:scale(.93);opacity:.8}
.dock-art{display:flex;align-items:center;justify-content:center}
.dock-img{display:block;width:100%;height:100%;background-size:cover;background-position:center}
.dock-glass #dock-btn{width:64px;height:64px;border-radius:50%}
.dock-ring #dock-btn{width:60px;height:60px;border-radius:50%;box-shadow:0 0 0 4px var(--bg-primary),0 0 0 5px var(--border-highlight),0 8px 24px rgba(0,0,0,.55)}
.dock-diamond #dock-btn{width:54px;height:54px;border-radius:14px;transform:rotate(45deg)}
.dock-diamond #dock-btn:active{transform:rotate(45deg) scale(.93)}
.dock-diamond .dock-art{transform:rotate(-45deg)}
.dock-capsule #dock-btn{width:100px;height:52px;border-radius:26px}
.dock-blob #dock-btn{width:66px;height:66px;border-radius:58% 42% 55% 45%/48% 58% 42% 52%;animation:blob 9s ease-in-out infinite}
@keyframes blob{0%,100%{border-radius:58% 42% 55% 45%/48% 58% 42% 52%}50%{border-radius:42% 58% 45% 55%/58% 42% 52% 48%}}
.dock-tab{bottom:var(--safe-b) !important}
.dock-tab #dock-btn{width:130px;height:32px;border-radius:18px 18px 0 0;border-bottom:0}
.dock-tab .dock-art svg{width:20px;height:20px}
.dock-img-wrap{overflow:hidden}
#dock-btn .dock-img{border-radius:inherit;overflow:hidden}
/* 一覧 */
.seg-top{margin:4px 0 12px}
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px 10px;margin-bottom:14px}
.rows{display:flex;flex-direction:column;gap:8px;margin-bottom:14px}
.tile{position:relative;min-width:0}
.poster{position:relative;width:100%;aspect-ratio:2/3;border-radius:10px;overflow:hidden;background:var(--card);background-size:cover;background-position:center;box-shadow:0 8px 18px -8px rgba(0,0,0,.8)}
.poster .ph{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:1.6rem;font-weight:700;color:rgba(255,255,255,.9)}
.poster.has-img .ph{display:none}
.ph-note{margin-top:6px;font-size:.6rem;font-weight:400;color:rgba(255,255,255,.75)}
.tile-title{margin-top:6px;font-size:.72rem;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;color:var(--text-main)}
.bds{display:flex;gap:4px;flex-wrap:wrap}
.tile .bds{position:absolute;left:4px;top:4px;right:4px}
.bd{display:inline-flex;align-items:center;gap:2px;height:18px;padding:0 6px;border-radius:9px;font-size:.62rem;background:rgba(0,0,0,.72);color:var(--text-main)}
.bd-star{color:var(--star)}.bd-heart{color:var(--heart)}
.row-item{position:relative;display:flex;gap:12px;padding:8px;border:1px solid var(--border-subtle);border-radius:var(--radius);background:var(--card)}
.thumb{position:relative;flex:none;width:52px}
.row-main{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:4px}
.row-title{font-size:.88rem;font-weight:600;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.row-sub{font-size:.7rem;color:var(--text-sub)}
.row-main .bds .bd{background:rgba(255,255,255,.08)}
.sel-mark{display:none;position:absolute;right:4px;bottom:4px;width:22px;height:22px;border-radius:50%;align-items:center;justify-content:center;background:var(--sel-bg);border:1px solid var(--sel-ring);color:#fff}
.tile.sel .poster,.row-item.sel{box-shadow:0 0 0 2px var(--sel-ring)}
.tile.sel .sel-mark,.row-item.sel .sel-mark{display:flex;background:#fff;color:#000}
.tier-h{display:flex;align-items:center;gap:8px;margin:14px 0 8px}
.tier-star{font-size:.95rem;font-weight:700;color:var(--star)}
.empty{padding:60px 20px;text-align:center;color:var(--text-sub);font-size:.85rem;line-height:1.8}
.chips{display:flex;gap:8px;overflow-x:auto;padding:0 0 10px;margin:0 -14px;padding-left:14px;padding-right:14px;scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chip{flex:none;height:30px;padding:0 12px;border-radius:15px;border:1px solid var(--border-glass);background:none;color:var(--text-sub);font-size:.75rem;white-space:nowrap}
.chip.on{background:var(--sel-bg);color:#fff;border-color:var(--sel-ring)}
/* 共通の小物 */
.small{font-size:.7rem}
.row-flex{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.chips.wrap{flex-wrap:wrap;overflow:visible;margin:0;padding:0}
.empty.small{padding:20px 10px}
.blk{margin:0 0 16px}
.blk-l{font-size:.72rem;color:var(--text-sub);margin:0 0 6px}
/* 詳細 */
.detail{padding-top:4px}
.dhead{display:flex;gap:14px;margin-bottom:16px}
.dpost{flex:none;width:112px}
.dmeta{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
.dtitle{font-size:1rem;font-weight:700;line-height:1.35}
.dmeta-btns{margin-top:auto;padding-top:8px}
.stars{display:flex;gap:6px}
.star{width:44px;height:44px;display:flex;align-items:center;justify-content:center;background:none;border:0;color:var(--text-sub)}
.star.on{color:var(--star)}
.scene{padding:10px 0;border-bottom:1px solid var(--border-subtle)}
.scene-h{display:flex;align-items:center;justify-content:space-between;gap:8px}
.scene-memo{margin-top:4px;font-size:.82rem;line-height:1.6;white-space:pre-wrap}
.scene-memo.spoiler{filter:blur(6px)}
.rel{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 0;border-bottom:1px solid var(--border-subtle)}
.rel-t{min-width:0;font-size:.82rem}
.synopsis{line-height:1.7;white-space:pre-wrap}
.cands{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:6px}
.cand{aspect-ratio:2/3;border:1px solid var(--border-subtle);border-radius:10px;background:var(--card) center/cover}
/* 追加シート */
.results{margin-top:12px}
.res{display:flex;gap:12px;padding:8px;margin:0 0 8px;border:1px solid var(--border-subtle);border-radius:var(--radius);background:var(--card)}
.res-img{flex:none;width:44px;height:62px;border-radius:8px;background:var(--bg-primary) center/cover}
.res-t{flex:1;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:3px}
.res-name{font-size:.88rem;font-weight:600;line-height:1.35}
/* 来期の仕分け */
.sort-wrap{height:100%;display:flex;flex-direction:column;padding:8px 14px calc(110px + var(--safe-b))}
.sort-bar{flex:none;display:flex;align-items:center;justify-content:space-between;min-height:34px}
.sort-stage{position:relative;flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.sort-card{width:100%;height:100%;display:flex;flex-direction:column;border:1px solid var(--border-glass);border-radius:20px;overflow:hidden;background:var(--card);transition:transform .2s ease-in,opacity .2s}
.sort-poster{flex:none;height:46%;background:var(--bg-primary) center/cover}
.sort-info{flex:1;min-height:0;display:flex;flex-direction:column;gap:5px;padding:12px 14px;overflow:hidden}
.sort-pos{font-size:.68rem;color:var(--text-sub)}
.sort-title{font-size:1.05rem;font-weight:700;line-height:1.35}
.sort-syn{margin-top:4px;font-size:.76rem;line-height:1.65;color:var(--text-sub);overflow:hidden}
.sort-card.fly-up{transform:translateY(-120%) rotate(-3deg);opacity:0}
.sort-card.fly-down{transform:translateY(120%) rotate(3deg);opacity:0}
.sort-card.fly-right{transform:translateX(120%) rotate(6deg);opacity:0}
.sort-card.fly-skip{transform:scale(.9);opacity:0}
.sort-guide{flex:none;display:flex;justify-content:center;gap:14px;padding-top:10px;font-size:.7rem;color:var(--text-sub)}
.sort-sum{font-size:1rem;font-weight:700;color:var(--text-main);margin-bottom:10px}
/* 設定 */
.settings .card{margin-bottom:12px}
.card-t{font-size:.9rem;font-weight:700;margin:0 0 10px}
.warns{margin-top:10px}
.warn-item{font-size:.74rem;color:var(--warning);line-height:1.6}
.diag{margin-top:10px}
.diag-row{display:grid;grid-template-columns:20px 1fr;gap:2px 8px;padding:6px 0;font-size:.8rem}
.diag-row .sub{grid-column:2}
.diag-row .ok{color:var(--success)}.diag-row .ng{color:var(--danger)}
.logbox{margin:0;font-size:.68rem;line-height:1.6;white-space:pre-wrap;word-break:break-all;color:var(--text-sub)}
.crop-wrap{display:flex;flex-direction:column;align-items:center;gap:12px;padding-top:10px}
.crop{position:relative;overflow:hidden;border-radius:50%;border:1px solid var(--border-glass);touch-action:none;background:#000}
.crop img{position:absolute;left:0;top:0;transform-origin:0 0;max-width:none}
