/* 猫の毛玉ブラッシング：ゲーム固有のスタイル（色は変数のみ） */
:root { --accent: #e0673a; --accent-ink: #ffffff; --accent-soft: #fde5d8; --nb-wood: #c88b5a; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --accent: #ff9a6b; --accent-ink: #1d120b; --accent-soft: #3a2419; --nb-wood: #8a5a35; }
}
:root[data-theme="dark"] { --accent: #ff9a6b; --accent-ink: #1d120b; --accent-soft: #3a2419; --nb-wood: #8a5a35; }

.nb-hero-art { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); aspect-ratio: 360 / 220; margin-bottom: 12px; background: var(--surface-2); }
.nb-hero-svg, .nb-hero-img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nb-purr-txt { animation: nb-float 2.4s ease-in-out infinite; }
.nb-fly { animation: nb-float 3s ease-in-out infinite; }
.nb-hero-brush { animation: nb-brush 2.2s ease-in-out infinite; transform-box: fill-box; }
@keyframes nb-float { 0%, 100% { transform: translateY(0); opacity: .9; } 50% { transform: translateY(-6px); opacity: .5; } }
@keyframes nb-brush { 0%, 100% { translate: 0 0; } 50% { translate: 14px 2px; } }
.nb-daily { border: 2px solid var(--accent); margin-top: 6px; }
.nb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 12px 0; }
.nb-two .mn-btn { padding: 10px 8px; font-size: 14px; min-width: 0; line-height: 1.35; }
.nb-note { font-size: 11px; color: var(--text-sub); background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 10px; margin: 16px 0 0; line-height: 1.6; }

/* プレイ */
.nb-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.nb-name { font-size: 22px; }
.nb-ball-box { text-align: right; line-height: 1.2; }
.nb-ball-txt { display: block; font-size: 24px; color: var(--accent); font-variant-numeric: tabular-nums; }
.nb-time { margin-bottom: 8px; }
.nb-stage { position: relative; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--line); box-shadow: var(--shadow); background: var(--nb-wood); }
.nb-canvas { display: block; width: 100%; touch-action: none; cursor: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.nb-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 4px; }
.nb-meter { font-size: 12px; font-weight: 700; color: var(--text-sub); min-width: 0; }
.nb-mbar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin-top: 2px; }
.nb-mbar i { display: block; height: 100%; border-radius: 99px; transition: width .15s; }
.nb-mbar.is-mood i { background: linear-gradient(90deg, #ffb3c2, #ff5f86); }
.nb-mbar.is-pat i { background: var(--good); }
.nb-mbar.is-pat.is-low i { background: var(--bad); }
.nb-msg { min-height: 3.2em; margin: 6px 0 8px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-weight: 700; font-size: 14px; line-height: 1.5; }
.nb-msg.is-good { background: var(--good-soft); color: var(--good); }
.nb-msg.is-warn { background: var(--warn-soft); color: var(--warn); }
.nb-msg.is-bad { background: var(--bad-soft); color: var(--bad); }

/* 結果 */
.nb-main { text-align: center; border: 2px solid var(--accent); }
.nb-main.is-rare { background: linear-gradient(160deg, var(--accent-soft), var(--surface)); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.nb-face { width: min(200px, 56vw); margin: 0 auto 6px; }
.nb-portrait { display: block; width: 100%; height: auto; border-radius: 50%; border: 4px solid var(--accent); }
.nb-ballsvg { display: block; width: 100%; height: auto; animation: nb-bob 2.6s ease-in-out infinite; }
@keyframes nb-bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(2deg); } }
.nb-main .mn-big { font-size: clamp(22px, 6vw, 30px); color: var(--text); }
.nb-num { font-size: clamp(54px, 16vw, 80px); color: var(--accent); margin: 0 4px; font-variant-numeric: tabular-nums; }
.nb-sub { font-weight: 700; margin: 2px 0 0; }
.nb-type { font-size: 22px; margin-top: 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.nb-row { font-size: 24px; letter-spacing: 2px; margin-top: 8px; }
.nb-rank { margin: 10px 0 4px; }
.nb-rank b { color: var(--accent); font-size: 18px; }
.nb-share { margin-top: 10px; }
.nb-drow { display: grid; grid-template-columns: 5.6em 1fr auto; gap: 8px; align-items: center; font-size: 13px; margin-top: 6px; }
.nb-dbar { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.nb-dbar i { display: block; height: 100%; background: var(--text-sub); }
.nb-drow.is-me .nb-dbar i { background: var(--accent); }
.nb-drow.is-me span, .nb-drow.is-me b { color: var(--accent); font-weight: 800; }
.nb-facts p { margin: 6px 0 0; }

/* 図鑑 */
.nb-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.nb-cell { background: var(--surface-2); border-radius: var(--radius-sm); padding: 8px 6px; text-align: center; font-size: 12px; line-height: 1.35; display: flex; flex-direction: column; align-items: center; gap: 3px; opacity: .6; }
.nb-cell.on { opacity: 1; background: var(--surface); border: 1px solid var(--line); }
.nb-swatch { width: 34px; height: 34px; border-radius: 50%; background: var(--line); border: 2px solid var(--line); }
.nb-emo { font-size: 24px; }

@media (prefers-reduced-motion: reduce) {
  .nb-purr-txt, .nb-fly, .nb-hero-brush, .nb-ballsvg { animation: none !important; }
}
.ai-note { margin: 4px 0 8px; text-align: right; }
.ai-note-c { text-align: center; margin: -2px 0 6px; }
