/* フロントエンド（町の地図・広場・わたしの推し）の見た目 */
.panel { padding: 16px; margin-bottom: 16px; }
.row { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.row.end { justify-content: flex-end; }
.link-btn { background: none; border: none; color: var(--accent-ink, var(--accent)); cursor: pointer; padding: 0; font: inherit; font-size: .85rem; }
.small { font-size: .85rem; }
.block { display: block; text-align: center; text-decoration: none; }

/* ===== 町の地図（トップ） ===== */
.town-map {
  position: relative; width: 100%; max-width: 900px; margin: 0 auto; aspect-ratio: 16 / 10;
  background: #dcebcf; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
}
@media (max-width: 600px) { .town-map { aspect-ratio: 3 / 4; } }
.road { position: absolute; background: #efe4cf; }
.road-h { left: 0; right: 0; top: 47%; height: 6%; }
.road-v { top: 0; bottom: 0; left: 47%; width: 6%; }
.plaza-spot {
  position: absolute; left: 30%; top: 30%; width: 40%; height: 40%; border-radius: 50%;
  background: #fff3e6; border: 4px solid #e3a77a; color: #2b2420; text-decoration: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 8px; text-align: center;
  transition: transform .15s;
}
.plaza-spot:hover { transform: scale(1.03); }
.plaza-spot:focus-visible, .map-house:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.plaza-title { font-size: clamp(1rem, 3vw, 1.5rem); font-weight: 800; }
.plaza-latest { font-size: clamp(.7rem, 1.8vw, .9rem); color: #5a4d45; max-width: 90%; overflow-wrap: anywhere; }
.map-house {
  position: absolute; width: 22%; display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: #2b2420; --c: #e3915c;
}
.map-roof {
  width: 70%; aspect-ratio: 7 / 5; background: var(--c);
  clip-path: polygon(50% 0, 100% 55%, 86% 55%, 86% 100%, 14% 100%, 14% 55%, 0 55%);
}
.garage-spot .map-roof { clip-path: none; border-radius: 8px 8px 0 0; background: #5b5f6b; aspect-ratio: 2 / 1; }
.map-face { width: 34%; margin-top: -32%; filter: drop-shadow(0 1px 1px rgb(0 0 0 / 20%)); }
.map-house[data-status="sleeping"] .map-face { filter: brightness(.6); }
.map-zzz { position: absolute; top: 0; right: 14%; font-size: .75rem; font-weight: 700; color: #4b3f75; }
.map-away { margin-top: -26%; font-size: .75rem; font-weight: 700; color: #fff; background: #5b5f6b; padding: 0 6px; border-radius: 6px; }
.map-label { font-size: clamp(.65rem, 1.6vw, .85rem); font-weight: 700; background: #fff; padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.game-spot {
  position: absolute; left: 70%; top: 54%; z-index: 2; display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap;
  background: #fff; color: #2b2420; text-decoration: none; font-weight: 800; font-size: clamp(.65rem, 1.6vw, .85rem);
  padding: 3px 10px; border-radius: 999px; border: 2px solid #e3a77a; box-shadow: 0 0 0 4px rgb(255 214 120 / 55%);
  animation: spot-glow 1.6s ease-in-out infinite;
}
.game-spot .game-say { font-weight: 600; color: #5a4d45; }
.game-spot.closed { animation: none; box-shadow: none; color: #6f625a; border-style: dashed; font-weight: 600; }
.game-spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@keyframes spot-glow { 50% { box-shadow: 0 0 0 7px rgb(255 214 120 / 25%); } }
@media (prefers-reduced-motion: reduce) { .game-spot { animation: none; } }
@media (max-width: 600px) { .game-spot { left: 66%; top: 50%; white-space: nowrap; } .game-spot .game-say { display: none; } }
.ground-spot {
  position: absolute; left: 61%; top: 20%; z-index: 2; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: #fff; color: #2b2420; text-decoration: none; font-weight: 800; font-size: clamp(.65rem, 1.6vw, .85rem);
  padding: 3px 10px; border-radius: 999px; border: 2px solid #8fbf7a;
}
.korotomo-spot {
  position: absolute; left: 58.5%; top: 88%; z-index: 2; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: #fff; color: #2b2420; text-decoration: none; font-weight: 800; font-size: clamp(.65rem, 1.6vw, .85rem);
  padding: 3px 10px; border-radius: 999px; border: 2px solid #7fa7c9;
}
.soratomo-spot {
  position: absolute; right: 3%; top: 44%; z-index: 2; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: #1b2560; color: #fff; text-decoration: none; font-weight: 800; font-size: clamp(.65rem, 1.6vw, .85rem);
  padding: 3px 10px; border-radius: 999px; border: 2px solid #6fd3ff;
}
.soratomo-spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.korotomo-spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shinbunsha-spot {
  position: absolute; left: 15%; top: 31%; z-index: 2; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: #fffdf7; color: #3b332d; border: 2px solid #3b332d; border-radius: 6px; padding: 4px 10px;
  font-weight: 800; font-size: clamp(.72rem, 1.8vw, .9rem); text-decoration: none; box-shadow: 0 2px 0 #3b332d;
}
.shinbunsha-spot:hover { transform: translateY(-1px); }
.shinbunsha-spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shinbunsha-badge { position: absolute; top: -12px; right: -10px; font-size: .68rem; font-weight: 800; color: #fff; background: var(--like); border-radius: 999px; padding: 1px 6px; }
.shinbunsha-badge.is-extra { background: #b3262d; border-radius: 4px; }
.to-thread { margin: 0; text-align: center; }
.to-thread .btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.ground-spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.mystery-sign {
  position: absolute; right: 4%; bottom: 6%; background: #fff; border: 2px dashed #c9ad95; border-radius: 10px;
  padding: 4px 10px; font-weight: 800; letter-spacing: .2em; color: #6f625a; font-size: clamp(.75rem, 2vw, 1rem);
}
.mystery-sign.mystery-2 { right: auto; left: 29%; bottom: 5%; }
.mystery-sign.mystery-3 { bottom: auto; top: 33%; right: 3%; text-decoration: none; z-index: 2; }
.mystery-sign.mystery-3:hover { border-style: solid; }
.mystery-sign.mystery-3:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.kondate-shop {
  position: absolute; left: 36%; top: 3%; width: 28%; display: flex; flex-direction: column; align-items: center;
  background: #fff; border-radius: 10px; padding: 0 6px 6px; text-decoration: none; color: #2b2420;
  box-shadow: 0 2px 6px rgb(40 60 20 / 18%); overflow: hidden; text-align: center;
}
.kondate-shop:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.shop-awning { align-self: stretch; height: 12px; margin: 0 -6px 4px; background: repeating-linear-gradient(90deg, #2f9e5b 0 14px, #fff 14px 28px); }
.shop-name { font-weight: 800; font-size: clamp(.7rem, 1.8vw, .95rem); }
.shop-today { font-size: clamp(.6rem, 1.5vw, .8rem); color: #5a4d45; overflow-wrap: anywhere; }
.oshi-cta { display: block; max-width: 420px; margin: 18px auto 0; text-align: center; text-decoration: none; padding: 12px; font-size: 1.05rem; }

/* ===== 広場（チャット） ===== */
.chat-layout { max-width: 760px; }
.chat { display: flex; flex-direction: column; height: calc(100vh - 230px); min-height: 420px; overflow: hidden; }
body:not(.has-playground) .chat { height: calc(100vh - 120px); }
.chat-head { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.back-link { font-size: 1.8rem; line-height: 1; text-decoration: none; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; }
.back-link:hover { background: var(--surface-2); }
.chat-title { font-size: 1.05rem; margin: 0; }
.chat-head p { margin: 0; }
.chat-log { list-style: none; margin: 0; padding: 16px 14px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 8px; align-items: flex-start; }
.msg-body { display: flex; flex-direction: column; gap: 3px; max-width: min(75%, 480px); }
.msg-name { font-size: .78rem; color: var(--muted); }
.msg-name a { color: inherit; }
.bubble {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px 18px 18px 18px;
  padding: 8px 14px;
}
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.quote { display: block; font-size: .75rem; color: var(--muted); border-left: 3px solid var(--border); padding-left: 6px; margin-bottom: 4px; }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-body { align-items: flex-end; }
.msg.mine .bubble { background: color-mix(in srgb, var(--accent) 22%, var(--surface)); border-color: transparent; border-radius: 18px 4px 18px 18px; }
.msg.pending .bubble { border: 2px dashed var(--border); background: var(--surface); }
.msg-meta { display: flex; gap: 8px; align-items: center; font-size: .75rem; color: var(--muted); }
.msg-act { background: none; border: none; color: var(--muted); cursor: pointer; padding: 2px 4px; border-radius: 6px; font: inherit; font-size: .75rem; }
.msg-act:hover { background: var(--surface-2); }
.msg-act.liked { color: var(--like); }
.thread-link { display: inline-block; margin-top: 6px; font-weight: 700; font-size: .88rem; }
.official-badge { font-size: .68rem; font-weight: 700; color: #fff; background: #3b332d; border-radius: 4px; padding: 0 4px; }
@media (prefers-color-scheme: dark) { .official-badge { background: #d8c8b8; color: #1c1612; } }
.chat-composer, .chat-login { border-top: 1px solid var(--border); padding: 10px 12px; margin: 0; }
.chat-composer .row { margin-top: 0; }
.precheck { margin-bottom: 10px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.precheck[data-level="block"] { border: 2px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, var(--surface)); }
.precheck-title { margin: 0 0 8px; font-weight: 800; font-size: .92rem; }
.precheck-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.precheck-line { display: flex; gap: 8px; align-items: flex-start; }
.precheck-line img { flex: none; border-radius: 50%; background: var(--surface); }
.precheck-line p { margin: 2px 0 0; font-size: .92rem; }
.precheck-who { font-size: .78rem; font-weight: 700; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.precheck-kind { font-size: .7rem; font-weight: 700; padding: 0 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.precheck-line[data-kind="warning"] .precheck-kind { color: #9a3412; border-color: #f0b58a; }
.precheck-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.precheck-actions .btn { min-height: 40px; }
.chat-composer textarea { resize: none; min-height: 44px; border-radius: 22px; padding: 10px 16px; }
.send-btn { min-height: 44px; flex: none; }
.reply-target { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; color: var(--muted); margin-bottom: 6px; }
.empty { color: var(--muted); text-align: center; padding: 32px 0; list-style: none; }

/* ===== わたしの推し（ダッシュボード） ===== */
.oshi-hero {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 24px; border-radius: var(--radius);
  background: var(--oshi, #b4467a); color: #fff; margin-bottom: 16px;
}
html[data-oshi-color] .oshi-hero { color: var(--accent-text); }
.oshi-photo { width: 72px; height: 72px; border-radius: 50%; background: rgb(255 255 255 / 28%); border: 3px solid currentColor; flex: none; }
.oshi-label { margin: 0; font-size: .85rem; }
.oshi-name { margin: 0; font-size: 1.6rem; overflow-wrap: anywhere; }
.oshi-edit-btn { margin-left: auto; }
.oshi-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 800px) { .oshi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .oshi-grid { grid-template-columns: 1fr; } }
.oshi-tile { padding: 16px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.oshi-tile h2 { font-size: .95rem; margin: 0; color: var(--muted); }
.oshi-big { font-size: 1.8rem; font-weight: 800; margin: 0; }
.oshi-tile p { margin: 0; }
.oshi-goods { grid-row: span 2; }
.tile-head { display: flex; justify-content: space-between; align-items: center; }
.goods-list, .friends-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 6px; }
.goods-list li { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 6px 10px; }
.goods-list li span:first-child { flex: 1; overflow-wrap: anywhere; }
.friends-list li { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: .9rem; overflow-wrap: anywhere; }
.access-list { list-style: none; margin: 4px 0; padding: 0; display: grid; gap: 6px; }
.access-list li { background: var(--surface-2); border-radius: 10px; padding: 8px 10px; font-size: .9rem; display: grid; gap: 2px; overflow-wrap: anywhere; }
.oshi-access .shiba-line { margin: 6px 0; }
.shiba-line { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 8px; }
.shiba-line p { margin: 0; }
.oshi-dialog { width: min(440px, calc(100vw - 32px)); padding: 20px; color: var(--text); }
.oshi-dialog::backdrop { background: rgb(0 0 0 / 40%); }
.oshi-dialog h2 { margin: 0 0 8px; font-size: 1.15rem; }
.field { display: grid; gap: 4px; font-size: .9rem; margin: 10px 0; }

/* ===== 町の地図：📮 ポスト（手紙キットの入り口） ===== */
.post-spot {
  position: absolute; left: 2%; top: 37%; width: 12%; display: flex; flex-direction: column; align-items: center; gap: 2px;
  text-decoration: none; color: #2b2420;
}
.post-spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.post-box {
  position: relative; width: 46%; aspect-ratio: 3 / 5; background: #d2423c; border-radius: 40% 40% 6px 6px;
  box-shadow: inset -4px 0 0 rgb(0 0 0 / 14%), 0 2px 4px rgb(40 60 20 / 25%); transition: transform .15s;
}
.post-box::before { content: ""; position: absolute; left: 18%; right: 18%; top: 30%; height: 7%; background: #5a1f1c; border-radius: 3px; }
.post-spot:hover .post-box { transform: translateY(-2px); }

/* ===== 手紙キット ===== */
.letter-page [hidden] { display: none !important; }
.letter-page { max-width: 860px; }
.letter-hero h1 { margin: 0 0 4px; font-size: 1.6rem; }
.letter-hero > p { margin: 0 0 12px; }
.guide { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 16px; }
.guide p { margin: 0; }
.guide img { flex: none; }
.letter-form { display: grid; gap: 14px; }
.step { border: 1px solid var(--border); padding: 16px 18px; margin: 0; min-width: 0; }
.step legend { font-weight: 800; font-size: 1.05rem; padding: 0 6px; display: flex; align-items: center; gap: 8px; }
.step-no { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: .9rem; }
.step p { margin: 6px 0 0; }
.warn { background: color-mix(in srgb, #f59e0b 16%, var(--surface)); border-radius: 10px; padding: 8px 12px; font-size: .9rem; }
.paper-pick { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.paper-pick p { margin: 0 0 4px; }
.paper-pick > div:last-child { flex: 1 1 240px; }
.paper-sample {
  flex: none; position: relative; width: 84px; aspect-ratio: 1 / 1.414; background: #fffaf3; border: 3px solid var(--accent);
  border-radius: 6px; padding: 14px 8px; display: flex; flex-direction: column; gap: 9px; box-shadow: var(--shadow);
}
.paper-sample span { height: 2px; background: #e6d3bd; }
.paper-sample .qr-spot { position: absolute; right: 7px; bottom: 7px; width: 20px; height: 20px; background: repeating-conic-gradient(#3d2e22 0 25%, #fff 0 50%) 0 0 / 6px 6px; border: 1px dashed var(--accent); }
.typeface-group { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.typeface-group legend { font-size: .9rem; font-weight: 700; padding: 0; margin-bottom: 6px; }
.typeface-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.typeface-option { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 2px solid var(--border); border-radius: 12px; cursor: pointer; background: var(--surface); }
.typeface-option input { position: absolute; opacity: 0; pointer-events: none; }
.typeface-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface)); }
.typeface-option:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.typeface-sample { font-size: 1.25rem; overflow-wrap: anywhere; }
.typeface-name { font-size: .8rem; color: var(--muted); }
.video-pick { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; }
.video-pick:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.video-preview { display: block; width: 100%; max-height: 360px; margin-top: 10px; border-radius: 12px; background: #000; }
.make-btn { min-height: 48px; padding: 10px 24px; font-size: 1.05rem; }
.step progress { display: block; width: 100%; margin-top: 10px; accent-color: var(--accent); }
.result { padding: 18px 20px; margin-top: 16px; }
.result:focus { outline: none; }
.result h2 { margin: 0 0 12px; }
.result-body { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; }
.qr-box { flex: none; width: 200px; background: #fff; border-radius: 10px; padding: 4px; border: 1px solid var(--border); }
.qr-box svg { display: block; width: 100%; height: auto; }
.result-side { flex: 1 1 260px; min-width: 0; }
.result-side p { margin: 0 0 8px; }
.row.wrap { flex-wrap: wrap; margin: 0 0 10px; }
.row.wrap .btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.note-line { font-size: .88rem; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.my-letters { padding: 18px 20px; margin-top: 16px; }
.my-letters h2 { margin: 0 0 4px; font-size: 1.1rem; }
.letter-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.letter-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.letter-item .row { margin: 0; }
.letter-info { min-width: 0; overflow-wrap: anywhere; }
.letter-status { font-size: .88rem; }
.letter-status.opened { color: var(--like); font-weight: 700; }

/* ===== ログイン ===== */
.login-page { max-width: 560px; }
.login-page .panel { padding: 18px 20px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tabs [role="tab"] { border: 1px solid var(--border); background: var(--surface); border-radius: 999px; padding: 8px 14px; min-height: 44px; cursor: pointer; }
.tabs [role="tab"][aria-selected="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 700; }
.tabs [role="tab"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.login-page .btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.login-page [hidden] { display: none !important; }
.say-line { display: flex; gap: 10px; align-items: flex-start; }
.say-line p { margin: 0; }
.code-list { columns: 2; font-size: 1.15rem; margin: 12px 0; padding-left: 1.6em; }
.code-list code { font-family: ui-monospace, "Consolas", monospace; letter-spacing: .05em; }
.account-list { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; margin: 8px 0 14px; }
.account-list dt { color: var(--muted); }
.account-list dd { margin: 0; font-weight: 700; }
.chat-login p { margin: 0 0 8px; }
.chat-login .btn, .panel > .btn { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; }

/* 保護者とつなぐ */
.family { border-top: 1px solid var(--border); margin-top: 12px; padding-top: 10px; }
.family h2 { font-size: 1.05rem; margin: 0 0 6px; }
.family-code { font-family: ui-monospace, monospace; font-size: 1.3rem; font-weight: 700; letter-spacing: .08em; margin: 0; }
.family-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.family-list li { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; overflow-wrap: anywhere; }
.family-list .posts { margin: 4px 0 0; padding-left: 1.2em; font-size: .88rem; }

/* ゲーム一覧 */
.games-page { display: grid; gap: 14px; }
.games-page h1 { margin: 0; }
.games-page .guide { margin: 0; }
.game-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.game-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.game-card { padding: 14px 16px; display: grid; gap: 6px; align-content: start; overflow-wrap: anywhere; }
.game-card p { margin: 0; }
.game-head { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.game-head h2 { font-size: 1.1rem; margin: 0; }
.rec-count { white-space: nowrap; font-weight: 700; }
.game-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.game-tag { font-size: .8rem; background: var(--surface-2); color: var(--text); border: 0; border-radius: 999px; padding: 2px 10px; }
.tag-btn { cursor: pointer; min-height: 32px; }
.tag-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); }
.voices { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .88rem; }
.voices li { background: var(--surface-2); border-radius: 10px; padding: 4px 10px; }
.oshi-badge { font-size: .75rem; font-weight: 700; color: var(--pink, var(--accent)); }
.apply-form select.input { min-height: 40px; }
.mine { padding-left: 1.2em; margin: 8px 0 0; display: grid; gap: 8px; }

/* はじめての人への案内スライド */
.welcome-page { max-width: 600px; }
.welcome { padding: 20px 22px; display: grid; gap: 14px; border-top: 6px solid var(--guide, var(--accent)); overflow-wrap: anywhere; }
.welcome [hidden] { display: none !important; }
.welcome h1 { margin: 0; font-size: 1.4rem; }
.welcome h2 { margin: 0 0 8px; font-size: 1.05rem; }
.slide { display: grid; gap: 10px; min-height: 280px; align-content: start; }
.slide p { margin: 0; }
.slide-icon { font-size: 2.6rem; line-height: 1; }
.welcome-say { background: var(--surface-2); border-radius: var(--radius); padding: 12px 14px; }
.welcome-say img { flex: none; }
.slide.enter { animation: slide-in .35s ease-out; }
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.dots { display: flex; gap: 8px; justify-content: center; }
.dot { width: 12px; height: 12px; padding: 0; border-radius: 50%; border: 0; background: var(--border); cursor: pointer; }
.dot[aria-selected="true"] { background: var(--guide, var(--accent)); transform: scale(1.25); }
.welcome-nav { justify-content: space-between; }
.welcome-nav .btn { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.skip { margin: 0; text-align: center; font-size: .88rem; }
.odds-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.odds-list li { display: grid; grid-template-columns: 28px minmax(0, 9em) 1fr 3em; gap: 8px; align-items: center; font-size: .9rem; }
.odds-list li.is-me { font-weight: 700; }
.odds-list .bar { height: 10px; border-radius: 999px; background: linear-gradient(90deg, var(--guide, var(--accent)) var(--p), var(--surface-2) var(--p)); }
.odds-list strong { text-align: right; }
.rare-badge { margin: 0; text-align: center; font-weight: 700; color: #b3262d; }
.welcome.is-rare { background: linear-gradient(180deg, rgb(179 38 45 / 8%), transparent 40%), var(--surface); }
.welcome.is-rare .welcome-say img { animation: rare-glow 2s ease-in-out infinite; border-radius: 50%; }
@keyframes rare-glow { 50% { box-shadow: 0 0 0 6px rgb(233 185 73 / 45%); } }
@media (prefers-color-scheme: dark) { .rare-badge { color: #f08a8f; } }
@media (prefers-reduced-motion: reduce) { .slide.enter, .welcome.is-rare .welcome-say img { animation: none; } }

/* ともはね新聞 */
.news-page { max-width: 760px; display: grid; gap: 16px; }
.paper {
  --ink: var(--text); --paper: #fffdf7; --rule: #3b332d;
  background: var(--paper); color: var(--ink); border: 1px solid var(--border); border-radius: 6px;
  box-shadow: var(--shadow); padding: 18px 20px 22px; display: grid; gap: 14px; overflow-wrap: anywhere;
}
@media (prefers-color-scheme: dark) { .paper { --paper: #2a231d; --rule: #d8c8b8; } }
.paper p { margin: 0; }
.paper h1, .paper h2, .paper h3 { font-family: "Yu Mincho", "YuMincho", "Hiragino Mincho ProN", "Noto Serif JP", serif; }
.masthead { text-align: center; border-bottom: 4px double var(--rule); padding-bottom: 8px; display: grid; gap: 4px; }
.masthead h1 { margin: 0; font-size: clamp(1.9rem, 7vw, 2.8rem); letter-spacing: .12em; font-weight: 900; }
.paper-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; font-size: .85rem; border-top: 1px solid var(--rule); padding-top: 4px; }
.extra-band { background: #b3262d; color: #fff; font-weight: 900; font-size: 1.3rem; letter-spacing: .5em; padding: 2px 0 2px .5em; border-radius: 4px; }
.front { border-bottom: 1px solid var(--rule); padding-bottom: 12px; display: grid; gap: 6px; }
.headline { margin: 0; font-size: clamp(1.5rem, 6vw, 2.1rem); line-height: 1.3; }
.is-extra .headline { color: #b3262d; }
@media (prefers-color-scheme: dark) { .is-extra .headline { color: #f08a8f; } }
.lead { font-weight: 700; }
.paper-cols { display: grid; gap: 16px; }
@media (min-width: 640px) { .paper-cols { grid-template-columns: 1fr 1fr; } .paper-cols > :first-child { grid-row: span 2; border-right: 1px solid var(--border); padding-right: 16px; } }
.paper-article { display: grid; gap: 8px; align-content: start; }
.paper-article h3 { margin: 0; font-size: 1.15rem; border-bottom: 1px solid var(--rule); padding-bottom: 2px; }
.paper-article p { text-indent: 1em; line-height: 1.8; }
.paper-article .byline, .paper-article .sign { text-indent: 0; }
.byline { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); }
.sign { text-align: right; font-weight: 700; }
.paper-box { border: 2px solid var(--rule); border-radius: 4px; padding: 12px 14px; display: grid; gap: 10px; }
.paper-kicker { margin: 0; font-size: 1.05rem; }
.paper-box h4 { margin: 4px 0 0; font-size: .95rem; }
.talk { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.talk li { display: flex; gap: 8px; align-items: flex-start; }
.talk img { flex: none; }
.talk p { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; text-indent: 0; line-height: 1.6; }
.talk strong { margin-right: .5em; }
.poll-q { font-weight: 700; }
.poll-notes { margin: 0; padding-left: 1.2em; font-size: .88rem; color: var(--muted); }
.vote-form { display: grid; gap: 8px; }
.vote-form fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 6px; }
.choice { display: flex; gap: 8px; align-items: center; min-height: 40px; padding: 4px 12px; background: var(--surface-2); border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { outline: 2px solid var(--accent); }
.vote-form .btn { min-height: 44px; }
.admin-box { border-top: 1px dashed var(--border); padding-top: 8px; font-size: .9rem; }
.admin-box ul { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.admin-box li { background: var(--surface-2); border-radius: 10px; padding: 6px 10px; }
.backnumbers { padding: 12px 16px; }
.backnumbers h2 { margin: 0 0 6px; font-size: 1rem; }
.backnumbers ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
.backnumbers a { display: block; padding: 6px 4px; overflow-wrap: anywhere; }
.backnumbers a[aria-current="page"] { font-weight: 700; }
.extra-chip, .news-extra { display: inline-block; background: #b3262d; color: #fff; font-size: .72rem; font-weight: 700; border-radius: 4px; padding: 0 5px; margin-left: 4px; vertical-align: middle; }
.extra-chip { margin: 0 4px 0 0; }
.news-dot { display: inline-block; width: 8px; height: 8px; margin-left: 4px; border-radius: 50%; background: var(--like); vertical-align: top; }
.block-notes { margin: 8px 0 0; padding-left: 1.2em; display: grid; gap: 2px; }
.block-kinds { border: 0; margin: 12px 0 4px; padding: 0; display: grid; gap: 8px; }
.block-kind { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.block-kind:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.block-kind input { margin-top: 4px; accent-color: var(--accent); }
.block-kind > span { display: grid; gap: 2px; }
.report-notices { display: grid; gap: 10px; margin: 0 0 10px; max-height: 45vh; overflow-y: auto; }
.report-notice { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: grid; gap: 8px; }
.report-notice[data-stage="enma"], .report-notice[data-stage="lawyer"] { border: 2px solid var(--danger); }
.report-notice[data-stage="police"] { border: 2px solid #2563eb; }
.report-notice .say-line img { flex: none; border-radius: 50%; background: var(--surface); }
.report-quote { margin: 0; padding: 6px 10px; border-left: 3px solid var(--border); color: var(--muted); font-size: .88rem; }
.apology summary { cursor: pointer; width: fit-content; }
.apology-choices { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.apology-text { margin: 0; padding: 8px 12px; border-radius: 12px; background: var(--surface); }
.held-note { display: block; margin-top: 4px; font-size: .78rem; color: var(--muted); }
.report-admin li { display: grid; gap: 4px; }
.is-soon { cursor: pointer; opacity: .92; }
.soon-badge { display: block; font-size: .62rem; font-weight: 700; letter-spacing: 0; color: #6f625a; background: #fff6d6; border: 1px solid #e6c96a; border-radius: 999px; padding: 0 6px; margin-left: 4px; white-space: nowrap; }
.mystery-sign.is-soon { display: inline-flex; align-items: center; }
.cafe-spot {
  position: absolute; left: 27%; top: 66%; z-index: 2; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: #fff7ec; color: #5a3d26; text-decoration: none; font-weight: 800; font-size: clamp(.68rem, 1.7vw, .9rem);
  padding: 4px 12px; border-radius: 8px 8px 4px 4px; border: 2px solid #8a6a4a; box-shadow: 0 2px 0 #8a6a4a;
}
.cafe-spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.cafe-tables { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 8px; }
.cafe-table { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.cafe-table[aria-pressed="true"] { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.cafe-count { font-size: .72rem; font-weight: 700; padding: 0 6px; border-radius: 999px; background: color-mix(in srgb, currentColor 15%, transparent); }
.cafe-guide { margin: 0 0 8px; font-size: .9rem; }
.cafe-guide img { flex: none; border-radius: 50%; background: var(--surface-2); }
.cafe-request { margin: 0 0 8px; }
.cafe-request summary { cursor: pointer; width: fit-content; font-size: .88rem; }
.cafe-request form { margin-top: 6px; }
.cafe-oshi-tables { padding-top: 0; }
.cafe-oshi-tables .cafe-table { font-size: .88rem; padding: 4px 10px; border-style: dashed; }
.cafe-oshi-tables .cafe-table[aria-pressed="true"] { border-style: solid; }
.game-spot.game-center { left: 66%; top: 46%; font-size: clamp(.7rem, 1.8vw, .95rem); border-radius: 10px 10px 6px 6px; border-color: #d9772b; }
@media (max-width: 600px) { .game-spot.game-center { left: 62%; top: 46%; } }
.arcade-staff { display: grid; gap: 10px; }
.arcade-staff img { flex: none; border-radius: 50%; background: var(--surface-2); }
.arcade-staff p { margin: 0; }
/* ゲームセンター：台（筐体）の見た目。夜のゲーセンのような色。コイン・お金の絵は使わない */
.games-page .game-card.cabinet { padding: 0 0 14px; overflow: hidden; border: 3px solid var(--cab); border-radius: 18px 18px 12px 12px; gap: 8px; }
.games-page .cabinet > :not(.cab-marquee):not(.cab-screen) { margin-left: 16px; margin-right: 16px; }
.cab-marquee { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; background: var(--cab); color: #fff; text-align: center; }
.cab-marquee h2 { margin: 0; font-size: 1.05rem; text-shadow: 0 0 6px rgb(255 255 255 / 55%); }
.cab-new { font-size: .7rem; font-weight: 800; background: #ffe14d; color: #2b2420; border-radius: 999px; padding: 1px 8px; }
.cab-screen { margin: 0 14px; display: grid; justify-items: center; gap: 4px; padding: 14px 8px; border-radius: 12px;
  background: radial-gradient(circle at 50% 40%, #233056, #0d1226); color: #9ff3ff; border: 4px solid #1a1d29; }
.cab-icon { font-size: 2rem; line-height: 1.1; }
.cab-attract { font-size: .82rem; font-weight: 800; letter-spacing: .08em; animation: cab-blink 1.4s steps(2, start) infinite; }
.cab-screen.is-off { background: #191c27; color: #a8a2b8; }
.cab-screen.is-off .cab-attract { animation: none; }
.cab-screen.is-off .cab-icon { filter: grayscale(1); opacity: .5; }
@keyframes cab-blink { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .cab-attract { animation: none; } }
.games-page h1 { text-shadow: 0 0 10px color-mix(in srgb, var(--accent) 35%, transparent); }

/* 退会 */
.leaving { background: var(--surface-2); border-radius: 12px; padding: 10px 14px; border-top: 0; }
.leaving .say-line { margin: 8px 0; }
.leaving .say-line img { flex: none; border-radius: 50%; background: var(--surface); }
.leave-box summary { cursor: pointer; color: var(--muted, inherit); }
.leave-box form { display: grid; gap: 10px; margin-top: 10px; }
.leave-farewell { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; display: grid; gap: 6px; }
.family-diary-title { font-size: .95rem; margin: 14px 0 6px; }
.family-diary { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.family-diary li { display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.family-diary li img { flex: none; border-radius: 50%; background: var(--surface); }
.family-diary p { margin: 2px 0 0; }

/* 📮 目安箱 */
.meyasu { margin-top: 16px; display: grid; gap: 10px; }
.meyasu form { display: grid; gap: 8px; }
.meyasu-item { border-bottom: 1px dashed var(--border); padding-bottom: 6px; }
.mine-chip { display: inline-block; margin: 0 0 4px; font-size: .82rem; background: var(--surface-2); border-radius: 999px; padding: 2px 10px; }
#meyasu-reply img { flex: none; border-radius: 50%; background: var(--surface); }
.meyasu-admin-list { list-style: none; padding: 0; display: grid; gap: 10px; }
.meyasu-admin-list > li { border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; }
.meyasu-admin-list p { margin: 2px 0; }

/* 📜 ともはね の約束（利用規約・プライバシー） */
.terms h2 { font-size: 1.05rem; margin: 18px 0 6px; }
.terms ul, .terms ol { padding-left: 1.3em; line-height: 1.8; }
.table-wrap { overflow-x: auto; }
.terms-table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: .88rem; }
.terms-table th, .terms-table td { border: 1px solid var(--border); padding: 6px 8px; vertical-align: top; text-align: left; }
.terms-table th { background: var(--surface-2); }
.terms-child { font-size: 1.05rem; }
.terms-child li { margin: 4px 0; }
.agree-box:not([hidden]) { display: grid; gap: 10px; margin-bottom: 14px; border: 2px solid var(--accent, #c2410c); }
.agree-box .say-line img { flex: none; border-radius: 50%; background: var(--surface); }

/* 🐾 練習モード（おうちの人とつながる前の子ども） */
.practice-note:not([hidden]) { display: flex; background: var(--surface-2); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
.practice-note img { flex: none; border-radius: 50%; background: var(--surface); }
/* 図書館：地図の建物（カフェのとなり、ガレージの右） */
.library-spot {
  position: absolute; left: 57%; top: 74%; z-index: 2; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  background: #f3f7ee; color: #2f4a26; text-decoration: none; font-weight: 800; font-size: clamp(.68rem, 1.7vw, .9rem);
  padding: 4px 12px; border-radius: 4px 4px 2px 2px; border: 2px solid #5e8c4a; box-shadow: 0 2px 0 #5e8c4a;
}
.library-spot:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
/* 図書館の中：館長と司書・「しずかに」の札 */
.library-staff { position: relative; display: grid; gap: 10px; }
.library-staff img, .lib-consent img, .book-end img { flex: none; border-radius: 50%; background: var(--surface-2); }
.library-staff p, .lib-consent p, .lib-consent h2, .book-end p { margin: 0; }
.quiet-sign { position: absolute; top: 10px; right: 12px; font-size: .78rem; font-weight: 800; color: #2f4a26; background: #e6f0de; border: 1px solid #b9d3a8; border-radius: 999px; padding: 1px 10px; }
.lib-filters { display: grid; gap: 4px; margin-bottom: 12px; }
.lib-chips { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 4px; }
.lib-chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: .9rem; font-weight: 700; cursor: pointer; min-height: 40px; }
.lib-chip[aria-pressed="true"] { background: #5e8c4a; color: #fff; border-color: #5e8c4a; }
.lib-consent { border: 2px solid #5e8c4a; }
.lib-consent h2 { font-size: 1rem; }
/* 棚：本の表紙を並べる */
.lib-shelf { list-style: none; margin: 0 0 16px; padding: 12px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  background: linear-gradient(var(--surface-2), var(--surface-2)) bottom / 100% 6px no-repeat; border-radius: 12px; }
.lib-book { display: flex; gap: 12px; align-items: flex-start; padding: 10px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; height: 100%; box-sizing: border-box; }
.lib-book:hover { border-color: #5e8c4a; }
.lib-book:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.book-cover { flex: none; width: 76px; aspect-ratio: 3 / 4; border-radius: 3px 8px 8px 3px; background: var(--cover); color: #fff; display: grid; place-items: center; align-content: center; gap: 4px; padding: 6px; box-sizing: border-box;
  box-shadow: inset 6px 0 0 rgb(0 0 0 / 18%), 0 2px 4px rgb(0 0 0 / 18%); text-align: center; }
.book-cover.big { width: 110px; }
.cover-emoji { font-size: 1.5rem; line-height: 1.1; }
.book-cover.big .cover-emoji { font-size: 2.2rem; }
.cover-title { font-size: .62rem; font-weight: 800; line-height: 1.25; text-shadow: 0 1px 2px rgb(0 0 0 / 35%); }
.book-info { display: grid; gap: 2px; min-width: 0; }
.sample-badge { justify-self: start; margin-top: 4px; font-size: .68rem; font-weight: 800; color: #6f625a; background: #fff6d6; border: 1px solid #e6c96a; border-radius: 999px; padding: 0 8px; }
/* 読むページ */
.reader-bar { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.reader-tools { display: flex; gap: 6px; }
.reader-tools[hidden] { display: none; }
.book-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.book-head h1 { margin: 0 0 4px; font-size: 1.4rem; }
.book-head p { margin: 0 0 4px; }
/* 小説：きれいにまとめる（段落の字下げ・会話・場面の間・ルビ・縦書き） */
.novel-body { background: #fffdf7; color: #2b2420; border: 1px solid var(--border); border-radius: 12px; padding: 20px clamp(16px, 5vw, 48px);
  font-family: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif; font-size: 1.05rem; line-height: 2; margin-bottom: 16px; }
.novel-body.big { font-size: 1.3rem; }
.novel-body h3 { font-size: 1.05em; margin: 1.6em 0 .8em; padding-bottom: .2em; border-bottom: 1px solid #e8dccf; }
.novel-body h3:first-child { margin-top: 0; }
.novel-body p { margin: 0; text-indent: 1em; }
.novel-body p.talk { text-indent: 0; }
.novel-body p.scene { margin-top: 1em; }
.novel-body rt { font-size: .5em; }
.novel-body.vertical { writing-mode: vertical-rl; width: 100%; box-sizing: border-box; height: min(70vh, 34em); overflow-x: auto; overflow-y: hidden; padding: clamp(16px, 4vw, 32px) 20px; }
.novel-body.vertical h3 { margin: 0 0 0 1em; padding: 0 0 0 .2em; border-bottom: 0; border-left: 1px solid #e8dccf; }
.novel-body.vertical h3:not(:first-child) { margin-right: 1.6em; }
.novel-body.vertical p.scene { margin: 0 1em 0 0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .novel-body { background: #2a241e; color: #f4ebe3; } }
:root[data-theme="dark"] .novel-body { background: #2a241e; color: #f4ebe3; }
/* 漫画：4コマを縦に。吹き出し・ナレーション・音の文字 */
.manga-page { display: grid; gap: 8px; max-width: 520px; margin: 0 auto 12px; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 6px; }
.koma { position: relative; min-height: 150px; background: var(--koma); border: 3px solid #1f2433; color: #1f2433; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px; padding: 26px 12px 12px; }
.koma.dark { color: #eef3ff; border-color: #0d1226; }
.koma-cast { display: flex; align-items: flex-end; }
.koma-face { width: 64px; height: 64px; }
.koma-face + .koma-face { margin-left: -14px; }
.koma-face.emoji { display: grid; place-items: center; font-size: 2.6rem; line-height: 1; }
.koma-says { display: grid; gap: 6px; justify-items: start; }
.bubble { position: relative; margin: 0; padding: 8px 12px; background: #fff; color: #1f2433; border: 2px solid #1f2433; border-radius: 18px; font-weight: 700; line-height: 1.5; }
.bubble::before { content: ""; position: absolute; left: -9px; top: 50%; width: 12px; height: 12px; background: #fff; border-left: 2px solid #1f2433; border-bottom: 2px solid #1f2433; transform: translateY(-50%) rotate(45deg); }
.koma-narr { position: absolute; top: 0; left: 0; margin: 0; padding: 2px 10px; font-size: .75rem; font-weight: 800; background: #1f2433; color: #fff; }
.koma-sfx { position: absolute; top: 4px; right: 8px; margin: 0; font-size: 1.05rem; font-weight: 900; font-style: italic; letter-spacing: .05em; color: #c8642a; transform: rotate(-6deg); }
.koma.dark .koma-sfx { color: #ffe14d; }
.manga-nav { display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap; }
.center { text-align: center; }
.book-end { display: grid; gap: 10px; margin-top: 16px; justify-items: start; }
@media (max-width: 600px) { .library-spot { left: 58%; top: 73%; } .koma-face { width: 48px; height: 48px; } .koma-face.emoji { font-size: 2rem; } .book-cover.big { width: 80px; } }
/* 図書館（2段目）：ユーザーの漫画・作家の机・ネズミの案・運営 */
.cover-img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px 6px 6px 2px; }
.book-cover:has(.cover-img) { padding: 0; }
.manga-page.is-image { padding: 0; background: #1f2433; }
.manga-img { display: block; width: 100%; height: auto; }
.row.between { justify-content: space-between; flex-wrap: wrap; margin-top: 0; }
.row.between h2 { margin: 0; }
.lib-mine { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.lib-mine-item { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--border); border-radius: 12px; }
.lib-mine-item .book-cover { width: 44px; }
.lib-mine-item .cover-emoji { font-size: 1.1rem; }
.lib-mine-item .book-info { flex: 1; }
.lib-editor h2 { margin-top: 0; }
.lib-editor fieldset { border: 0; padding: 0; margin: 0 0 8px; }
.lib-editor legend { font-weight: 700; margin-bottom: 4px; }
.lib-two { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.color-input { min-height: 44px; padding: 2px; }
.novel-input { font-family: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; line-height: 1.9; }
.lib-howto { margin: 4px 0 12px; }
.lib-howto summary { cursor: pointer; width: fit-content; }
.tidy-want { margin: 8px 0; font-weight: 700; }
.file-btn { cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; }
.lib-pages { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); padding-left: 0; list-style: none; }
.lib-pages li, .lib-pages > img { display: grid; gap: 4px; align-content: start; }
.lib-pages img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; }
.small-pages { grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }
.page-tools { margin: 0; gap: 4px; }
.btn.small { padding: 4px 10px; font-size: .82rem; min-height: 36px; }
.btn.danger { color: #b3261e; }
.lib-tidy, .lib-help, .lib-publish { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.lib-tidy h3, .lib-publish h3 { margin: 0; }
.lib-tidy img { flex: none; border-radius: 50%; background: var(--surface-2); }
.lib-compare { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin: 8px 0; }
.lib-compare p { margin: 0 0 4px; }
.novel-body.compare { max-height: 320px; overflow: auto; font-size: .92rem; padding: 12px 16px; margin: 0; }
.ruby-pick { align-items: flex-start; margin-top: 4px; }
.ruby-pick ruby { font-weight: 700; font-size: 1.05rem; }
.lib-help summary { cursor: pointer; font-weight: 700; }
.lib-admin { list-style: none; padding: 0; display: grid; gap: 8px; }
.small-input { max-width: 260px; min-height: 36px; }
.back-link-text { text-decoration: none; font-weight: 700; }
.library-page [hidden] { display: none !important; }
/* 図書館（3段目）：挿し絵・表紙の募集の掲示板・本の中の挿し絵 */
.lib-calls { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 12px; }
.lib-call-head { display: flex; gap: 12px; align-items: flex-start; }
.lib-call-head .book-cover { width: 56px; }
.lib-call-head h2 { margin: 0; font-size: 1.1rem; }
.lib-call-head p { margin: 0 0 2px; }
.call-kind { margin: 0 0 4px; font-size: .8rem; font-weight: 800; color: #2f4a26; }
.call-note { margin: 8px 0; padding: 8px 12px; background: var(--surface-2); border-radius: 10px; }
.lib-entries { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.lib-entry { display: grid; gap: 4px; align-content: start; padding: 6px; border: 1px solid var(--border); border-radius: 10px; }
.lib-entry img { width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: var(--surface-2); border-radius: 6px; }
.lib-entry.adopted { border: 2px solid #c9a227; background: #fffbe8; }
.lib-apply { display: grid; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); justify-items: start; }
.lib-art { margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--border); }
.lib-art h3 { margin: 0 0 4px; }
.lib-call-form { margin: 8px 0; }
.mine-calls .lib-call { padding: 12px; }
.novel-body figure.illust { margin: 1.2em 0; text-align: center; }
.novel-body figure.illust img { max-width: 100%; max-height: 70vh; border-radius: 4px; }
.novel-body.vertical figure.illust { margin: 0 1.2em; writing-mode: horizontal-tb; align-self: center; }
.novel-body.vertical figure.illust img { max-height: 60vh; max-width: 40vw; }
.illust-empty { color: #8a7d72; font-size: .85em; text-indent: 0 !important; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lib-entry.adopted { background: #3a321c; } }
:root[data-theme="dark"] .lib-entry.adopted { background: #3a321c; }
/* 🔔 お知らせ（ハトの郵便屋さん） */
.notice-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 40px; min-height: 40px; text-decoration: none; font-size: 1.1rem; border-radius: 999px; }
.notice-bell:hover, .notice-bell[aria-current="page"] { background: var(--surface-2); }
.notice-count { position: absolute; top: 0; right: -2px; min-width: 18px; padding: 0 5px; box-sizing: border-box; font-size: .68rem; font-weight: 800; line-height: 18px; text-align: center; color: #fff; background: var(--like, #e0245e); border-radius: 999px; }
.notice-count[hidden] { display: none; }
.notice-hato img { flex: none; border-radius: 50%; background: var(--surface-2); }
.notice-hato p { margin: 0; }
.notice-tools { margin-bottom: 8px; align-items: center; }
.notice-tools p { margin: 0; }
.notice-list { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.notice-item > a, .notice-item > div { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; }
.notice-item > a:hover { border-color: var(--accent); }
.notice-item > a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.notice-item.unread > a, .notice-item.unread > div { border-left: 5px solid #7a9cc6; background: color-mix(in srgb, #7a9cc6 10%, var(--surface)); }
.notice-icon { flex: none; font-size: 1.4rem; line-height: 1.2; }
.notice-body { display: grid; gap: 2px; }
.notice-new { color: #3b6fb0; }
/* プロフィール */
.profile-head { display: flex; gap: 16px; align-items: center; }
.profile-head h1 { margin: 0 0 4px; font-size: 1.4rem; }
.profile-face { flex: none; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; color: var(--accent-text); background: var(--accent); }
.profile-bio { margin: 0; white-space: pre-wrap; }
.profile-page h2 { margin: 0 0 8px; font-size: 1.05rem; }
.profile-books { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.profile-books .book-cover { width: 44px; }
.profile-books .cover-emoji { font-size: 1.1rem; }
.profile-posts { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.profile-posts a { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; background: var(--surface); }
.profile-posts a:hover { border-color: var(--accent); }
.profile-page [hidden] { display: none !important; }
/* 古い投稿を読む */
.older-row { list-style: none; display: flex; justify-content: center; padding: 4px 0 8px; }
/* 🔍 さがす */
.search-row { margin-top: 4px; }
.search-row .input { flex: 1; min-width: 0; }
.search-page h2 { margin: 0 0 8px; font-size: 1.05rem; }
.search-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.search-list a:not(.small), .search-post { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; color: var(--text); text-decoration: none; background: var(--surface); }
.search-list a:not(.small):hover { border-color: var(--accent); }
.search-post .small { justify-self: end; }
.tag-link { font-weight: 700; text-decoration: none; }
.tag-link:hover { text-decoration: underline; }
.search-page [hidden] { display: none !important; }

/* 💝 応援（新聞社の募金箱）・領収書 */
.donate-box { padding: 14px 16px; margin-bottom: 16px; }
.donate-page [hidden] { display: none !important; }
.account-box { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-family: inherit; margin: 4px 0 8px; }
.quick-amounts { gap: 6px; margin-bottom: 6px; }
.donate-list, .thanks-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.donate-list li { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; }
.thanks-list .say-line img, .donate-page .say-line img { flex: none; border-radius: 50%; background: var(--surface); }
.receipt { max-width: 640px; margin: 16px auto; padding: 28px 32px; border: 2px solid #333; background: #fff; color: #222; }
.receipt h1 { text-align: center; letter-spacing: .3em; margin: 0 0 12px; }
.receipt-no { text-align: right; font-size: .9rem; }
.receipt-to { font-size: 1.2rem; border-bottom: 1px solid #333; padding-bottom: 4px; }
.receipt-name { width: 70%; border: none; background: transparent; font-size: 1.2rem; color: inherit; }
.receipt-amount { font-size: 1.3rem; border: 1px solid #333; padding: 10px 14px; text-align: center; }
.receipt-amount strong { font-size: 1.6rem; letter-spacing: .05em; }
.receipt-issuer { text-align: right; margin-top: 24px; }
.receipt-page [hidden] { display: none !important; }
@media print {
  .no-print { display: none !important; }
  .receipt-page .page { padding: 0; }
  .receipt { border-width: 2px; margin: 0 auto; }
}
