/* 最低限の見た目（後で hallmark で整える）。webpビューアの決まり＝濃い紺・グレー・文字を小さく薄くしない */
:root { --bg: #0f1526; --panel: #1a2440; --line: #3b4a6b; --text: #f3f6fb; --sub: #c9d3e6; --accent: #4d7cff; --danger: #e5484d; }
* { box-sizing: border-box; }
/* hidden を付けた物は必ず隠す（.row・button などの display が hidden に勝って出てしまっていた＝11/24 に見つけた） */
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; font-size: 16px; line-height: 1.6; }
main { max-width: 960px; margin: 0 auto; padding: 16px; }
a { color: #d4e2ff; }
h1 { font-size: 24px; margin: 8px 0 16px; }
h2 { font-size: 19px; margin: 24px 0 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin: 12px 0; }
.sub { color: var(--sub); font-size: 15px; }
button, .btn { font: inherit; font-size: 16px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--line); background: #24314f; color: var(--text); cursor: pointer; text-decoration: none; display: inline-block; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); }
button.danger { background: transparent; border-color: var(--danger); color: #ffb4b6; }
button:disabled { opacity: .6; cursor: default; }
input[type=text], textarea, select { font: inherit; font-size: 16px; width: 100%; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: #0b1020; color: var(--text); }
textarea { min-height: 64px; }
label { display: block; margin: 10px 0 4px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.drop { border: 2px dashed var(--line); border-radius: 10px; padding: 24px; text-align: center; cursor: pointer; }
.drop.over { border-color: var(--accent); }
.preview { display: flex; gap: 12px; flex-wrap: wrap; }
.preview img, .preview video { max-width: 240px; max-height: 240px; background: #000; border-radius: 8px; }
.bar { height: 10px; background: #0b1020; border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.item img { display: block; width: 100%; aspect-ratio: 1/1; object-fit: cover; background: #000; }
.item .body { padding: 10px; }
.item .title { font-weight: bold; }
.item .row { margin-top: 6px; }
.msg { padding: 10px; border-radius: 8px; margin: 8px 0; }
.msg.err { background: #3a1416; color: #ffd1d3; }
.msg.ok { background: #13321f; color: #c8f5d6; }
.url { font-family: ui-monospace, monospace; font-size: 15px; word-break: break-all; }
/* 保存（11/24）: 選ぶ印・まとめて保存の帯・確かめる画面 */
.tag { font-size: 14px; padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; color: var(--sub); }
.item.on { border-color: var(--accent); }
.item .thumb { position: relative; }
.item .pick { position: absolute; left: 8px; top: 8px; margin: 0; width: 44px; height: 44px; display: grid; place-items: center; background: rgba(0,0,0,.55); border-radius: 8px; cursor: pointer; }
.item .pick input { width: 24px; height: 24px; margin: 0; cursor: pointer; }
.pickbar { margin-top: 12px; }
.sheet { width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.sheet::backdrop { background: rgba(0,0,0,.6); }
.sheet h2 { margin-top: 0; }
.sheet .total { font-size: 18px; font-weight: bold; margin: 0 0 8px; }
.bar > i.over { background: var(--danger); }
.ziplist { margin: 12px 0; max-height: 50vh; overflow: auto; border-top: 1px solid var(--line); }
.ziprow { display: grid; grid-template-columns: 28px 56px minmax(0, 1fr) auto; gap: 10px; align-items: center; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.ziprow input { width: 22px; height: 22px; margin: 0; }
.ziprow img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; background: #000; }
.ziprow .zt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg.warn { background: #3a2f12; color: #ffe7b0; font-size: 15px; }
.item .life { color: #ffd38a; }
/* 並び替え・探す・♡（11/24）: ⇅ は右上・♡ は右下（どちらも 44px の押せる大きさ） */
.findrow { margin-top: 12px; }
.findrow input[type=search] { font: inherit; font-size: 16px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: #0b1020; color: var(--text); flex: 1 1 200px; }
#favOnly[aria-pressed=true], #favAll[aria-pressed=true] { border-color: #ff7a9a; color: #ffd0dc; background: #3a1d2c; }
.item .grip, .item .fav { position: absolute; width: 44px; height: 44px; padding: 0; display: grid; place-items: center; font-size: 22px; line-height: 1; background: rgba(0,0,0,.55); border: 0; border-radius: 8px; color: #fff; }
.item .grip { right: 8px; top: 8px; cursor: grab; touch-action: none; }
.item .fav { right: 8px; bottom: 8px; }
.item .fav.on { color: #ff7a9a; }
.item.dragging { position: fixed; z-index: 20; pointer-events: none; opacity: .92; box-shadow: 0 12px 32px rgba(0,0,0,.6); border-color: var(--accent); }
.item.ph { border: 2px dashed var(--accent); background: transparent; }
body.dragnow { user-select: none; -webkit-user-select: none; cursor: grabbing; }
body.dragnow .item .grip { cursor: grabbing; }
/* 作品の札を小さく・操作は ⋮ のメニューに（11/24 前田さんの直し）。スマホの幅でも2列に並ぶ大きさ */
.items { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.item .head { display: flex; align-items: flex-start; gap: 4px; }
.item .head .title { flex: 1; min-width: 0; overflow-wrap: anywhere; padding-top: 8px; }
.item .more { flex: none; width: 44px; height: 44px; margin: -2px -6px 0 0; padding: 0; font-size: 24px; line-height: 1; border: 0; background: transparent; border-radius: 8px; }
.item .more:hover, .item .more[aria-expanded=true] { background: #24314f; }
.menuback { position: fixed; inset: 0; z-index: 30; }
.itemmenu { position: fixed; min-width: 260px; max-width: min(360px, calc(100vw - 16px)); max-height: calc(100vh - 16px); overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px; box-shadow: 0 12px 32px rgba(0,0,0,.6); }
.itemmenu .menuhead { padding: 8px 12px; font-weight: bold; border-bottom: 1px solid var(--line); margin-bottom: 4px; overflow-wrap: anywhere; }
/* 1行＝ボタン（枠と地の色）＋右に説明。行の間は詰める（11/24 前田さん） */
.itemmenu { min-width: min(420px, calc(100vw - 16px)); max-width: min(520px, calc(100vw - 16px)); }
.itemmenu .mline { display: flex; align-items: center; gap: 10px; padding: 3px 4px; }
.itemmenu .mi { flex: none; display: inline-block; width: 14.5em; white-space: normal; min-height: 40px; text-align: center; border: 1px solid #5a6c94; border-radius: 8px; background: #24314f; padding: 8px 12px; margin: 0; color: var(--text); text-decoration: none; font-size: 16px; line-height: 1.4; cursor: pointer; }
.itemmenu .mi:hover { background: #2e3f66; }
.itemmenu .mi:focus-visible { outline: 3px solid var(--accent); outline-offset: 1px; }
.itemmenu .mi.danger { border-color: #e5484d; background: #3a1d24; color: #ffd0d2; }
.itemmenu .mnote { flex: 1; min-width: 0; font-size: 15px; line-height: 1.4; color: var(--sub); overflow-wrap: anywhere; }
.itemmenu .mrow { display: flex; align-items: center; gap: 10px; font-size: 16px; cursor: default; }
.itemmenu .mrow select { width: auto; flex: 1; }
.itemmenu .mclose { display: none; }
@media (max-width: 599px) { .itemmenu .mi { width: 48%; font-size: 15px; padding: 8px 6px; } }
/* 自分の作品の画面の作り（11/24 前田さんの直し）: 上は細い帯・左にフォルダ（有料版・引き出し）・右に見出しと作品 */
.appbody .topbar { position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; padding: 8px 12px; background: var(--bg); border-bottom: 1px solid var(--line); }
/* 11/25 前田さん「「自分の作品」って文字は要らん」: 見出しは読み上げ用に残して、画面には出さない */
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.appbody .spacer { flex: 1; }
.appbody .topinfo, .appbody .topbtns { display: flex; align-items: center; gap: 8px; }
.appbody .usagemini { display: inline-flex; align-items: center; gap: 6px; }
.appbody .usagemini .bar { display: inline-block; width: 90px; height: 8px; }
.iconbtn { width: 44px; height: 44px; padding: 0; font-size: 22px; line-height: 1; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr); }
body.sideopen .layout { grid-template-columns: 240px minmax(0, 1fr); }
.side { display: none; }
body.sideopen .side { display: flex; flex-direction: column; position: sticky; top: var(--topbar-h, 61px); align-self: start; height: calc(100vh - var(--topbar-h, 61px)); overflow: auto; padding: 12px 8px 16px 12px; border-right: 1px solid var(--line); }
.sideback { display: none; }
.tree { display: flex; flex-direction: column; gap: 2px; }
.frow { display: flex; align-items: center; border-radius: 8px; }
.frow.on { background: #24314f; }
.fbtn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left; border: 0; background: transparent; padding: 10px; min-height: 44px; }
.fbtn:hover { background: #1f2a47; }
.frow.on .fbtn { font-weight: bold; }
.fname { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fcount { color: var(--sub); font-size: 15px; }
.fmore { flex: none; width: 40px; height: 44px; padding: 0; border: 0; background: transparent; font-size: 20px; }
.fmore:hover, .fmore[aria-expanded=true] { background: #1f2a47; }
.newfolder { display: flex; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.newfolder input { min-width: 0; flex: 1; }
.newfolder button { flex: none; white-space: nowrap; }
.pane { padding: 12px 16px 24px; min-width: 0; }
.panehead { scroll-margin-top: calc(var(--topbar-h, 61px) + 8px); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.panehead h2 { margin: 0; font-size: 20px; overflow-wrap: anywhere; }
/* 11/25 前田さん: 検索・お気に入り・すべて選ぶは「フォルダ名・件数」のすぐ隣（右端に寄せない） */
.panehead h2 + .sub { margin-right: 8px; }
.panehead input[type=search], .sidesearch input[type=search] { width: 200px; flex: 0 1 200px; font: inherit; font-size: 16px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); background: #0b1020; color: var(--text); }
/* 選んでいる時の帯: 画面の下に留める（スクロールしても動かない＝11/24 前田さん）。作品が帯の下に隠れないよう、下に余白 */
.pickrow { position: fixed; left: 0; right: 0; bottom: 0; z-index: 22; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: #141c33; border-top: 2px solid var(--accent); box-shadow: 0 -8px 24px rgba(0,0,0,.5); }
.pickrow #pickCount { font-weight: bold; }
.pickrow .pickbtns { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pickrow .pickbtns > * { white-space: nowrap; }
.pickrow select { width: auto; }
.pickrow .dangerbtn { border-color: #e5484d; background: #3a1d24; color: #ffd0d2; }
.pickrow .pickprog { flex-basis: 100%; }
/* 「並びを移す」で行き先を選んでいる間（11/25・アプリ版と同じ）: 押せる作品（選んでいない物）を点線の枠で示し、選んだ物は薄く。□・⇅・♡ は押せない */
body.placing .item:not(.on) .thumb::after { content: ''; position: absolute; inset: 0; border: 3px dashed #7ea0ff; pointer-events: none; }
body.placing .item:not(.on) img.open { cursor: pointer; }
body.placing .item.on .thumb { opacity: .5; }
body.placing .item .pick, body.placing .item .grip, body.placing .item .fav { pointer-events: none; opacity: .4; }
.pickrow .pickprog p { margin: 0 0 6px; }
/* 帯の高さ（狭い幅では3〜4行になる）に合わせて下に余白（--pickh は app.js が帯の高さを測って入れる・11/24 verifier の指摘） */
body.picking .pane { padding-bottom: calc(var(--pickh, 180px) + 16px); }
.empty { color: var(--sub); }
.sheethead { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.sheethead h2 { margin: 0; }
#uploadSheet, #accountSheet, #editSheet { width: min(720px, calc(100vw - 24px)); }
#uploadSheet .drop { margin-bottom: 8px; }
/* 狭い画面: フォルダは左から出る引き出し（後ろを暗く）。初めは閉じておく */
@media (max-width: 899px) {
  body.sideopen .layout { grid-template-columns: minmax(0, 1fr); }
  body.sideopen .side { position: fixed; top: 0; left: 0; bottom: 0; align-self: stretch; z-index: 25; width: min(300px, 85vw); max-height: none; height: auto; background: var(--panel); box-shadow: 8px 0 24px rgba(0,0,0,.5); }
  body.sideopen .sideback { display: block; position: fixed; inset: 0; z-index: 24; background: rgba(0,0,0,.55); }
  .panehead input[type=search] { flex: 1 1 160px; }
}
/* 上の帯（11/24 前田さん: 公開ページ・アカウントは右端。11/25: ☰ の横に「＋ ファイル」「公開ページ」「アカウント」の1行・アカウントは右端のまま） */
.appbody .topbar .spacer { display: none; }
.appbody .topbtns { flex: 1 1 auto; }
/* 引き出しの一番下: 有料版／無料版と使っている量（11/25 前田さん） */
.sidefoot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.sidefoot .usagemini { display: flex; flex-wrap: wrap; flex: 1 1 100%; gap: 4px; }
.sidefoot .usagemini .bar { width: 100%; }
#sideFreeNote { margin: 4px 0 12px; }
/* 引き出しの一番上: 全部のフォルダから検索・お気に入り（11/25） */
.sidesearch { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.sidesearch input[type=search] { flex: 1 1 100%; width: auto; }
.sidesearch button { flex: 1 1 auto; }
/* アカウント（設定）は引き出しの一番下の、版と量の上（11/25） */
.sidefoot .accbtn { flex: 1 1 100%; }
.appbody .topbtns > * { white-space: nowrap; }   /* 「＋ 上げる」「アカウント」を途中で折らない（320px の幅・11/24 verifier の指摘） */
/* スマホの幅（320〜400px）でも「☰・＋ ファイル・公開ページ・アカウント」を1行に収める（11/25）。☰ は縮めない */
.appbody .topbar .iconbtn { flex: none; }
@media (max-width: 400px) { .appbody .topbar { padding: 8px; gap: 6px; } .appbody .topbar .iconbtn { width: 38px; } .appbody .topbtns { gap: 6px; } .appbody .topbtns > * { padding: 8px 7px; font-size: 15px; } }
/* 公開ページに載せた作品＝黄色の枠と「公開中」・X で投稿を押した作品＝「X に出した」（11/24 前田さん） */
.item.pub { border: 3px solid #ffd23f; }
/* 公開で選んでいる作品: 黄色の枠のまま、外側に青い線（絵の下に隠れないように外へ出す＝11/24 verifier の指摘） */
.item.pub.on { border-color: #ffd23f; outline: 3px solid var(--accent); outline-offset: 2px; }
.item .marks { position: absolute; left: 8px; bottom: 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; pointer-events: none; }
.item .mark { font-size: 14px; font-weight: 700; line-height: 1; padding: 6px 8px; border-radius: 6px; }
.item .pubmark { background: #ffd23f; color: #1a1400; }
.item .xmark { background: #000; color: #fff; border: 1px solid #fff; }
/* 時間のかかる処理の数字とゲージ（11/24）。量の分からない手順は、ゲージを流れる縞にする */
.readbox { margin: 8px 0; }
.readbox p { margin: 0 0 6px; }
#sendText { margin: 8px 0 6px; }
.bar.busy > i { background: repeating-linear-gradient(-45deg, var(--accent) 0 12px, #7ea0ff 12px 24px); background-size: 34px 34px; animation: busybar 1s linear infinite; }
@keyframes busybar { from { background-position: 0 0; } to { background-position: 34px 0; } }
@media (prefers-reduced-motion: reduce) { .bar.busy > i { animation: none; } }
/* 公開ページのアイコン・ヘッダーの映す所を決める画面（app/page.js・アプリ版の range-ed と同じ形） */
body.range-open { overflow: hidden; }
.range-ed { position: fixed; inset: 0; z-index: 100020; display: flex; flex-direction: column; background: #05070d; color: #fff; padding: calc(10px + env(safe-area-inset-top)) 0 calc(10px + env(safe-area-inset-bottom)); }
.range-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 16px 10px; font-size: 18px; }
.range-head-right { display: flex; align-items: baseline; gap: 8px; }
.range-head .range-time-label { color: var(--sub); font-size: 15px; }
.range-head .range-time { color: #fff; font-size: 17px; font-weight: 700; min-width: 4.2em; text-align: right; font-variant-numeric: tabular-nums; }
.range-time.loading { opacity: .45; }
.range-load { padding: 24px 16px; }
.range-load p { margin: 0 0 8px; font-size: 16px; }
.range-stage { position: relative; flex: 1; min-height: 200px; overflow: hidden; touch-action: none; cursor: grab; }
.range-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; max-width: none; pointer-events: none; }
.range-frame { position: absolute; border: 3px dashed #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); pointer-events: none; }
.range-frame.circle { border-radius: 50%; }
.range-tools { padding: 10px 16px 0; }
.range-row { display: flex; align-items: center; gap: 12px; margin: 6px 0; min-height: 46px; font-size: 16px; font-weight: 700; }
.range-row > span:first-child { flex: none; width: 4.5em; }
.range-row input[type=range] { flex: 1; min-width: 0; }
.range-step { flex: none; min-width: 44px; min-height: 40px; padding: 0 8px; }
.range-tools .note { color: var(--sub); margin: 4px 0 0; }
.range-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 16px 0; }
/* アカウントの窓の「公開ページのアイコンとヘッダー」 */
.arthead { font-size: 18px; margin: 20px 0 8px; }
.pageart .artrow { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.pageart .artlabel { font-weight: bold; margin: 10px 0 4px; }
.pageart .artnum { min-width: 1.5em; text-align: right; color: var(--sub); }
.pageart .arti { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: #000; }
.pageart .arth { width: 180px; max-width: 50vw; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 6px; background: #000; }
.pageart button { padding: 6px 12px; min-height: 40px; }
/* 始めと終わりの見本・範囲の帯（11/24 前田さん）: 暗い帯＝動画の全体・明るい帯＝選べる範囲（無料 20秒・有料 60秒）・青＝選んだ範囲 */
.vcprevs { display: flex; gap: 8px; }
.vcprevs figure { margin: 0; flex: 1; min-width: 0; }
.vcprevs figcaption { font-size: 15px; color: var(--sub); text-align: center; }
.vcrange { position: relative; height: 16px; margin: 8px 0 4px; background: #0b1020; border-radius: 999px; overflow: hidden; }
.vcrange i { position: absolute; top: 0; bottom: 0; }
#vcWin { background: #3b4a6b; }
#vcSel { background: var(--accent); }
/* 動画を動く WebP に変える欄（11/24） */
.vidconv { border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin: 8px 0; }
.vidconv h3 { margin: 0 0 4px; font-size: 18px; }
.vcprev { display: block; max-width: 100%; max-height: 180px; margin: 8px auto 2px; border-radius: 8px; background: #000; }
.vidconv input[type=range] { width: 100%; }
.vcopts { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; }
.vcopts label { display: flex; align-items: center; gap: 6px; margin: 0; }
.vcopts select { width: auto; }
#vcPlan { margin: 8px 0; }
/* 取り込んだ動画の見本（11/25） */
.vclive { display: block; width: 100%; max-height: 40vh; margin: 8px 0 4px; border-radius: 8px; background: #000; }
.vcliverow { margin: 4px 0 8px; }
/* 全画面（11/24・viewer.js・PhotoSwipe）: 絵を押すと開く・下に題名・WebM の 🔇 */
.item img.open { cursor: zoom-in; }
.item img.open:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
/* 全画面そのものの見た目は viewer.css だけに書く（11/25: ここにも同じ物があり、後から読むこちらが勝って直しが効かなくなるため外した） */
@media (max-width: 599px) {
  .menuback { background: rgba(0,0,0,.55); }
  .itemmenu { left: 0; right: 0; bottom: 0; top: auto; max-width: none; border-radius: 14px 14px 0 0; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
  .itemmenu .mclose { display: block; text-align: center; border-top: 1px solid var(--line); border-radius: 0; margin-top: 4px; }
}
/* ページの背景の設定（11/25・アカウントの窓） */
.bgblock { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px 4px; margin: 8px 0 12px; }
.bgblock legend { font-weight: bold; padding: 0 6px; }
.bgtypes { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 4px 0 8px; }
.bgtype, .bgrow { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.bgrow select { width: auto; max-width: 60vw; }
.bgrow input[type=range] { flex: 1 1 120px; min-width: 0; max-width: 260px; }
.bgrow input[type=color] { width: 56px; height: 36px; padding: 2px; border-radius: 6px; }
.bgval { min-width: 3.5em; color: var(--sub); }
.bgprev { position: relative; height: 110px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); margin: 8px 0; display: grid; place-items: center; isolation: isolate; }
.bgprevlayer { position: absolute; inset: 0; z-index: -1; }
.bgprevplate { background: rgba(15,21,38,.82); color: #f3f6fb; padding: 4px 12px; border-radius: 8px; font-weight: bold; }
/* 公開ページの名前と自己紹介・ヘッダーの太さ（11/25・アカウントの窓） */
#pBio { width: 100%; }
.headsize { border: 0; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.headsize legend { float: left; margin-right: 8px; padding: 0; }
.headsize label { display: flex; align-items: center; gap: 6px; margin: 0; }
/* 狭い画面（〜400px）の選んでいる時の帯: ボタンの余白と間を詰めて（字は小さくしない）、帯の高さを抑える（11/25 verifier の指摘＝320px で画面の半分近く） */
@media (max-width: 400px) { .pickrow { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 6px 8px; } .pickrow .pickbtns { gap: 6px; } .pickrow .pickbtns > button, .pickrow select { padding: 6px 9px; min-height: 36px; } }
/* 背景の設定の行（11/25 前田さん: 行全体ではなく欄の所だけ押せる＝行は label にしていない） */
.bgrow { justify-content: flex-start; flex-wrap: wrap; }   /* 狭い幅で窓からはみ出さない（11/25 verifier 5回目） */
.bglabel { flex: 0 0 auto; min-width: 0; margin-right: 4px; }
/* 作品の絵: フォルダを選んでから、表紙の小さい絵で選ぶ（11/25 前田さん） */
.bgpick { margin: 4px 0; }
.bgthumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; max-height: 260px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #0b1020; }
.bgthumb { display: flex; flex-direction: column; gap: 2px; padding: 4px; min-height: 0; border: 2px solid transparent; border-radius: 8px; background: var(--panel); color: var(--text); font-size: 15px; line-height: 1.3; text-align: left; cursor: pointer; }
.bgthumb img { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; background: #000; }
.bgthumb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bgthumb[aria-pressed=true] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.bgthumb:focus-visible { outline: 3px solid #fff; outline-offset: 1px; }
/* 自分の作品の画面の背景（11/25・app.js の applyAppBg）: 後ろに敷き、字は暗い札に載せる */
html { background: var(--bg); }
body.appbg { background: transparent; }
body.appbg .panehead h2, body.appbg .panehead #count, body.appbg .pane > .empty, body.appbg #items > .empty { background: rgba(15,21,38,.82); padding: 2px 10px; border-radius: 8px; }
@media (min-width: 900px) { body.appbg.sideopen .side { background: rgba(15,21,38,.88); } }   /* 半透明は PC の幅だけ（スマホの引き出しは今までどおり不透明＝11/25 verifier 5回目） */
/* スマホでの作品の並び（11/25 前田さん: Android〈360px 前後の幅〉では1行に1つしか並ばなかった＝最小 160px の札が2つ入らない）。設定で1つ／2つ。PC（600px 以上）は今までどおり */
@media (max-width: 599px) { body.cols2 .items { grid-template-columns: repeat(2, minmax(0, 1fr)); } body.cols1 .items { grid-template-columns: minmax(0, 1fr); } }
/* 上げ終えた知らせ（11/25） */
.donebar { margin-bottom: 12px; }
.donebar p { margin: 0 0 4px; }
/* 名前と自己紹介の字数（11/25） */
.charcount { margin: 2px 0 6px; text-align: right; max-width: 100%; }
#pNameCount { max-width: 360px; }
.charcount.over { color: #ffb4b4; }

/* 上の帯のロゴ（11/27 前田さん「ハンバーガーメニューの右にロゴ入れて」）: アプリ版のトップと同じ高さ 26px。スマホ（599px 以下）はアイコン */
.appbody .topbar .brand { flex: none; display: flex; align-items: center; }
.appbody .topbar .brand img { user-select: none; -webkit-user-drag: none; }
.appbody .topbar .brand-wide { display: block; height: 26px; width: auto; }
.appbody .topbar .brand-icon { display: none; width: 32px; height: 32px; border-radius: 8px; }
@media (max-width: 599px) { .appbody .topbar .brand-wide { display: none; } .appbody .topbar .brand-icon { display: block; } }
/* ページ切替（11/27 前田さん「◀◀ ◀1,2,今のページ(数字の見せ方を変える),4,5▶ ▶▶」・app.js paintPagers・公開ページ lib/pages.js も同じ形）。
   今のページは青く塗った丸。端のページでは ◀◀ ◀ ／ ▶ ▶▶ を薄くする。狭い画面は数字を3つに */
.pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin: 12px 0; }
.pager .pg { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 6px; border-radius: 999px; border: 1px solid var(--line); background: #24314f; color: var(--text); font: inherit; font-size: 15px; line-height: 1; text-decoration: none; cursor: pointer; }
.pager .pg:disabled, .pager .pg[aria-disabled="true"] { opacity: .35; cursor: default; }
.pager .pg-cur { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; cursor: default; box-shadow: 0 0 0 2px rgba(77,124,255,.35); }
.pager .pg-end, .pager .pg-step { font-size: 12px; letter-spacing: -1px; }
.pager .pg:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (max-width: 430px) { .pager .pg-wide { display: none; } .pager { gap: 3px; } .pager .pg { min-width: 38px; } }
.perpage { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 4px auto 16px; width: fit-content; padding: 4px 10px; border-radius: 999px; background: rgba(15,21,38,.82); color: var(--sub); font-size: 14px; }
.perpage button { min-width: 48px; min-height: 36px; padding: 4px 10px; font-size: 14px; border-radius: 999px; }
.perpage button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
/* 上の固定の帯のページの表記（11/27 前田さん「複数ページになるときはヘッダーの固定の所にページの表記」）。PC は帯の右端・599px 以下は帯の2段目 */
.appbody .topbar .toppager { flex: none; margin-left: auto; display: flex; align-items: center; gap: 6px; }
.appbody .topbar .toppager .tp { width: 40px; height: 40px; padding: 0; border-radius: 999px; font-size: 14px; }
.appbody .topbar .toppager .tp:disabled { opacity: .35; }
.appbody .topbar .toppager .tpnum { min-width: 4.5em; text-align: center; color: var(--sub); font-size: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.appbody .topbar .toppager .tpnum b { color: #fff; background: var(--accent); border-radius: 999px; padding: 2px 9px; }
/* 帯に収まらない幅では、ページの表記は次の段へ（600〜800px で帯からはみ出した＝11/27 verifier の指摘） */
.appbody .topbar.haspages { flex-wrap: wrap; row-gap: 6px; }
@media (max-width: 599px) { .appbody .topbar.haspages .toppager { order: 9; flex: 1 0 100%; justify-content: center; margin-left: 0; } }
/* ⇅ でつかんでいる時の、ページをめくる所（画面の左右の端。そこに少しいると前・次のページへ） */
.dragedge { position: fixed; top: 0; bottom: 0; width: 56px; z-index: 19; display: flex; align-items: center; justify-content: center; writing-mode: vertical-rl; letter-spacing: 2px; font-size: 14px; color: #fff; background: rgba(77,124,255,.18); border: 2px dashed rgba(77,124,255,.6); pointer-events: none; }
.dragedge.left { left: 0; } .dragedge.right { right: 0; }
.dragedge.hot { background: rgba(77,124,255,.55); border-style: solid; }
