/* KINGDOM OS（2026-11-05）。KINGDOM のロゴの色（墨 #543845・赤 #980B12）を基調に、スマホで片手で使える大きさ */
:root {
  --bg: #f6f3ee; --card: #ffffff; --ink: #2b2226; --brand: #543845; --red: #980B12;
  --mute: #6f6468; --line: #e4ddd5; --soft: #efe9e2; --ok: #2f6b4f; --ok-soft: #e4efe8;
  --r: 14px; --fs: 15px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --bg: #1b1719; --card: #252022; --ink: #f1ece7; --brand: #c9b3bd; --mute: #a99ea2; --line: #3a3235; --soft: #2e282a; --ok: #8fd0ad; --ok-soft: #22332a; }
}
:root[data-theme="dark"] { --bg: #1b1719; --card: #252022; --ink: #f1ece7; --brand: #c9b3bd; --mute: #a99ea2; --line: #3a3235; --soft: #2e282a; --ok: #8fd0ad; --ok-soft: #22332a; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs)/1.7 "Noto Sans JP", system-ui, sans-serif; word-break: auto-phrase; line-break: strict; }
button { font: inherit; color: inherit; }
.os { min-height: 100dvh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* 頭 */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--brand); text-decoration: none; }
.logo svg { height: 16px; width: auto; }
.logo__os { font-family: "Bodoni Moda", serif; font-size: 18px; letter-spacing: .08em; color: var(--ink); }
.who { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mute); }
.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
.linkbtn { background: none; border: 0; padding: 8px 4px; color: var(--mute); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; font-size: 13px; }

/* ログイン */
.login { flex: 1; display: grid; place-items: center; padding: 32px 16px; }
.login__box { width: 100%; max-width: 380px; text-align: center; }
.login__logo { color: var(--brand); margin-bottom: 10px; }
.login__logo svg { height: 22px; width: auto; }
.login__os { font-family: "Bodoni Moda", serif; font-size: 30px; letter-spacing: .1em; margin: 0 0 6px; }
.login__lead { color: var(--mute); font-size: 14px; margin: 0 0 24px; }
.field { display: block; text-align: left; margin-bottom: 14px; }
.field span { display: block; font-size: 13px; color: var(--mute); margin-bottom: 6px; }
.input { width: 100%; height: 56px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); color: var(--ink); font: 500 22px/1 "Noto Sans JP", sans-serif; letter-spacing: .3em; text-align: center; }
.input--text { letter-spacing: .04em; font-size: 18px; }
.input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 22px; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); cursor: pointer; font-weight: 500; text-decoration: none; }
.btn--main { width: 100%; background: var(--brand); border-color: var(--brand); color: #fff; }
.err { color: var(--red); font-size: 14px; margin: 0 0 12px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn--main { color: #1b1719; } :root:not([data-theme="light"]) .err { color: #ff8f8f; } }

/* ホーム */
.main { flex: 1; padding: 24px 0 48px; }
.hello { margin: 0 0 4px; font-size: 22px; font-weight: 700; line-height: 1.4; }
.hello__sub { margin: 0 0 20px; color: var(--mute); font-size: 14px; }
.now { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
.stat { display: block; width: 100%; text-align: left; padding: 14px 14px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); cursor: pointer; }
.stat__n { display: block; font-size: 28px; font-weight: 700; line-height: 1.2; }
.stat__l { display: block; font-size: 12px; color: var(--mute); line-height: 1.5; }
.stat--hot { border-color: var(--red); }
.stat--hot .stat__n { color: var(--red); }
.grp { margin-bottom: 26px; }
.grp__h { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; font-size: 13px; color: var(--mute); font-weight: 500; letter-spacing: .06em; }
.grp__h b { color: var(--ink); font-size: 16px; letter-spacing: 0; }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; list-style: none; margin: 0; padding: 0; }
.tile { position: relative; display: flex; gap: 14px; align-items: flex-start; width: 100%; height: 100%; padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); text-align: left; cursor: pointer; transition: border-color .15s, transform .15s; }
.tile:hover { border-color: var(--brand); }
.tile:active { transform: scale(.99); }
.tile__ic { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--brand); }
.tile__ic svg { width: 22px; height: 22px; }
.tile__t { display: block; font-weight: 700; font-size: 16px; line-height: 1.4; }
.tile__d { display: block; font-size: 13px; color: var(--mute); line-height: 1.6; margin-top: 2px; }
.tile__b { position: absolute; top: 10px; right: 10px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px; background: var(--red); color: #fff; font-size: 12px; font-weight: 700; line-height: 24px; text-align: center; }
.tile--soon { cursor: default; background: transparent; border-style: dashed; }
.tile--soon:hover { border-color: var(--line); }
.tile--soon .tile__ic { background: transparent; border: 1px dashed var(--line); color: var(--mute); }
.tile--soon .tile__t { color: var(--mute); }
.soon { display: inline-block; margin-left: 6px; padding: 0 8px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; font-weight: 500; color: var(--mute); vertical-align: 2px; }
.foot { padding: 20px 0 32px; color: var(--mute); font-size: 12px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: var(--bg); font-size: 14px; z-index: 20; }
.skel { height: 88px; border-radius: var(--r); background: var(--soft); }

@media (max-width: 859px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .now { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: minmax(0, 1fr); }
  .who .chip { display: none; }
}
