/* TORA TORA platform — ポップ＆カラフル（異世界転生 × ゲーム）
   白地にカラーの帯（空・ライム・おひさま・コーラル・グレープ）、ドットとストライプの柄、
   濃紺の丸ゴシック、ぷっくりした押せるボタン。主役の色はトラのオレンジ。 */
:root {
  --orange: #FF8A1F; --orange-d: #E86F00; --orange-soft: #FFF1E2;
  --sky: #2EB5F0; --sky-soft: #E3F6FF;
  --lime: #6CD34B; --lime-soft: #EAFBE3;
  --sun: #FFCF33; --sun-soft: #FFF8DC;
  --coral: #FF6B6B; --coral-soft: #FFECEC;
  --grape: #8C6CFF; --grape-soft: #F0EBFF;
  --pink: #FF79B0; --pink-soft: #FFEAF3;
  --ink: #12325A; --ink-2: #3D5577; --ink-3: #7C8CA6;
  --bg: #F3F8FF; --panel: #FFFFFF; --line: #DCE6F3; --line-2: #EDF2FA;
  --ok: #24B26B; --ng: #F0454E; --info: #2E86F0;
  --amber: var(--orange); --amber-soft: var(--orange-soft); /* 旧名との互換 */
  --plus: #1F9D55; --minus: #E5484D; --hl: var(--orange-d);
  --r: 18px; --r-sm: 12px;
  --pop: 0 4px 0 var(--ink); --pop-sm: 0 3px 0 var(--ink);
  --soft-shadow: 0 2px 0 var(--line), 0 10px 24px rgba(18, 50, 90, .06);
  --font: "Hiragino Maru Gothic ProN", "M PLUS Rounded 1c", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --display: "Avenir Next", "Futura", "Hiragino Maru Gothic ProN", var(--font);
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --dots: radial-gradient(rgba(255,255,255,.45) 2.2px, transparent 2.8px) 0 0 / 18px 18px;
  --stripes: repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 12px, transparent 12px 24px);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); font-size: 14px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: var(--orange-d); text-decoration: none; font-weight: 700; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 900; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ── ボタン（ぷっくり・押すと沈む） */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 2px solid var(--ink); background: #fff; color: var(--ink);
  padding: 7px 16px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 13px; white-space: nowrap; box-shadow: var(--pop-sm);
  transition: transform .08s, box-shadow .08s, background .15s; }
.btn:hover { background: var(--sun-soft); }
.btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--ink); }
.btn.primary { background: var(--orange); color: #fff; }
.btn.primary:hover { background: var(--orange-d); }
.btn.dark { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ok { background: var(--lime); color: #fff; }
.btn.ng { color: var(--ng); }
.btn.sm { padding: 3px 11px; font-size: 12px; }
.btn.block { width: 100%; padding: 11px; font-size: 15px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-size: 12px; font-weight: 800; color: var(--ink-2); margin-bottom: 4px; }
.in { width: 100%; padding: 10px 12px; border: 2px solid var(--line); border-radius: var(--r-sm); background: #fff; outline: none; color: var(--ink); }
.in:focus { border-color: var(--sky); box-shadow: 0 0 0 4px rgba(46,181,240,.18); }
select.in { appearance: auto; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 900px) { .g3, .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* ── バッジ */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag.amber { background: var(--orange-soft); color: var(--orange-d); }
.tag.ok { background: var(--lime-soft); color: #1F8A3B; }
.tag.ng { background: var(--coral-soft); color: #C62C35; }
.tag.info { background: var(--sky-soft); color: #1477B3; }
.tag.dark { background: var(--ink); color: #fff; }
.r-common { background: var(--sky-soft); color: #1477B3; }
.r-rare { background: var(--lime-soft); color: #1F8A3B; }
.r-epic { background: var(--grape-soft); color: #5B3BD6; }
.r-legend { background: linear-gradient(90deg, #FFE36B, #FF9F43, #FF79B0); color: #fff; text-shadow: 0 1px 0 rgba(0,0,0,.18); }

/* ── トースト・モーダル */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; font-weight: 800; box-shadow: 0 6px 20px rgba(18,50,90,.25); animation: pop .3s cubic-bezier(.3,1.6,.5,1); max-width: 90vw; }
.toast.ng { background: var(--ng); }
.toast.gain { background: linear-gradient(90deg, var(--orange), var(--pink)); border: 2px solid #fff; }
@keyframes pop { from { transform: translateY(10px) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-bg { position: fixed; inset: 0; background: rgba(18,50,90,.35); z-index: 900; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: #fff; border: 3px solid var(--ink); border-radius: 22px; width: min(560px, 100%); max-height: 90vh; overflow: auto; padding: 22px; box-shadow: 0 8px 0 var(--ink); animation: pop .25s ease; }
.modal h3 { margin-bottom: 14px; font-size: 19px; }

/* ── 入口（画面を選ぶ） */
.gate { min-height: 100vh; padding: 0 0 48px; background: var(--bg); position: relative; overflow: hidden; }
.gate::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 340px; background: var(--dots), linear-gradient(120deg, var(--sky), #5CC8FF 55%, var(--grape)); clip-path: polygon(0 0, 100% 0, 100% 78%, 0 100%); }
.gate::after { content: "✦　✧　✦　　✧　✦"; position: absolute; top: 40px; right: 6%; color: rgba(255,255,255,.8); font-size: 26px; letter-spacing: .3em; pointer-events: none; }
.gate-inner { position: relative; max-width: 1080px; margin: 0 auto; padding: 48px 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 46px; height: 46px; border-radius: 14px; background: var(--stripes), var(--orange); display: grid; place-items: center; font-family: var(--display); font-weight: 900; color: #fff; font-size: 18px; letter-spacing: -1px;
  border: 3px solid #fff; box-shadow: 0 4px 0 var(--ink); }
.gate h1 { font-family: var(--display); font-size: 52px; letter-spacing: .04em; color: #fff; text-shadow: 0 4px 0 var(--ink); }
.gate .lead { color: #fff; margin: 10px 0 40px; font-size: 16px; font-weight: 800; text-shadow: 0 2px 0 rgba(18,50,90,.35); }
.consoles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .consoles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .consoles { grid-template-columns: 1fr; } .gate h1 { font-size: 38px; } }
.console-card { --c: var(--sky); position: relative; background: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 0 0 16px; cursor: pointer; text-align: left; color: var(--ink);
  box-shadow: 0 6px 0 var(--ink); overflow: hidden; transition: transform .12s, box-shadow .12s; }
.console-card:hover { transform: translateY(-3px) rotate(-.4deg); box-shadow: 0 9px 0 var(--ink); }
.console-card:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.console-card:nth-child(1) { --c: var(--orange); } .console-card:nth-child(2) { --c: var(--lime); } .console-card:nth-child(3) { --c: var(--coral); }
.console-card:nth-child(4) { --c: var(--sky); } .console-card:nth-child(5) { --c: var(--pink); } .console-card:nth-child(6) { --c: var(--grape); }
.console-card .ic { height: 82px; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; font-size: 40px; background: var(--dots), var(--c); border-bottom: 3px solid var(--ink); }
.console-card .no { font-family: var(--display); font-weight: 900; font-size: 30px; color: #fff; text-shadow: 0 3px 0 var(--ink); }
.console-card h3 { font-size: 16px; margin: 12px 16px 4px; }
.console-card p { margin: 0 16px; color: var(--ink-2); font-size: 12px; }
.gate .koyomi-link { margin-top: 24px; }
.gate .gate-note { color: var(--ink-3); margin-top: 22px; font-weight: 700; }
.login-box { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 24px; padding: 26px; max-width: 440px; margin: 0 auto; box-shadow: 0 8px 0 var(--ink); }
.demo-list { display: grid; gap: 6px; margin-top: 14px; }
.demo-list button { text-align: left; border: 2px dashed var(--line); background: var(--bg); border-radius: 12px; padding: 6px 10px; cursor: pointer; font-size: 12px; font-weight: 700; }
.demo-list button:hover { border-color: var(--sky); }
.back-link { color: #fff; text-shadow: 0 1px 0 rgba(18,50,90,.4); }

/* ── 管理画面 */
.admin { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 3px solid var(--ink); padding: 18px 12px; position: sticky; top: 0; height: 100vh; overflow: auto; }
.side .brand { padding: 0 6px 16px; border-bottom: 2px dashed var(--line); margin-bottom: 12px; }
.side .brand .logo { width: 38px; height: 38px; font-size: 14px; border-radius: 11px; box-shadow: 0 3px 0 var(--ink); border-width: 2px; }
.side .brand b { display: block; font-size: 15px; font-family: var(--display); letter-spacing: .03em; } .side .brand small { color: var(--ink-3); font-size: 11px; font-weight: 700; }
.side nav a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: var(--ink-2); border-radius: 999px; font-weight: 800; font-size: 13px; border: 2px solid transparent; margin-bottom: 2px; }
.side nav a:hover { background: var(--sky-soft); color: var(--ink); }
.side nav a.on { background: var(--orange); color: #fff; border-color: var(--ink); box-shadow: 0 3px 0 var(--ink); }
.side nav a .cnt { margin-left: auto; background: var(--coral); color: #fff; border-radius: 999px; font-size: 10px; padding: 0 7px; border: 2px solid #fff; }
.side .who { margin-top: 18px; padding: 12px 10px; border-top: 2px dashed var(--line); font-size: 12px; color: var(--ink-3); font-weight: 700; }
.side .who a { color: var(--ink-3) !important; }
.main { padding: 0 28px 60px; min-width: 0; background: var(--bg); }
.topbar { display: flex; align-items: center; gap: 12px; margin: 0 -28px 20px; padding: 18px 28px; flex-wrap: wrap; background: var(--dots), linear-gradient(110deg, var(--sky), #64CDFF); border-bottom: 3px solid var(--ink); }
.topbar h2 { font-size: 24px; color: #fff; text-shadow: 0 3px 0 var(--ink); }
.topbar .sel { margin-left: auto; }
.topbar .in { border-color: var(--ink); }
@media (max-width: 860px) {
  .admin { grid-template-columns: 1fr; }
  .side { position: static; height: auto; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; padding: 10px; border-right: 0; border-bottom: 3px solid var(--ink); }
  .side .brand { border: 0; margin: 0; padding: 0 8px 0 0; } .side nav { display: flex; flex-wrap: wrap; gap: 2px; } .side .who { display: none; }
  .main { padding: 0 16px 40px; } .topbar { margin: 0 -16px 16px; padding: 14px 16px; }
}
.card { background: var(--panel); border: 2px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--soft-shadow); min-width: 0; }
.card h3 { font-size: 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.card h3::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--orange); transform: rotate(45deg); flex: none; }
.card + .card { margin-top: 12px; }
.kpi { --c: var(--sky); background: #fff; border: 2px solid var(--line); border-radius: var(--r); padding: 14px 16px 14px 20px; position: relative; overflow: hidden; box-shadow: var(--soft-shadow); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--c); }
.grid > .kpi:nth-child(4n+1) { --c: var(--orange); } .grid > .kpi:nth-child(4n+2) { --c: var(--sky); } .grid > .kpi:nth-child(4n+3) { --c: var(--lime); } .grid > .kpi:nth-child(4n+4) { --c: var(--grape); }
.kpi .l { font-size: 12px; color: var(--ink-3); font-weight: 800; }
.kpi .v { font-family: var(--display); font-size: 28px; font-weight: 900; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.kpi .s { font-size: 12px; color: var(--ink-3); }
.section { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11px; color: var(--ink-3); font-weight: 800; padding: 8px 10px; border-bottom: 2px solid var(--line); white-space: nowrap; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:hover td { background: var(--sky-soft); }
table.t td.r, table.t th.r { text-align: right; }
.empty { padding: 28px; text-align: center; color: var(--ink-3); font-weight: 700; }
.bar { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--stripes), var(--orange); border-radius: 999px; }
.hbars { display: grid; gap: 7px; }
.hbars .hb { display: grid; grid-template-columns: minmax(0, 8em) minmax(40px, 1fr) auto; gap: 8px; align-items: center; font-size: 12px; font-weight: 700; }
.hbars .hb:nth-child(5n+2) .bar > i { background: var(--stripes), var(--sky); } .hbars .hb:nth-child(5n+3) .bar > i { background: var(--stripes), var(--lime); }
.hbars .hb:nth-child(5n+4) .bar > i { background: var(--stripes), var(--grape); } .hbars .hb:nth-child(5n+5) .bar > i { background: var(--stripes), var(--pink); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 80px; }
.spark i { flex: 1; background: linear-gradient(var(--sky), var(--grape)); border-radius: 6px 6px 2px 2px; min-height: 3px; }
.note { background: var(--sun-soft); border: 2px solid var(--sun); border-radius: var(--r-sm); padding: 10px 14px; font-size: 12px; color: var(--ink-2); font-weight: 700; }
.pill-tabs { display: inline-flex; gap: 4px; background: var(--line-2); padding: 3px; border-radius: 999px; }
.pill-tabs button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; cursor: pointer; font-weight: 800; font-size: 12px; color: var(--ink-2); }
.pill-tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--pop-sm); }

/* ── チャット */
.chat { display: grid; grid-template-columns: 200px 1fr; height: calc(100vh - 170px); min-height: 420px; border: 2px solid var(--line); border-radius: var(--r); overflow: hidden; background: #fff; box-shadow: var(--soft-shadow); }
.chat.with-thread { grid-template-columns: 200px 1fr 320px; }
.ch-list { background: var(--bg); border-right: 2px solid var(--line); padding: 10px; overflow: auto; }
.ch-list a { display: block; padding: 7px 12px; border-radius: 999px; color: var(--ink-2); font-weight: 800; }
.ch-list a.on { background: var(--sky); color: #fff; }
.msgs { display: flex; flex-direction: column; min-width: 0; }
.msgs .scroll { flex: 1; overflow: auto; padding: 12px 16px; }
.msg { display: grid; grid-template-columns: 36px 1fr; gap: 10px; padding: 6px 0; }
.msg .av { width: 36px; height: 36px; border-radius: 50%; background: var(--orange); border: 2px solid var(--ink); display: grid; place-items: center; font-weight: 900; color: #fff; font-size: 14px; }
.msg .meta { font-size: 12px; color: var(--ink-3); } .msg .meta b { color: var(--ink); margin-right: 6px; }
.msg .body { white-space: pre-wrap; word-break: break-word; }
.msg .acts { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.msg .acts button { border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; cursor: pointer; font-weight: 700; }
.msg .acts button.mine { border-color: var(--orange); background: var(--orange-soft); }
.msg.pinned { background: var(--sun-soft); border-radius: 12px; padding: 6px; }
.task-chip { display: inline-flex; gap: 6px; align-items: center; background: var(--sky-soft); border: 2px solid #BFE6FA; color: #1477B3; padding: 2px 8px; border-radius: 8px; font-size: 12px; margin-top: 4px; font-weight: 700; }
.composer { border-top: 2px solid var(--line); padding: 10px; display: flex; gap: 8px; }
.composer textarea { flex: 1; resize: none; height: 44px; }
.thread { border-left: 2px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
@media (max-width: 860px) { .chat, .chat.with-thread { grid-template-columns: 1fr; height: auto; } .ch-list { display: flex; gap: 4px; overflow-x: auto; } .thread { border-left: 0; border-top: 2px solid var(--line); } .msgs .scroll { max-height: 55vh; } }

/* ── ユーザーアプリ（スマホ。PCでは端末の枠で表示） */
.phone-stage { min-height: 100vh; display: flex; justify-content: center; align-items: flex-start; padding: 24px 16px; gap: 28px;
  background: var(--dots), linear-gradient(135deg, var(--sky) 0%, #7AD6FF 40%, var(--pink) 100%); }
.phone-side { color: #fff; max-width: 300px; padding-top: 40px; font-size: 13px; font-weight: 700; text-shadow: 0 2px 0 rgba(18,50,90,.3); }
.phone-side h2 { font-family: var(--display); font-size: 28px; margin-bottom: 8px; text-shadow: 0 3px 0 var(--ink); }
@media (max-width: 900px) { .phone-side { display: none; } .phone-stage { padding: 0; } }
.phone { width: 390px; max-width: 100%; height: min(844px, calc(100vh - 48px)); background: var(--bg); color: var(--ink); border-radius: 46px; border: 10px solid var(--ink);
  box-shadow: 0 10px 0 rgba(18,50,90,.35), 0 30px 60px rgba(18,50,90,.3); overflow: hidden; display: flex; flex-direction: column; position: relative; }
@media (max-width: 480px) { .phone { border-radius: 0; border: 0; height: 100vh; width: 100%; } }
.ph-top { display: flex; align-items: center; gap: 10px; padding: 16px 18px 10px; background: #fff; border-bottom: 2px solid var(--line); }
.ph-top .logo { width: 32px; height: 32px; font-size: 12px; border-radius: 10px; border-width: 2px; box-shadow: 0 2px 0 var(--ink); }
.ph-top b { font-size: 16px; font-family: var(--display); letter-spacing: .04em; }
.ph-top .bell { margin-left: auto; position: relative; background: var(--sun); border: 2px solid var(--ink); border-radius: 50%; width: 36px; height: 36px; font-size: 17px; cursor: pointer; box-shadow: 0 2px 0 var(--ink); }
.ph-top .bell i { position: absolute; top: -6px; right: -8px; background: var(--coral); color: #fff; font-style: normal; font-size: 10px; font-weight: 900; border-radius: 999px; padding: 0 5px; border: 2px solid #fff; }
.ph-body { flex: 1; overflow: auto; padding: 10px 14px 20px; }
.ph-nav { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 2px solid var(--line); background: #fff; padding: 6px 4px 12px; }
.ph-nav a { display: flex; flex-direction: column; align-items: center; gap: 1px; color: var(--ink-3); font-size: 9.5px; font-weight: 800; padding: 4px 0; border-radius: 14px; }
.ph-nav a span { font-size: 19px; transition: transform .15s; } .ph-nav a.on { color: var(--orange-d); background: var(--orange-soft); } .ph-nav a.on span { transform: translateY(-2px) scale(1.12); }
.ph-body h3 { font-size: 15px; margin: 18px 0 8px; display: flex; align-items: center; gap: 6px; }
.ph-body h3::before { content: "✦"; color: var(--orange); }
.dcard { background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 14px; box-shadow: 0 3px 0 var(--line); }
.dcard + .dcard { margin-top: 10px; }

/* ステータスカード（ゲームのキャラカード） */
.scard { position: relative; overflow: hidden; color: #fff; border: 3px solid var(--ink); border-radius: 24px; padding: 18px; box-shadow: 0 6px 0 var(--ink);
  background: var(--stripes), radial-gradient(120% 90% at 100% 0%, #FFD45A 0%, transparent 55%), linear-gradient(140deg, var(--orange) 0%, #FF5E8A 60%, var(--grape) 100%); }
.scard::after { content: "✦"; position: absolute; right: 18px; bottom: 6px; font-size: 64px; color: rgba(255,255,255,.22); pointer-events: none; }
.scard .name { font-size: 22px; font-weight: 900; text-shadow: 0 2px 0 rgba(18,50,90,.45); } .scard .handle { font-size: 11px; opacity: .9; font-weight: 700; }
.scard .lv { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.scard .lv b { font-family: var(--display); font-size: 52px; font-weight: 900; color: #fff; line-height: 1; letter-spacing: -.02em; text-shadow: 0 4px 0 var(--ink); }
.scard .lv span { font-size: 14px; font-weight: 900; background: #fff; color: var(--ink); border-radius: 999px; padding: 1px 10px; border: 2px solid var(--ink); }
.scard .bar { background: rgba(255,255,255,.35); border: 2px solid var(--ink); height: 12px; } .scard .bar > i { background: var(--stripes), var(--sun) !important; }
.scard .muted { color: rgba(255,255,255,.92); }
.scard .attr { position: absolute; right: 14px; top: 14px; text-align: center; z-index: 1; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 16px; padding: 6px 10px; box-shadow: 0 3px 0 var(--ink); }
.scard .attr .big { font-size: 26px; line-height: 1.1; } .scard .attr .muted { color: var(--ink-3); }
.scard .stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.scard .stats div { background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 14px; padding: 6px 2px; text-align: center; }
.scard .stats b { display: block; font-family: var(--display); font-size: 18px; } .scard .stats small { font-size: 10px; color: var(--ink-3); font-weight: 800; }
.scard .hid { color: rgba(255,255,255,.9); font-size: 12px; font-weight: 700; }
.scard .tag { border: 2px solid var(--ink); }
.bal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.bal { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 2px 0 var(--line); }
.bal .h { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: var(--ink-2); font-weight: 800; }
.bal .h b { color: var(--ink); font-family: var(--display); font-size: 17px; }
.bal .bar { height: 7px; margin-top: 6px; }
.title-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 2px dashed var(--line-2); }
.title-row:last-child { border-bottom: 0; }
.title-row .ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--sun-soft); border: 2px solid var(--sun); font-size: 17px; flex-shrink: 0; }
.big-qr { width: 180px; height: 180px; margin: 10px auto; border-radius: 18px; background: repeating-conic-gradient(var(--ink) 0 25%, #fff 0 50%) 0 0/24px 24px; border: 10px solid #fff; outline: 3px solid var(--ink); }
.pulse { width: 78px; height: 78px; border-radius: 50%; background: var(--orange); border: 3px solid var(--ink); margin: 16px auto; display: grid; place-items: center; font-size: 34px; animation: pulse 1.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,138,31,.6); } 70% { box-shadow: 0 0 0 24px rgba(255,138,31,0); } 100% { box-shadow: 0 0 0 0 rgba(255,138,31,0); } }
.seg { display: flex; gap: 5px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; } .seg::-webkit-scrollbar { display: none; }
.seg button { border: 2px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 999px; padding: 5px 13px; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.seg button.on { background: var(--sky); border-color: var(--ink); color: #fff; box-shadow: 0 2px 0 var(--ink); }
.onb { text-align: center; padding-top: 20px; }
.onb .big { font-size: 64px; }
.ph-body .chat { height: 60vh; grid-template-columns: 1fr; }
.ph-body .ch-list { display: flex; gap: 4px; overflow-x: auto; }
.ph-body .ch-list a { white-space: nowrap; }

/* ── 四季学（shiki.js）。季節の色は --c で受け取る */
.sk-chip { display: inline-block; color: #fff; font-size: 11px; font-weight: 900; padding: 3px 11px; border-radius: 999px; letter-spacing: .05em; border: 2px solid var(--ink); }
.sk-type { background: var(--dots), linear-gradient(150deg, var(--c), color-mix(in srgb, var(--c) 55%, #fff)); border: 3px solid var(--ink); border-radius: 22px; padding: 16px; color: #fff; box-shadow: 0 5px 0 var(--ink); }
.sk-type-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sk-num { font-size: 12px; font-weight: 800; } .sk-num b { font-size: 20px; font-family: var(--display); }
.sk-master { background: var(--sun); color: var(--ink); font-size: 10px; font-weight: 900; padding: 1px 7px; border-radius: 999px; margin-left: 4px; border: 2px solid var(--ink); }
.sk-type-main { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.sk-avatar { width: 66px; height: 66px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 34px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
.sk-avatar.sm { width: 46px; height: 46px; font-size: 24px; }
.sk-job { font-size: 28px; font-weight: 900; letter-spacing: .04em; line-height: 1.2; text-shadow: 0 3px 0 var(--ink); }
.sk-catch { font-size: 13px; font-weight: 700; margin-top: 2px; }
.sk-keys { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.sk-keys span { font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; background: #fff; color: var(--ink); border: 2px solid var(--ink); }
.sk-steps { margin-top: 10px; font-size: 11px; font-family: var(--mono); opacity: .95; }
.sk-detail { margin-top: 10px; display: grid; gap: 10px; }
.sk-detail b { font-size: 12px; color: var(--orange-d); } .sk-detail p { font-size: 13px; line-height: 1.75; margin-top: 2px; }
.sk-today { background: var(--stripes), linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #fff)); color: #fff; border: 3px solid var(--ink); border-radius: 20px; padding: 14px 16px; box-shadow: 0 4px 0 var(--ink); }
.sk-today-main { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.sk-today-t { font-size: 22px; font-weight: 900; letter-spacing: .03em; text-shadow: 0 2px 0 var(--ink); }
.sk-rel { margin-top: 10px; background: #fff; color: var(--ink); border: 2px solid var(--ink); border-radius: 12px; padding: 8px 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; font-size: 12px; font-weight: 700; }
.sk-rel b { font-size: 15px; color: var(--orange-d); }
.sk-homelink { display: block; margin-top: 10px; color: inherit; }
.sk-guard { display: flex; gap: 12px; align-items: center; }
.sk-guard-svg { width: 178px; flex: none; } .sk-compass { width: 100%; height: auto; display: block; }
.sk-big { font-size: 26px; font-weight: 900; color: var(--ink); } .sk-big span { font-size: 16px; color: var(--ink-2); }
.sk-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); margin-right: 5px; vertical-align: middle; border: 2px solid var(--ink); }
.sk-ring { width: 100%; max-width: 300px; height: auto; display: block; margin: 0 auto; }
.sk-stage { margin-top: 6px; font-size: 13px; line-height: 1.7; padding: 8px 12px; border-radius: 12px; background: color-mix(in srgb, var(--c) 16%, #fff); border: 2px solid color-mix(in srgb, var(--c) 45%, #fff); }
.sk-stage b { color: var(--ink); }
.sk-warn { margin-top: 8px; background: var(--coral-soft); border-color: var(--coral); color: #B4232C; }
.sk-bar4 { margin-top: 12px; } .sk-bar4-h { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; margin-bottom: 4px; }
.sk-bar4-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.sk-bar4-row div { text-align: center; font-size: 12px; font-weight: 800; padding: 6px 0; border-radius: 10px; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--ink-3); }
.sk-bar4-row div.on { background: var(--c); color: #fff; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.sk-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.sk-cal-w { text-align: center; font-size: 10px; color: var(--ink-3); font-weight: 800; padding-bottom: 2px; }
.sk-cal-d { position: relative; background: color-mix(in srgb, var(--c) 14%, #fff); border-radius: 10px; padding: 3px 0 4px; text-align: center; border-bottom: 4px solid var(--c); min-height: 52px; }
.sk-cal-d .dd { position: absolute; left: 5px; top: 2px; font-size: 9px; color: var(--ink-3); font-weight: 800; }
.sk-cal-d .em { display: block; font-size: 15px; margin-top: 10px; line-height: 1; }
.sk-cal-d .nn { display: block; font-size: 11px; font-weight: 900; color: var(--ink); margin-top: 2px; }
.sk-cal-d.today { outline: 3px solid var(--orange); outline-offset: 1px; }
.sk-public .sk-public-in { width: 440px; max-width: 100%; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 26px; padding: 20px; box-shadow: 0 8px 0 var(--ink); }
.sk-public .in { background: #fff; }
.sk-public-h { font-family: var(--display); font-size: 26px; font-weight: 900; margin: 4px 0; }
.sk-public-h3 { font-size: 16px; margin: 20px 0 8px; }
.sk-year { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 8px; }
.sk-year > div { background: color-mix(in srgb, var(--c) 14%, #fff); border-top: 4px solid var(--c); border-radius: 10px; padding: 6px 4px; display: flex; flex-direction: column; gap: 3px; }
.sk-year b { font-size: 11px; text-align: center; }
.sk-year span { font-size: 11px; color: var(--ink-2); display: flex; justify-content: space-between; gap: 2px; }
.sk-year span i { font-style: normal; color: var(--ink-3); font-size: 9px; white-space: nowrap; }

/* ── モバイルオーダー */
.mo-head { display: flex; justify-content: space-between; align-items: center; }
.mo-again { width: 100%; text-align: left; margin-top: 10px; background: var(--sun-soft); border: 2px solid var(--sun); color: var(--ink); border-radius: 14px; padding: 10px 12px; font-weight: 900; cursor: pointer; }
.mo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.mo-item { position: relative; background: #fff; border: 2px solid var(--line); border-radius: 18px; padding: 12px 10px; text-align: left; color: var(--ink); cursor: pointer; box-shadow: 0 3px 0 var(--line); transition: transform .1s; }
.mo-item:hover { border-color: var(--ink); box-shadow: 0 4px 0 var(--ink); transform: translateY(-2px); }
.mo-item.soldout { opacity: .45; cursor: not-allowed; transform: none; }
.mo-emoji { font-size: 36px; line-height: 1.1; } .mo-emoji.big { font-size: 60px; text-align: center; }
.mo-name { font-weight: 900; margin-top: 6px; font-size: 13px; } .mo-price { color: var(--orange-d); font-weight: 900; font-family: var(--display); }
.mo-badge { position: absolute; top: 8px; right: 8px; background: var(--coral); color: #fff; font-size: 10px; font-weight: 900; border-radius: 999px; padding: 0 8px; border: 2px solid var(--ink); }
.mo-badge.gray { background: var(--ink-3); }
.mo-cartbar { position: absolute; left: 14px; right: 14px; bottom: 76px; display: flex; justify-content: space-between; align-items: center; background: var(--orange); color: #fff; border: 3px solid var(--ink); border-radius: 18px; padding: 13px 16px; font-weight: 900; font-size: 14px; cursor: pointer; box-shadow: 0 5px 0 var(--ink); z-index: 5; }
.mo-sheet-bg { position: absolute; inset: 0; background: rgba(18,50,90,.35); z-index: 20; display: flex; align-items: flex-end; }
.mo-sheet { background: #fff; width: 100%; max-height: 85%; overflow: auto; border-radius: 26px 26px 0 0; border-top: 3px solid var(--ink); padding: 18px; color: var(--ink); animation: up .22s ease; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.mo-opt { margin-top: 12px; }
.mo-choice { border: 2px solid var(--line); background: #fff; color: var(--ink-2); border-radius: 12px; padding: 7px 12px; font-weight: 800; cursor: pointer; font-size: 12px; }
.mo-choice.on { background: var(--sky); border-color: var(--ink); color: #fff; box-shadow: 0 2px 0 var(--ink); }
.mo-no { font-family: var(--display); font-size: 70px; font-weight: 900; letter-spacing: .04em; color: var(--ink); line-height: 1.1; }
.mo-no.ready { color: #fff; background: var(--orange); border: 3px solid var(--ink); box-shadow: 0 5px 0 var(--ink); animation: pulse 1.4s infinite; border-radius: 18px; display: inline-block; padding: 0 18px; }
.mo-steps { display: grid; grid-template-columns: repeat(4, 1fr); margin: 14px 0 4px; }
.mo-steps div { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-3); font-weight: 800; }
.mo-steps i { width: 16px; height: 16px; border-radius: 50%; background: var(--line); border: 2px solid #fff; }
.mo-steps .on { color: var(--orange-d); } .mo-steps .on i { background: var(--orange); border-color: var(--ink); }
/* キッチン画面（店舗） */
.kds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.kds-col { border-radius: 20px; padding: 10px; min-height: 300px; border: 2px solid var(--line); }
.kds-col:nth-child(1) { background: var(--sky-soft); } .kds-col:nth-child(2) { background: var(--sun-soft); } .kds-col:nth-child(3) { background: var(--lime-soft); }
.kds-col h3 { font-size: 15px; margin: 2px 4px 8px; }
.kds-card { background: #fff; border: 2px solid var(--ink); border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 3px 0 var(--ink); }
.kds-card .no { font-family: var(--display); font-size: 30px; font-weight: 900; }
.kds-card.late { border-color: var(--ng); box-shadow: 0 3px 0 var(--ng); }
@media (max-width: 860px) { .kds { grid-template-columns: 1fr; } }
/* 作品 */
.reader { white-space: pre-wrap; line-height: 2; font-size: 15px; max-height: 65vh; overflow: auto; }
.manga { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; max-height: 65vh; overflow: auto; }
.manga .panel { border: 3px solid var(--ink); border-radius: 8px; padding: 8px; background: #fff; }
.manga .scene { font-size: 12px; color: var(--ink-3); margin: 4px 0; }
.manga .bubble { background: var(--sky-soft); border-radius: 14px; padding: 4px 10px; margin-top: 4px; font-size: 13px; }

/* ── ストア・紹介 */
.st-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.st-card { --c: var(--sky); display: flex; flex-direction: column; background: #fff; border: 2px solid var(--line); border-top: 6px solid var(--c); border-radius: 18px; padding: 10px; box-shadow: 0 3px 0 var(--line); min-height: 176px; }
.st-top { display: flex; justify-content: space-between; align-items: flex-start; }
.st-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 26px; background: color-mix(in srgb, var(--c) 18%, #fff); border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); }
.st-ic.big { width: 64px; height: 64px; font-size: 36px; flex: none; }
.st-name { display: block; margin-top: 6px; font-size: 13px; }
.st-desc { color: var(--ink-2); margin-top: 2px; line-height: 1.5; }
.conn-code { font-family: var(--display); font-size: 34px; font-weight: 900; letter-spacing: .12em; text-align: center; background: var(--sun-soft); border: 3px dashed var(--sun); border-radius: 16px; padding: 10px; margin: 10px 0; }
.share-url { background: var(--bg); border: 2px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 12px; word-break: break-all; }
.chain { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 6px; }
.chain div { text-align: center; background: var(--sky-soft); border: 2px solid var(--sky); border-radius: 16px; padding: 8px 16px; }
.chain div:last-child { background: var(--grape-soft); border-color: var(--grape); }
.chain b { display: block; font-family: var(--display); font-size: 26px; } .chain small { font-size: 11px; font-weight: 800; color: var(--ink-2); }
.chain span { font-size: 22px; color: var(--ink-3); }
.share-box { max-width: 460px; }
.share-app { display: flex; gap: 12px; align-items: center; background: var(--bg); border-radius: 16px; padding: 12px; margin: 8px 0; }

/* ── 記録ミニアプリ */
.mini-head { --c: var(--sky); display: flex; gap: 12px; align-items: center; background: var(--dots), linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 45%, #fff)); color: #fff; border: 3px solid var(--ink); border-radius: 22px; padding: 14px; box-shadow: 0 5px 0 var(--ink); text-shadow: 0 2px 0 rgba(18,50,90,.35); }
.mini-head .st-ic { text-shadow: none; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 7px; margin-top: 12px; }
.mini-stats div { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px; text-align: center; box-shadow: 0 2px 0 var(--line); }
.mini-stats b { display: block; font-family: var(--display); font-size: 22px; } .mini-stats small { font-size: 10px; color: var(--ink-3); font-weight: 800; }
.mini-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; height: 70px; align-items: end; margin-top: 10px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 8px 8px 4px; }
.mini-week div { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.mini-week i { width: 70%; min-height: 3px; background: var(--stripes), var(--orange); border-radius: 6px 6px 2px 2px; }
.mini-week span { font-size: 9px; color: var(--ink-3); font-weight: 800; }
.mini-chips, .mini-stars { display: flex; flex-wrap: wrap; gap: 5px; }
.mini-chips input, .mini-stars input { position: absolute; opacity: 0; pointer-events: none; }
.mini-chips span { display: inline-block; border: 2px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 12px; font-weight: 800; cursor: pointer; background: #fff; }
.mini-chips input:checked + span { background: var(--sky); color: #fff; border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.mini-stars span { font-size: 26px; color: var(--line); cursor: pointer; }
.mini-stars label:has(~ label input:checked) span, .mini-stars input:checked + span { color: var(--sun); text-shadow: 0 2px 0 var(--ink); }

/* ── お店をさがす（2026-11-20） */
.dir-search { display: flex; gap: 6px; }
.dir-genres button small { opacity: .6; font-weight: 700; }
.dir-filter summary { cursor: pointer; list-style: none; } .dir-filter summary::-webkit-details-marker { display: none; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: 1fr; } }
.chip { display: inline-flex; align-items: center; border: 2px solid var(--line); background: #fff; border-radius: 999px; padding: 2px 10px; font-size: 11px; font-weight: 800; color: var(--ink-2); cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
a.dir-card { display: block; color: inherit; text-decoration: none; }
a.dir-card:hover { border-color: var(--sky); }
.dir-name { font-size: 16px; }
.dir-info { display: grid; gap: 3px; margin-top: 10px; }
.stars { color: #E39B0B; font-weight: 900; font-size: 12px; }
.trust-badge { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--ink); box-shadow: 0 2px 0 var(--ink); line-height: 1; vertical-align: middle; background: #fff; color: var(--ink); }
.trust-badge b { font-family: var(--display); font-size: 15px; } .trust-badge small { font-size: 9px; font-weight: 900; margin-top: 2px; }
.trust-badge.big { min-width: 66px; height: 66px; border-radius: 18px; } .trust-badge.big b { font-size: 22px; }
.dcard .trust-badge:not(.big) { min-width: 40px; height: 34px; border-radius: 10px; box-shadow: none; }
.trust-badge.g-S { background: linear-gradient(135deg, #FFE27A, #FF8A1F); } .trust-badge.g-A { background: var(--lime-soft); }
.trust-badge.g-B { background: var(--sky-soft); } .trust-badge.g-C { background: #fff; } .trust-badge.g-D { background: var(--orange-soft); } .trust-badge.g-E { background: var(--coral-soft); }
.tf-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 12px; border-bottom: 1px dashed var(--line); }
.tf-bar { position: relative; width: 90px; height: 8px; background: var(--line-2); border-radius: 99px; flex: none; }
.tf-bar::before { content: ""; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--ink-3); }
.tf-bar i { position: absolute; top: 0; bottom: 0; border-radius: 99px; } .tf-bar i.pos { left: 50%; background: var(--plus); } .tf-bar i.neg { right: 50%; background: var(--minus); }
.tf-row .num { width: 42px; text-align: right; }

/* ── 会員ランクでステータスカードの色が変わる（ホワイト→ブロンズ→シルバー→ゴールド→プラチナ→ブラック） */
.scard.rank-white    { background: var(--dots), linear-gradient(140deg, #FFFFFF 0%, #EEF2F7 100%); }
.scard.rank-bronze   { background: var(--stripes), linear-gradient(140deg, #E2A06A 0%, #B4703C 55%, #7A4520 100%); }
.scard.rank-silver   { background: var(--stripes), linear-gradient(140deg, #FBFCFE 0%, #C9D1DB 50%, #8E99A8 100%); }
.scard.rank-gold     { background: var(--stripes), radial-gradient(120% 90% at 100% 0%, #FFF4C2 0%, transparent 55%), linear-gradient(140deg, #FFE27A 0%, #E3B22E 55%, #A8770F 100%); }
.scard.rank-platinum { background: var(--stripes), linear-gradient(115deg, #F7F9FC 0%, #D9DEE6 30%, #FFFFFF 50%, #C4CCD8 70%, #EEF2F8 100%); }
.scard.rank-black    { background: radial-gradient(120% 90% at 100% 0%, rgba(245,215,120,.25) 0%, transparent 55%), linear-gradient(140deg, #2A2D36 0%, #0B0C10 100%); border-color: #F5D778; box-shadow: 0 6px 0 #000; }
.scard.ink-dark { color: var(--ink); } .scard.ink-dark .name, .scard.ink-dark .lv b { color: var(--ink); text-shadow: none; }
.scard.ink-dark .muted { color: var(--ink-2); } .scard.ink-dark::after { color: rgba(18,50,90,.12); }
.scard.rank-black .name, .scard.rank-black .lv b { color: #F5D778; text-shadow: 0 3px 0 #000; } .scard.rank-black::after { color: rgba(245,215,120,.25); }
.scard .mrank { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 11px; font-weight: 900; padding: 1px 10px; border-radius: 999px; border: 2px solid currentColor; }
.rank-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--ink); vertical-align: -2px; }
