/* プロトタイプ広場 v2 — 白と黒が基調。黄色はニコるだけ。文字組みはニコニコ（nicovideo.jp）に合わせる */
:root {
  --t1: #1a1a1a;          /* 見出し・タイトル */
  --t2: #333333;          /* 本文 */
  --t3: #767676;          /* 補足（ニコニコの rgba(26,26,26,.6) 相当） */
  --t4: #a3a3a3;          /* さらに弱い */
  --black: #1a1a1a;
  --bg: #ffffff;
  --fill: #f0f0f0;        /* ピル・入力欄の地 */
  --fill-2: #e6e6e6;
  --soft: #f7f7f7;
  --line: #e6e6e6;
  --nico: #f9d53e;        /* ニコるだけに使う */
  --nico-d: #e8c219;
  --font: -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", Meiryo, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--t2); font-family: var(--font); font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p { margin: 0; }
h1, h2, h3, .logo, .t-text h3 { font-feature-settings: "palt"; color: var(--t1); }
code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--fill); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--t3); }
.grow { flex: 1; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.center { justify-content: center; }
.row.end { justify-content: flex-end; }
.ico { width: 16px; height: 16px; flex: none; }
.nic { width: 22px; height: 22px; flex: none; display: block; }
.sic { width: 15px; height: 15px; flex: none; display: inline-block; }

/* ---------- ボタン・入力 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--fill); color: var(--t1); font-weight: 700; font-size: 13px; cursor: pointer; white-space: nowrap; transition: background .15s; }
.btn:hover { background: var(--fill-2); }
.btn.black { background: var(--black); color: #fff; }
.btn.black:hover { background: #3a3a3a; }
.btn.small { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 15px; }
.btn.big { height: 44px; padding: 0 26px; font-size: 14px; border-radius: 22px; }
.btn.danger { color: #b3261e; }
.btn.on { background: var(--black); color: #fff; }
.btn:disabled { opacity: .4; cursor: default; }
.link { border: 0; background: none; padding: 0; color: var(--t3); font-size: 12px; text-decoration: underline; cursor: pointer; }
.input { width: 100%; height: 40px; border: 1px solid transparent; border-radius: 8px; background: var(--fill); padding: 0 12px; font: inherit; font-size: 14px; color: var(--t1); }
textarea.input { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.input:focus { outline: none; background: #fff; border-color: var(--black); }
.input.inline { width: auto; height: 30px; display: inline-block; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.check input { accent-color: var(--black); width: 16px; height: 16px; flex: none; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { height: 36px; padding: 0 16px; border: 0; border-radius: 18px; background: var(--fill); color: var(--t2); font-weight: 700; font-size: 14px; cursor: pointer; }
.pills button:hover { background: var(--fill-2); }
.pills button.on { background: var(--black); color: #fff; }
.pills.small button { height: 30px; padding: 0 12px; font-size: 12px; border-radius: 15px; }
.hash { color: var(--t3); font-weight: 700; }

/* 管理者タグのラベル（サムネイルに出るのはこれだけ） */
.label { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 4px; background: rgba(0, 0, 0, .82); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.label button { border: 0; background: none; padding: 0; color: #fff; cursor: pointer; display: grid; }
.label button .ico { width: 12px; height: 12px; }
.label.big { height: 30px; padding: 0 12px; font-size: 15px; border-radius: 6px; }
.labels { position: absolute; left: 8px; top: 8px; right: 8px; display: flex; flex-wrap: wrap; gap: 4px; z-index: 1; }
.labels.static { position: static; }
.labels.static .label { background: var(--black); }
/* 完成度（白黒の濃淡で区別） */
.status { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; border: 1px solid; }
.s-complete { background: var(--black); border-color: var(--black); color: #fff; }
.s-playable { border-color: var(--black); color: var(--t1); }
.s-wip { border-style: dashed; border-color: var(--t4); color: var(--t3); }
.private { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--t3); }
.private .ico { width: 12px; height: 12px; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: hsl(0 0% var(--g)); color: #fff; font-weight: 700; font-size: 14px; flex: none; }
.avatar.sm { width: 24px; height: 24px; font-size: 11px; }
.avatar.lg { width: 80px; height: 80px; font-size: 32px; }

/* ---------- ヘッダー ---------- */
.admin-badge { height: 22px; display: flex; align-items: center; flex: none; margin-left: -12px; padding: 0 8px; border-radius: 4px; background: var(--black); color: #fff; font-size: 11px; font-weight: 700; white-space: nowrap; }
.header { position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 24px; padding: 0 24px; background: #fff; box-shadow: 0 1px 0 var(--line); }
.logo { font-size: 23px; font-weight: 800; letter-spacing: .02em; white-space: nowrap; color: var(--t1); }
.search { display: flex; align-items: center; gap: 8px; width: min(480px, 38vw); height: 40px; padding: 0 16px; border-radius: 20px; background: var(--fill); color: var(--t3); }
.search svg { width: 18px; height: 18px; flex: none; }
.search input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 14px; color: var(--t1); outline: none; }
.search:focus-within { background: #fff; box-shadow: inset 0 0 0 1px var(--black); }
.post-btn { height: 36px; display: flex; align-items: center; padding: 0 18px; border-radius: 18px; background: var(--black); color: #fff; font-weight: 700; font-size: 13px; white-space: nowrap; }
.post-btn:hover { background: #3a3a3a; }
.me-chip { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px; border-radius: 18px; font-weight: 700; font-size: 13px; color: var(--t1); white-space: nowrap; }
.me-chip:hover { background: var(--fill); }
.me-chip.empty { padding: 0 14px; background: var(--fill); }
.sw-warn { background: var(--soft); padding: 8px 24px; font-size: 13px; border-bottom: 1px solid var(--line); }

/* ---------- サイドバー（ニコニコ動画の左メニュー風） ---------- */
.layout { display: flex; align-items: flex-start; }
.side { position: sticky; top: 64px; width: 88px; flex: none; padding: 12px 6px; display: flex; flex-direction: column; gap: 2px; min-height: calc(100vh - 64px); }
.side a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 8px; border-radius: 12px; font-size: 11px; color: var(--t2); text-align: center; }
.side a:hover { background: var(--fill); }
.side a.on { background: var(--fill); font-weight: 700; color: var(--t1); }
.side svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.side a.on svg { stroke-width: 2.2; }
.side hr { width: 56px; border: 0; border-top: 1px solid var(--line); margin: 8px auto; }
main { flex: 1; min-width: 0; }

/* ---------- ページ共通 ---------- */
.page { max-width: 1240px; padding: 24px 32px 64px; }
.page.narrow { max-width: 820px; }
.page-h { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.sec { margin-bottom: 40px; }
.sec-h { font-size: 16px; font-weight: 700; margin-bottom: 14px; }
.sec-row { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.sec-row .sec-h { margin-bottom: 0; }
.sec-row .more, .sec-row .btn { margin-left: auto; }
.more { font-size: 12px; color: var(--t3); }
.more:hover { color: var(--t1); text-decoration: underline; }
.sec-note { margin: -8px 0 14px; font-size: 12px; }
.empty { color: var(--t3); text-align: center; padding: 40px 0; grid-column: 1 / -1; }
.count { font-size: 12px; color: var(--t3); margin: 4px 0 14px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-bottom: 8px; }
.search-in { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--fill); color: var(--t3); margin-left: auto; width: 260px; }
.search-in input { flex: 1; min-width: 0; border: 0; background: none; font: inherit; font-size: 13px; outline: none; color: var(--t1); }

/* ---------- 作品タイル ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px 20px; }
.tile { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.t-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #000; }
.thumb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph { position: absolute; inset: 0; display: grid; place-items: center; padding: 12px; text-align: center; background: var(--fill); }
.ph span { font-size: 14px; font-weight: 700; color: var(--t3); }
.t-flow { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.fc { position: absolute; left: 0; white-space: nowrap; font-size: 15px; font-weight: 700; color: #fff; text-shadow: 0 0 3px #000, 0 0 3px #000, 0 0 2px #000; transform: translateX(110%); will-change: transform; }
.t-body { display: flex; gap: 10px; min-width: 0; }
.t-rank { flex: none; font-size: 28px; font-weight: 700; font-style: italic; line-height: 1; color: var(--t1); min-width: 22px; }
.tile:nth-child(n+4) .t-rank { color: var(--t4); }
.t-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 5px; }
.t-text h3 { font-size: 14px; font-weight: 700; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tile:hover h3 { text-decoration: underline; }
.t-meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--t3); flex-wrap: wrap; }
.t-stats { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--t3); }
.t-stats > span { display: inline-flex; align-items: center; gap: 4px; }
.t-stats .ico { width: 14px; height: 14px; }
.t-date { margin-left: auto; }

/* ---------- トップ ---------- */
.pickup { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 28px; align-items: center; padding: 20px; border-radius: 16px; background: var(--soft); }
.pk-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.pk-play { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border-radius: 50%; background: rgba(0, 0, 0, .72); color: #fff; display: grid; place-items: center; }
.pk-play .ico { width: 20px; height: 20px; }
.pk-info { display: flex; flex-direction: column; gap: 10px; }
.pk-info h3 { font-size: 24px; font-weight: 700; line-height: 1.35; }
.pk-info p { font-size: 14px; color: var(--t2); line-height: 1.6; }
.pk-meta { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--t2); flex-wrap: wrap; }
.pk-nico { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; font-weight: 700; }
.pickup:hover h3 { text-decoration: underline; }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px 28px; }
.ranking a { display: grid; grid-template-columns: 40px 176px minmax(0, 1fr); gap: 14px; align-items: center; }
.rk-no { font-size: 32px; font-weight: 700; font-style: italic; color: var(--t1); text-align: center; line-height: 1; }
.ranking li:nth-child(n+4) .rk-no { color: var(--t4); }
.rk-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: #000; }
.rk-thumb .labels { left: 5px; top: 5px; }
.rk-thumb .label { height: 18px; font-size: 10px; padding: 0 5px; }
.rk-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rk-info b { font-size: 14px; color: var(--t1); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rk-info small { font-size: 12px; color: var(--t3); }
.rk-nico { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 700; color: var(--t1); }
.rk-nico em { font-style: normal; font-size: 11px; font-weight: 400; color: var(--t3); }
.ranking a:hover b { text-decoration: underline; }
.features { display: flex; flex-wrap: wrap; gap: 10px; }
.feature { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px 0 10px; border-radius: 22px; background: var(--fill); }
.feature:hover { background: var(--fill-2); }
.feature .label { background: var(--black); }
.f-n { font-size: 12px; color: var(--t3); }

/* ---------- 作品ページ ---------- */
.work { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 32px; align-items: start; }
.draft-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; margin-bottom: 14px; border-radius: 10px; background: var(--soft); border-left: 4px solid var(--black); font-size: 13px; color: var(--t1); }
.draft-bar span { flex: 1; }
.draft-bar.static .btn { pointer-events: none; }
.stage { position: relative; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: #000; }
.stage .thumb-img { opacity: .7; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 32px; border: 0; border-radius: 28px; background: #fff; color: var(--t1); font-size: 17px; font-weight: 700; cursor: pointer; box-shadow: 0 6px 24px rgba(0, 0, 0, .35); }
.play .ico { width: 20px; height: 20px; }
.play:hover { transform: translate(-50%, -50%) scale(1.04); }
.pin-layer { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.pin-layer.hide .pin:not(.pending) { display: none; }
.pin-layer.placing { pointer-events: auto; cursor: crosshair; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px var(--black); }
.pin { position: absolute; transform: translate(-50%, calc(-100% - 6px)); pointer-events: auto; border: 0; background: none; padding: 0; cursor: pointer; }
.pin > span { position: relative; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--black); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4); font-size: 12px; font-weight: 700; color: #fff; line-height: 1; }
.pin > span::after { content: ''; position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); border: 5px solid transparent; border-top: 6px solid #fff; }
.pin.pending > span { background: #fff; color: var(--black); border-color: var(--black); }
.pin.pending .ico { width: 14px; height: 14px; }
.pin em { display: none; position: absolute; left: 50%; bottom: 34px; transform: translateX(-50%); width: max-content; max-width: 240px; padding: 7px 10px; border-radius: 8px; background: var(--black); color: #fff; font-style: normal; font-size: 12px; line-height: 1.5; text-align: left; }
.pin em b { display: block; font-size: 11px; color: var(--t4); }
.pin:hover em { display: block; }
.pin.flash > span { animation: pinFlash .8s ease-out 2; }
@keyframes pinFlash { 50% { transform: scale(1.5); } }
.stage-tools { display: flex; align-items: center; gap: 12px; padding: 10px 2px; }
.w-head { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 18px; }
.w-head h1 { font-size: 22px; font-weight: 700; line-height: 1.35; }
.w-head .lead { font-size: 14px; color: var(--t2); line-height: 1.6; }
.w-meta { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--t3); flex-wrap: wrap; }
.author { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--t1); }
.author:hover span { text-decoration: underline; }
.nico-row { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.nico-btn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px 0 12px; border: 0; border-radius: 22px; background: var(--nico); color: var(--t1); font-size: 15px; font-weight: 700; cursor: pointer; transition: background .15s; }
.nico-btn .nic { width: 28px; height: 28px; }
.nico-btn b { font-size: 15px; }
.nico-btn:hover:not(:disabled) { background: var(--nico-d); }
.nico-btn.on { background: var(--black); color: #fff; }
.nico-btn:disabled { cursor: default; opacity: .55; }
.tag-area { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tag { display: inline-flex; align-items: center; height: 30px; border-radius: 15px; font-size: 13px; font-weight: 700; color: var(--t1); white-space: nowrap; }
.tag a { display: inline-flex; align-items: center; gap: 4px; height: 100%; padding: 0 12px; }
.tag a:hover { text-decoration: underline; }
.tag .ico { width: 12px; height: 12px; }
.t-admin { background: var(--black); color: #fff; border-radius: 4px; padding: 0 10px; height: 26px; font-size: 12px; }
.t-author { box-shadow: inset 0 0 0 1px var(--black); }
.t-user { background: var(--fill); }
.t-user a { padding-right: 4px; }
.tag-x { border: 0; background: none; width: 24px; height: 24px; margin-right: 4px; border-radius: 50%; display: grid; place-items: center; color: var(--t3); cursor: pointer; }
.tag-x:hover { background: var(--fill-2); color: var(--t1); }
.tag-x .ico { width: 12px; height: 12px; }
.tag-add { display: inline-flex; align-items: center; height: 30px; border-radius: 15px; border: 1px dashed var(--t4); padding: 0 4px 0 12px; }
.tag-add input { width: 96px; border: 0; background: none; font: inherit; font-size: 13px; outline: none; color: var(--t1); }
.tag-add button { border: 0; background: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: var(--t2); }
.tag-add button:hover { background: var(--fill); }
.tag-add .ico { width: 14px; height: 14px; }
.desc { padding: 18px 0; font-size: 14px; line-height: 1.8; color: var(--t2); }
.desc p { margin: 0 0 8px; }
.desc ul { margin: 0 0 12px; padding-left: 20px; }
.desc h4 { font-size: 15px; font-weight: 700; color: var(--t1); margin: 18px 0 6px; }
.desc h4:first-child { margin-top: 0; }
.slack-link { display: flex; align-items: center; gap: 10px; padding: 14px 16px; margin-bottom: 20px; border-radius: 10px; background: var(--soft); font-size: 13px; color: var(--t2); }
.slack-link b { color: var(--t1); }
.slack-link .go { margin-left: auto; font-weight: 700; color: var(--t1); }
.slack-link:hover .go { text-decoration: underline; }
.settings-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; margin-bottom: 20px; }
.settings-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.settings-card.admin { border: 1px dashed var(--black); }
.set { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.settings-card h3 + .set { border-top: 0; }
.set-l { width: 110px; flex: none; font-size: 12px; font-weight: 700; color: var(--t3); }
.set-c { flex: 1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; font-size: 13px; }
.set-c .input { flex: 0 1 260px; height: 34px; }
.set-c .label { background: var(--black); }
.w-side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 16px; }
.side-card { border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.side-card h3 { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.side-card h3 .muted { font-size: 12px; font-weight: 400; }
.c-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.c-form .btn.on { background: var(--black); color: #fff; }
.pin-state { font-size: 12px; color: var(--t2); }
.c-list { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow: auto; }
.c-list li { display: flex; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.5; }
.c-list li.has-pin { cursor: pointer; }
.c-list li.has-pin:hover { background: var(--soft); }
.c-list p { color: var(--t2); }
.c-top { display: flex; gap: 8px; align-items: baseline; margin-bottom: 1px; }
.c-top b { font-size: 12px; color: var(--t1); }
.c-top time { font-size: 11px; color: var(--t4); }
.pin-no { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--black); color: #fff; font-size: 11px; font-weight: 700; margin-top: 1px; }
.nico-names { list-style: none; margin: 0; padding: 0; max-height: 240px; overflow: auto; }
.nico-names li { display: flex; justify-content: space-between; padding: 6px 0; border-top: 1px solid var(--line); font-size: 13px; }
.nico-names time { font-size: 11px; color: var(--t4); }

/* ---------- ユーザー ---------- */
.user-head { display: flex; align-items: center; gap: 20px; padding: 8px 0 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.uh-t { flex: 1; min-width: 200px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.uh-t h1 { font-size: 24px; font-weight: 700; }
.slack-id { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 15px; background: var(--fill); font-size: 13px; font-weight: 700; cursor: pointer; }
.slack-id:hover { background: var(--fill-2); }
.slack-id .ico { width: 14px; height: 14px; }
.uh-stats { display: flex; gap: 32px; }
.uh-stats div { display: flex; flex-direction: column; align-items: flex-end; }
.uh-stats b { font-size: 26px; font-weight: 700; color: var(--t1); line-height: 1.1; }
.uh-stats span { font-size: 12px; color: var(--t3); }

/* ---------- タグ ---------- */
.admin-tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.admin-tag { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 12px; background: var(--soft); }
.admin-tag:hover { background: var(--fill); }
.admin-tag .label { background: var(--black); }
.at-desc { font-size: 12px; color: var(--t3); line-height: 1.5; }
.at-n { font-size: 12px; color: var(--t2); font-weight: 700; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--fill); font-weight: 700; font-size: 13px; color: var(--t1); }
.tag-cloud a:hover { background: var(--fill-2); }
.tag-cloud b { font-size: 11px; color: var(--t3); }
.tag-head { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 4px 0 20px; }
.tag-head h1 { font-size: 24px; font-weight: 700; }
.tag-head .label.big { background: var(--black); }
.th-kind, .th-n { font-size: 12px; color: var(--t3); }
.tag-head p { font-size: 14px; color: var(--t2); line-height: 1.6; }

/* ---------- 使い方 ---------- */
.welcome { max-width: 860px; padding: 32px 32px 80px; }
.wl-hero { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; }
.wl-mark { width: 72px; height: 72px; flex: none; }
.wl-hero h1 { font-size: 28px; font-weight: 700; margin-bottom: 8px; }
.wl-hero p { font-size: 14px; line-height: 1.75; color: var(--t2); }
.card { border-radius: 16px; background: var(--soft); padding: 24px; }
.register { display: flex; flex-direction: column; gap: 16px; margin-bottom: 32px; }
.register h2 { font-size: 18px; font-weight: 700; }
.register .input { background: #fff; }
.upload-form > .btn { align-self: flex-start; }
.upload-pickers { display: grid; gap: 12px; }
.upload-pickers .field { min-width: 0; padding: 12px 16px; border-radius: 8px; background: #fff; }
.upload-pickers input[type=file] { max-width: 100%; font: inherit; font-weight: 400; }
.upload-pickers input::file-selector-button { margin-inline-end: 10px; padding: 6px 12px; border: 0; border-radius: 6px; background: var(--fill); color: var(--t1); font: inherit; cursor: pointer; }
.upload-pickers input::file-selector-button:hover { background: var(--fill-2); }
.upload-form > :is(p, ul):empty { display: none; }
.cover-preview { width: min(100%, 240px); }
.api-guide { white-space: pre-wrap; overflow-wrap: anywhere; }
.api-doc { max-width: 76ch; line-height: 1.65; overflow-wrap: anywhere; }
.api-doc h2 { margin: 24px 0 8px; }
.guide-actions { margin-top: 12px; }
.guide-actions + :is(form, .sec) { margin-top: 16px; }
.api-key-list > li + li { margin-top: 12px; }
.api-doc ul, .api-doc ol { padding-left: 1.5em; }
.api-doc li + li, .api-doc p + p { margin-top: 6px; }
.api-doc li p { margin-top: 4px; }
.api-doc pre { background: var(--fill); border-radius: 8px; padding: 12px 16px; margin: 8px 0; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--t1); }
.field em { font-style: normal; font-size: 11px; color: #fff; background: var(--black); border-radius: 3px; padding: 1px 5px; margin-left: 6px; }
.field small { font-weight: 400; color: var(--t3); font-size: 12px; line-height: 1.5; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; }
.toc a { height: 32px; display: flex; align-items: center; padding: 0 14px; border-radius: 16px; background: var(--fill); font-size: 13px; font-weight: 700; color: var(--t2); }
.toc a:hover { background: var(--fill-2); }
.guide { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 18px; padding: 28px 0; border-top: 1px solid var(--line); scroll-margin-top: 80px; }
.step { width: 40px; height: 40px; border-radius: 50%; background: var(--black); color: #fff; display: grid; place-items: center; font-size: 18px; font-weight: 700; }
.g-body { display: flex; flex-direction: column; gap: 10px; font-size: 14px; line-height: 1.8; color: var(--t2); min-width: 0; }
.g-body h2 { font-size: 20px; font-weight: 700; line-height: 1.4; margin-bottom: 2px; }
.g-body ul, .g-body ol { margin: 0; padding-left: 20px; }
.g-body li { margin: 3px 0; }
.g-body b { color: var(--t1); }
.g-demo { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: 12px; background: var(--soft); flex-wrap: wrap; }
.g-tile { width: 280px; max-width: 100%; }
.g-demo .draft-bar { margin: 0; flex: 1; background: #fff; }
.tag-kinds { border-collapse: collapse; width: 100%; font-size: 13px; }
.tag-kinds td, .tag-kinds th { padding: 12px 10px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; line-height: 1.6; }
.tag-kinds th { white-space: nowrap; color: var(--t1); }
.tag-kinds .tag { padding: 0 12px; gap: 4px; }
.faq dl { margin: 0; }
.faq dt { font-weight: 700; color: var(--t1); margin-top: 12px; }
.faq dd { margin: 2px 0 0; }

/* ---------- 投稿 ---------- */
.post-form { display: flex; flex-direction: column; gap: 22px; }
.post-form .pills { align-self: flex-start; }
.drop { border: 2px dashed var(--fill-2); border-radius: 12px; padding: 26px; text-align: center; color: var(--t3); font-weight: 400; }
.drop.over { border-color: var(--black); background: var(--soft); }
.drop p { margin: 0 0 12px; font-size: 14px; }
.fstatus > div { margin-top: 8px; padding: 10px 14px; border-radius: 8px; font-size: 13px; font-weight: 400; background: var(--soft); color: var(--t1); }
.fstatus .err { background: #fdecea; color: #b3261e; }
.post-foot { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.post-foot small { display: inline-flex; align-items: center; gap: 4px; color: var(--t3); font-size: 12px; }

/* ---------- 仕様書 ---------- */
.spec-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.spec-h .page-h { margin: 0; }
.spec-h small { color: var(--t3); font-size: 12px; }
.spec-body { margin: 14px 0 0; padding: 20px 22px; background: var(--black); color: #e6e6e6; border-radius: 12px; font: 12.5px/1.75 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-word; max-height: 70vh; overflow: auto; }

/* ---------- モーダル・トースト ---------- */
.modal-back { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, .5); display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 16px; width: min(420px, 100%); padding: 24px; display: flex; flex-direction: column; gap: 20px; font-size: 14px; line-height: 1.6; color: var(--t1); }
#toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; background: var(--black); color: #fff; padding: 12px 20px; border-radius: 24px; font-size: 13px; font-weight: 700; box-shadow: 0 6px 20px rgba(0, 0, 0, .25); transition: opacity .4s; white-space: nowrap; }
.toast.out { opacity: 0; }

/* ---------- 狭い画面 ---------- */
@media (max-width: 1080px) {
  .work { grid-template-columns: minmax(0, 1fr); }
  .w-side { position: static; }
  .pickup { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .header { gap: 10px; padding: 0 12px; height: 56px; }
  .logo { font-size: 18px; }
  .admin-badge { margin-left: -4px; padding: 0 6px; font-size: 10px; }
  .admin-badge span { display: none; }
  .search { display: none; }
  .me-chip span:not(.avatar) { display: none; }
  .me-chip:not(.empty) { padding: 0 6px; }
  .side { position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 50; width: auto; min-height: 0; flex-direction: row; justify-content: space-around; padding: 4px; background: #fff; box-shadow: 0 -1px 0 var(--line); }
  .side a { flex: 1; padding: 6px 0; font-size: 10px; border-radius: 8px; }
  .side svg { width: 22px; height: 22px; }
  .side hr { display: none; }
  body { padding-bottom: 64px; }
  .page, .welcome { padding: 16px 14px 48px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px 12px; }
  .ranking { grid-template-columns: minmax(0, 1fr); }
  .ranking a { grid-template-columns: 28px 120px minmax(0, 1fr); gap: 10px; }
  .rk-no { font-size: 24px; }
  .search-in { margin-left: 0; width: 100%; }
  .guide { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .admin-tags { grid-template-columns: minmax(0, 1fr); }
  .uh-stats div { align-items: flex-start; }
  .toast { white-space: normal; }
  #toasts { bottom: 76px; width: calc(100vw - 24px); }
}
