:root {
  /* v2.6.0: 地は少し温かいグラファイト（青みの紺をやめた）・アクセントはコーラル 1 色だけ（Reef＝サンゴ礁）。
     Token と Shard の色（--gold・紫）はそのまま */
  --bg: #111214;
  --bg2: #16171a;
  --panel: #1a1b1f;
  --panel2: #202227;
  --panel3: #282a30;
  --panel-hover: #1e2024;
  --line: #2a2c31;
  --line2: #34373d;
  --line3: #464a51;
  --text: #ececee;
  --muted: #a4a7ad;
  --dim: #8c9097;
  --accent: #e8745b;
  --accent-hover: #f08a72;
  --accent-2: #f3a993;
  --accent-ink: #1f0c07;
  --accent-rgb: 232, 116, 91;
  --gold: #f2c94c;
  --ok: #45b97f;
  --warn: #e3a43b;
  --err: #e5534b;
  --info: #5e9cf0;
  --term: #0d0e10;
  --term-bar: #131417;
  --radius: 8px;
  --radius-s: 6px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .32);
  --mono: "JetBrains Mono", "Cascadia Mono", "Consolas", "Menlo", ui-monospace, monospace;
  --sans: "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
}

* { box-sizing: border-box; }
svg:not([width]) { width: 16px; height: 16px; flex: none; }
svg.tiny { width: 13px; height: 13px; vertical-align: -2px; margin-right: 4px; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(var(--accent-rgb), .35); }

/* ── 起動 ─────────────────────────── */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-mark { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--line2); border-top-color: var(--accent); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── 上の帯 ───────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 18px;
  height: 56px; padding: 0 22px;
  background: rgba(17, 18, 20, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .02em; color: var(--text); font-size: 16px; }
.brand:hover { text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.brand small { color: var(--dim); font-weight: 500; font-size: 11px; }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--radius-s);
  color: var(--muted); font-weight: 500;
}
.nav a:hover { background: var(--panel); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--panel2); color: var(--text); }
.topbar .spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.who .avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--panel3); color: var(--accent-2); font-weight: 700; font-size: 12px; }

main { max-width: 1320px; margin: 0 auto; padding: 26px 22px 60px; }

/* ── 見出し ───────────────────────── */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head h1 { margin: 0; font-size: 21px; font-weight: 650; letter-spacing: .02em; }
.head p { margin: 4px 0 0; color: var(--muted); }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 650; }
h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); font-weight: 600; text-transform: none; }

/* ── ボタン ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px;
  border: 1px solid var(--line2); border-radius: var(--radius-s);
  background: var(--panel2); color: var(--text);
  font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover:not(:disabled) { background: var(--panel3); border-color: var(--line3); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.ok { background: rgba(69, 185, 127, .14); border-color: rgba(69, 185, 127, .45); color: #86d9ad; }
.btn.ok:hover:not(:disabled) { background: rgba(69, 185, 127, .24); }
.btn.warn { background: rgba(227, 164, 59, .12); border-color: rgba(227, 164, 59, .45); color: #efc275; }
.btn.warn:hover:not(:disabled) { background: rgba(227, 164, 59, .22); }
.btn.danger { background: rgba(229, 83, 75, .12); border-color: rgba(229, 83, 75, .45); color: #f1928b; }
.btn.danger:hover:not(:disabled) { background: rgba(229, 83, 75, .22); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { background: var(--panel2); color: var(--text); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.icon { width: 34px; padding: 0; }
.btn.sm.icon { width: 28px; }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn.sm svg { width: 14px; height: 14px; }
.btn .spin { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite; }

/* ── 入力 ─────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.field .hint { color: var(--dim); font-size: 12px; }
.field .hint.err { color: var(--err); }
.input, select.input, textarea.input {
  width: 100%; height: 36px; padding: 0 11px;
  background: var(--bg2); border: 1px solid var(--line2); border-radius: var(--radius-s);
  outline: none; transition: border-color .12s, box-shadow .12s;
}
textarea.input { height: auto; min-height: 90px; padding: 9px 11px; resize: vertical; font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }
.input:disabled { opacity: .55; }
.input-unit { position: relative; }
.input-unit .input { padding-right: 52px; }
.input-unit span { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); font-size: 12px; pointer-events: none; }
.check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.check input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.check b { display: block; font-weight: 600; }
.check small { color: var(--dim); display: block; font-size: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
.row.between { justify-content: space-between; }

/* ── 板 ───────────────────────────── */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card + .card { margin-top: 16px; }
.split > .card + .card, .grid2 > .card + .card, .side > .card + .card { margin-top: 0; }
.card.flush { padding: 0; overflow: hidden; }
.card .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card .card-head h2 { margin: 0; }
.card .card-body { padding: 18px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.gold { color: var(--gold); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.empty { padding: 42px 18px; text-align: center; color: var(--dim); }
.empty svg { width: 34px; height: 34px; opacity: .6; margin-bottom: 8px; }
.note { padding: 11px 14px; border-radius: var(--radius-s); background: var(--panel2); border: 1px solid var(--line2); color: var(--muted); font-size: 13px; display: flex; gap: 10px; align-items: flex-start; }
.note svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.note.warn { border-color: rgba(227, 164, 59, .4); background: rgba(227, 164, 59, .07); color: #ecc98b; }
.note.err { border-color: rgba(229, 83, 75, .4); background: rgba(229, 83, 75, .07); color: #f3b0aa; }
.note.ok { border-color: rgba(69, 185, 127, .4); background: rgba(69, 185, 127, .07); color: #a9e3c4; }
.note b { color: var(--text); }

/* ── 札 ───────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 5px; font-size: 11.5px; font-weight: 600; background: var(--panel3); color: var(--muted); white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge.mc { background: rgba(126, 211, 33, .12); color: #a6e264; }
.badge.bot { background: rgba(114, 137, 218, .16); color: #a9b8f5; }
.badge.admin { background: rgba(242, 201, 76, .14); color: var(--gold); }
.badge.ok { background: rgba(69, 185, 127, .14); color: #86d9ad; }
.badge.err { background: rgba(229, 83, 75, .14); color: #f1928b; }
.badge.warn { background: rgba(227, 164, 59, .14); color: #efc275; }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.running { background: var(--ok); }
.dot.starting, .dot.stopping { background: var(--warn); animation: pulse 1.2s ease-in-out infinite; }
.dot.offline { background: #5a5e66; }
.dot.crashed { background: var(--err); }
.dot.task { background: var(--info); animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* ── 一覧の札（ダッシュボード） ─────── */
.node-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stat .k { color: var(--dim); font-size: 12px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat .k svg { width: 14px; height: 14px; }
.stat .v { font-size: 20px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 12px; color: var(--muted); font-weight: 500; margin-left: 4px; }
.stat .sub { color: var(--dim); font-size: 12px; margin-top: 2px; }
.servers { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.srv {
  display: block; color: var(--text); background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; transition: border-color .12s, background .12s;
}
.srv:hover { text-decoration: none; border-color: var(--line2); background: var(--panel-hover); }
.srv .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.srv .name { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.srv .meta { display: flex; align-items: center; gap: 10px; margin: 8px 0 14px; color: var(--dim); font-size: 12.5px; flex-wrap: wrap; }
.srv .meta .mono { color: var(--muted); }
.bars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.bar .k { display: flex; justify-content: space-between; color: var(--dim); font-size: 11.5px; margin-bottom: 5px; }
.bar .k b { color: var(--muted); font-weight: 600; font-variant-numeric: tabular-nums; }
.track { height: 5px; border-radius: 3px; background: var(--panel3); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 3px; background: var(--accent); transition: width .4s; }
.track i.hot { background: var(--warn); }
.track i.full { background: var(--err); }

/* ── サーバーの画面 ───────────────── */
.server-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.server-head h1 { margin: 0; font-size: 21px; font-weight: 650; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.server-head .meta { display: flex; gap: 14px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; align-items: center; }
.copy { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: var(--panel2); border: 1px solid var(--line); cursor: pointer; font-family: var(--mono); font-size: 12.5px; color: var(--text); }
.copy svg { width: 13px; height: 13px; color: var(--dim); }
.copy:hover { border-color: var(--line2); }
.power { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { display: flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); font-weight: 550; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a svg { width: 15px; height: 15px; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }

.console-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.term {
  background: var(--term); border: 1px solid var(--line); border-radius: var(--radius);
  display: flex; flex-direction: column; overflow: hidden; height: calc(100vh - 290px); min-height: 380px;
}
.term .out { flex: 1; overflow-y: auto; padding: 12px 14px; font: 12.5px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; color: #d9dbde; }
.term .out .ln { min-height: 1.55em; }
.term .out .ln .ts { color: #7c818a; margin-right: 0.75em; font-variant-numeric: tabular-nums; }
.term .out .ln.k-reef { color: var(--accent-2); }
.term .out .ln.k-err { color: #f19a93; }
.term .out .ln.k-warn { color: #ffd27a; }
.term .out .ln.k-cmd { color: var(--gold); }
.term .out .ln.k-install { color: #a9adb4; }
.term .in { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding: 8px 10px; background: var(--term-bar); }
.term .in span { color: var(--accent); font-family: var(--mono); font-weight: 700; }
.term .in input { flex: 1; height: 32px; background: transparent; border: 0; outline: none; font: 13px var(--mono); }
.term .in input:disabled { opacity: .5; }
.term .bar-top { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 6px 14px; border-bottom: 1px solid var(--line); background: var(--term-bar); color: var(--dim); font-size: 12px; }
.term .scroll-note { position: relative; }
.side { display: flex; flex-direction: column; gap: 14px; }
.meter .k { display: flex; justify-content: space-between; align-items: baseline; color: var(--dim); font-size: 12px; font-weight: 600; }
.meter .v { font-size: 18px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.meter .v small { color: var(--muted); font-size: 12px; font-weight: 500; }
.meter canvas { width: 100%; height: 56px; display: block; margin-top: 8px; }

/* ANSI */
.a-b { font-weight: 700; } .a-d { opacity: .7; } .a-i { font-style: italic; } .a-u { text-decoration: underline; }
.f0 { color: #3b4452; } .f1 { color: #ff6b6b; } .f2 { color: #5fd38d; } .f3 { color: #f5c451; } .f4 { color: #5aa9ff; } .f5 { color: #d38df5; } .f6 { color: #4fd1d9; } .f7 { color: #d9dbde; }
.f8 { color: #66768a; } .f9 { color: #ff8f8f; } .f10 { color: #8ff0b0; } .f11 { color: #ffe08a; } .f12 { color: #8cc4ff; } .f13 { color: #e7b3ff; } .f14 { color: #8deff2; } .f15 { color: #ffffff; }

/* ── 表 ───────────────────────────── */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; color: var(--dim); font-size: 12px; font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.clickable { cursor: pointer; }
.tbl tbody tr:hover td { background: rgba(255, 255, 255, .018); }
.tbl td.num { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); white-space: nowrap; }
.tbl td.act { text-align: right; white-space: nowrap; }
.tbl td.act .btn + .btn { margin-left: 4px; }
.tbl .fname { display: flex; align-items: center; gap: 10px; }
.tbl .fname svg { width: 17px; height: 17px; color: var(--dim); flex: none; }
.tbl .fname svg.dir { color: var(--accent); }
.tbl input[type=checkbox] { accent-color: var(--accent); width: 15px; height: 15px; }

/* ── ファイル ─────────────────────── */
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-family: var(--mono); font-size: 13px; }
.crumbs a { color: var(--muted); padding: 2px 6px; border-radius: 5px; }
.crumbs a:hover { background: var(--panel2); color: var(--text); text-decoration: none; }
.crumbs span { color: var(--dim); }
.drop { position: relative; }
.drop.over::after { content: attr(data-drop); position: absolute; inset: 0; display: grid; place-items: center; background: rgba(var(--accent-rgb), .12); border: 2px dashed var(--accent); border-radius: var(--radius); color: var(--accent-2); font-weight: 650; font-size: 15px; z-index: 5; }
.editor { display: flex; border: 1px solid var(--line2); border-radius: var(--radius-s); background: var(--term); overflow: hidden; }
/* 行番号の列は欄（textarea）の高さに合わせる＝中身の大きさを数えない（contain: size）。前は行の数だけ列が伸びて、
   欄の下に番号だけが続き箱が縦に長くなっていた（server.properties の「そのまま直す」で踏んだ・v2.3.0）。幅は桁の数から（JS の --digits） */
.editor .gutter { padding: 10px 8px 28px 12px; text-align: right; color: #4a4e55; font: 13px/1.55 var(--mono); user-select: none; white-space: pre; overflow: hidden; min-width: 44px; background: var(--term-bar); contain: size; width: calc(var(--digits, 2) * 1ch + 20px); flex: none; }
.editor textarea { flex: 1; min-height: 480px; height: calc(100vh - 330px); border: 0; outline: none; resize: none; background: transparent; padding: 10px 12px; font: 13px/1.55 var(--mono); color: #dddfe2; white-space: pre; overflow: auto; tab-size: 4; }
.editor.short textarea { min-height: 260px; height: 320px; }
.editor.err { border-color: rgba(229, 83, 75, .6); }
.progress { height: 4px; background: var(--panel3); border-radius: 2px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .2s; }

/* ── 鍵の表（config.toml） ───────── */
.kv { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.kv > div { padding: 8px 14px; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv .key { color: var(--muted); }
.kv .val.secret { color: var(--gold); }
.kv .val.is-empty { color: var(--err); font-family: var(--sans); }

/* ── 作る画面 ─────────────────────── */
.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mode { display: flex; gap: 14px; align-items: flex-start; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line2); background: var(--bg2); cursor: pointer; text-align: left; transition: border-color .12s, background .12s; }
.mode:hover { border-color: var(--line3); }
.mode.on { border-color: var(--accent); background: rgba(var(--accent-rgb), .06); }
.mode .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.mode .ic svg { width: 22px; height: 22px; }
.mode .ic.mc { background: rgba(126, 211, 33, .14); color: #a6e264; }
.mode .ic.bot { background: rgba(114, 137, 218, .18); color: #a9b8f5; }
.mode b { display: block; font-size: 15px; }
.mode small { color: var(--dim); display: block; margin-top: 2px; }
.presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.presets button { height: 24px; padding: 0 9px; border-radius: 6px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); cursor: pointer; font-size: 12px; }
.presets button:hover { color: var(--text); border-color: var(--line3); }
.presets button.on { border-color: var(--accent); color: var(--accent-2); }
.summary-line { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.summary-line b { color: var(--text); }

/* ── 小窓 ─────────────────────────── */
.modal-back { position: fixed; inset: 0; z-index: 50; background: rgba(6, 6, 8, .62); display: grid; place-items: center; padding: 20px; animation: fade .12s ease-out; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; box-shadow: var(--shadow); animation: rise .16s ease-out; }
.modal.wide { width: min(780px, 100%); }
/* 小窓の頭・中身・足は「小窓の直の子」だけ（前は .modal .body が中のお知らせのプレビューの .body や header にも当たっていた・v2.3.0） */
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal > header h2 { margin: 0; font-size: 16px; }
.modal > .body { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
/* 中身の行は縮めない（流すのは小窓の中身ごと）。縮むと書いた分だけ下の欄に重なる（お知らせのプレビューで踏んだ・v2.3.0） */
.modal > .body > * { flex-shrink: 0; }
.modal > footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--bg2); border-radius: 0 0 10px 10px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) scale(.985); } }

/* ── 知らせ ───────────────────────── */
#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line2); box-shadow: var(--shadow); animation: rise .16s ease-out; font-size: 13.5px; }
.toast svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.toast.ok svg { color: var(--ok); }
.toast.err { border-color: rgba(229, 83, 75, .5); }
.toast.err svg { color: var(--err); }
.toast.warn svg { color: var(--warn); }
.toast.hide { opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s; }

/* ── ログイン ─────────────────────── */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--bg); }
.login .box { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 10px; padding: 30px 28px; box-shadow: none; }
.login .brand { justify-content: center; font-size: 22px; margin-bottom: 6px; }
.login .brand img { width: 36px; height: 36px; }
.login p.lead { text-align: center; color: var(--muted); margin: 0 0 24px; font-size: 13px; }
.login form { display: flex; flex-direction: column; gap: 14px; }
.login .btn { height: 40px; }
.login .foot { text-align: center; color: var(--dim); font-size: 12px; margin-top: 18px; }

/* ── 小物 ─────────────────────────── */
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.code-big { font: 700 30px/1 var(--mono); letter-spacing: .18em; color: var(--gold); padding: 16px; text-align: center; background: var(--bg2); border: 1px dashed var(--line2); border-radius: var(--radius); }
.kbd { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; background: var(--panel3); border: 1px solid var(--line2); color: var(--muted); }
.pill-tabs { display: inline-flex; padding: 3px; gap: 3px; background: var(--bg2); border: 1px solid var(--line); border-radius: 9px; }
.pill-tabs button { height: 28px; padding: 0 12px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 550; }
.pill-tabs button.on { background: var(--panel3); color: var(--text); }
.danger-zone { border-color: rgba(229, 83, 75, .35); }
.danger-zone h2 { color: #f19a93; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.hr { height: 1px; background: var(--line); margin: 4px 0; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.act-item { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); align-items: baseline; }
.act-item:last-child { border-bottom: 0; }
.act-item .when { color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.act-item .what b { font-weight: 600; }
.act-item .what .detail { color: var(--dim); font-size: 12.5px; font-family: var(--mono); word-break: break-all; }
.act-item .src { color: var(--dim); font-size: 12px; white-space: nowrap; }

/* ── 幅の決まった入力（スマホでは広げる） ── */
.w-search { width: 240px; }
.w-sm { width: 160px; }
.w-md { width: 240px; }
.w-narrow { max-width: 260px; }
.node-strip.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status, .tbl td.num { white-space: nowrap; }
.tabs.more-right { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); }
.tabs.more-left { -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%); mask-image: linear-gradient(90deg, transparent, #000 18%); }
.tabs.more-left.more-right { -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }

@media (max-width: 1000px) {
  .console-wrap { grid-template-columns: 1fr; }
  .side { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .node-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  /* 上の帯 */
  .topbar { padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(56px + env(safe-area-inset-top)); gap: 8px; }
  .nav { margin-left: 0; }
  .nav a { padding: 8px 10px; }
  .nav a span { display: none; }
  .who { gap: 6px; }
  .who .name, .who .badge, .brand small { display: none; }
  main { padding: 16px 14px calc(48px + env(safe-area-inset-bottom)); }

  /* iPhone は 16px より小さい入力に触れると勝手に拡大するので、入力の字は 16px */
  .input, select.input, textarea.input, .term .in input, .editor textarea { font-size: 16px; }
  .input { height: 42px; }
  .btn { height: 40px; }
  .btn.sm { height: 34px; }
  .btn.sm.icon, .btn.icon { width: 38px; }

  /* 見出し */
  .head { margin-bottom: 16px; }
  .head h1 { font-size: 20px; }
  /* 検索欄は 1 段目いっぱい・札は 2 段目に分けて並べる（札が 2 つ以上あると 1 段に入らない） */
  .head .actions { width: 100%; flex-wrap: wrap; }
  .head .actions .w-search { flex: 1 1 100%; width: auto; min-width: 0; }
  .head .actions .btn { flex: 1 1 auto; justify-content: center; }
  .head .actions .btn span { white-space: nowrap; }

  /* サーバーの画面の頭: 電源の札は 4 つを 1 段に */
  .server-head { gap: 12px; margin-bottom: 14px; }
  .server-head > div:first-child { width: 100%; }
  .server-head h1 { font-size: 20px; }
  .power { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; }
  .power .btn { padding: 0 4px; gap: 4px; font-size: 13px; }

  /* タブ: 横に流し、端をぼかして続きがあると分かるように */
  .tabs { margin-left: -14px; margin-right: -14px; padding: 0 10px; margin-bottom: 14px; }
  .tabs a { padding: 11px 10px; font-size: 13.5px; }

  /* 板と並び */
  .card { padding: 14px; }
  .card .card-head { padding: 12px 14px; }
  .card .card-body { padding: 14px; }
  .card .card-head > .row { width: 100%; }
  .card .card-head > .row .btn span { display: none; }
  .card .card-head > .row .btn { padding: 0 12px; }
  .card > .row:not(.between) > .input, .card > .row:not(.between) > .w-sm, .card > .row:not(.between) > .w-md { flex: 1 1 100%; width: 100%; }
  .card > .row:not(.between) > .btn { flex: 1 1 auto; }
  .row.between > h2 { flex: 1; min-width: 0; }
  .crumbs { width: 100%; }
  .grid2, .grid3, .grid4, .perm-grid { grid-template-columns: 1fr; }
  .node-strip { gap: 10px; }
  .node-strip.three { grid-template-columns: 1fr; }
  .stat { padding: 12px 14px; }
  .stat .v { font-size: 18px; }
  .w-narrow { max-width: none; }
  .w-md, .w-sm { width: 100%; }
  .field .row { flex-wrap: wrap; }
  .field .row > .input { flex: 1 1 100%; }
  .list-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .list-row > .btn, .list-row > select { width: 100%; }
  .row.between { gap: 10px; }

  /* 作る画面のモード: 2 つを横に・小さく */
  .modes { grid-template-columns: 1fr 1fr; gap: 8px; }
  .mode { flex-direction: column; gap: 8px; padding: 12px; }
  .mode .ic { width: 36px; height: 36px; }
  .mode b { font-size: 14px; }
  .mode small { font-size: 11.5px; }

  /* 一覧 */
  .servers { grid-template-columns: 1fr; gap: 10px; }
  .srv { padding: 14px; }
  .bars { gap: 10px; }
  .act-item { grid-template-columns: 1fr; gap: 2px; padding: 10px 14px; }
  .tbl .hide-sm { display: none; }
  .tbl th, .tbl td { padding: 10px 12px; }
  .tbl .fname { min-width: 0; }
  .tbl .fname b, .tbl .fname a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; display: inline-block; vertical-align: middle; }

  /* コンソール: 使用量を上に小さく 3 つ・コンソールは画面の残り */
  .console-wrap { gap: 10px; }
  .side { order: -1; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .side .card { padding: 10px 10px 8px; }
  .meter .k { font-size: 11px; }
  .meter .k .lim { display: none; }
  .meter .v { font-size: 14px; }
  .meter .v small { display: none; }
  .meter canvas { height: 26px; margin-top: 4px; }
  .term { height: calc(100dvh - 330px); min-height: 300px; }
  .term .out { padding: 10px; font-size: 12px; }
  .term .bar-top { padding: 6px 10px; }

  /* 直す欄 */
  .editor textarea { min-height: 320px; height: 60vh; }
  .editor.short textarea { min-height: 240px; height: 45vh; }
  /* 字は拡大させないために 16px（上の .editor textarea）＝行番号も同じ大きさにしないと行とずれていく（v2.3.0） */
  .editor .gutter { min-width: 34px; padding-left: 6px; font-size: 16px; width: calc(var(--digits, 2) * 1ch + 14px); }

  /* 小窓は画面いっぱいに・下の札はいつも見える */
  .modal-back { padding: 0; place-items: stretch; }
  .modal, .modal.wide { width: 100%; max-height: none; height: 100%; height: 100dvh; border-radius: 0; border: 0; display: flex; flex-direction: column; overflow: hidden; }
  .modal > header { padding: 12px 14px; padding-top: calc(12px + env(safe-area-inset-top)); }
  .modal > .body { flex: 1; overflow-y: auto; padding: 14px; -webkit-overflow-scrolling: touch; }
  .modal > footer { padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); border-radius: 0; }
  .modal > footer .btn { flex: 1; }

  /* 知らせは下いっぱいに */
  #toasts { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: none; }
  .login .box { padding: 24px 18px; }
}
@media (max-width: 400px) {
  .power .btn svg { display: none; }
  .power .btn { font-size: 12.5px; }
  .tabs a svg { display: none; }
}

/* v1.3.0: ダッシュボード・連携の帯・SFTP・ログインの 2 段目 */
canvas.chart { width: 100%; height: 160px; display: block; margin-top: 12px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; color: var(--dim); font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sec-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.sec-list > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sec-list .badge { height: 19px; font-size: 11px; }
.srv.locked { cursor: default; opacity: .82; }
.srv.locked:hover { transform: none; background: var(--panel); border-color: var(--line); }
.link-banner { margin-bottom: 18px; align-items: center; }
.link-banner b { display: block; margin-bottom: 2px; }
.link-banner .btn { flex: none; }
.copy.big { font-size: 16px; padding: 10px 14px; justify-content: space-between; width: 100%; letter-spacing: .04em; color: var(--gold); }
.copy.wrap { white-space: normal; word-break: break-all; text-align: left; width: 100%; justify-content: space-between; line-height: 1.5; padding: 8px 10px; }
.copy.wrap svg { flex: none; }
.code-input { font: 700 24px/1 var(--mono); letter-spacing: .4em; text-align: center; height: 52px; }
.sftp-ep { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.sftp-ep > div:nth-last-child(-n+2) { border-bottom: 0; }
.tbl td.ua { white-space: nowrap; }
.list-row.clickable { cursor: pointer; }
.list-row.clickable:hover b { color: var(--accent-2); }
@media (max-width: 720px) {
  canvas.chart { height: 130px; }
  .link-banner { flex-wrap: wrap; }
  .link-banner .btn { width: 100%; justify-content: center; }
  .copy.big { font-size: 15px; }
  .sftp-ep { grid-template-columns: 1fr; }
  .sftp-ep > .key { border-bottom: 0; padding-bottom: 0; }
}
.hint.wait { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }
.hint.wait .spin { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
@media (max-width: 720px) {
  /* 狭い幅では行を折り返す（右端の札が札の枠で切れて押せなくならないように） */
  .tbl.stack-sm thead { display: none; }
  .tbl.stack-sm tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
  .tbl.stack-sm tr:last-child { border-bottom: 0; }
  .tbl.stack-sm td { display: block; padding: 0; border: 0; min-width: 0; }
  .tbl.stack-sm td:first-child { flex: 1 1 100%; }
  .tbl.stack-sm td.num { text-align: left; }
  .tbl.stack-sm td.act { margin-left: auto; }
  .tbl.stack-sm td.hide-sm { display: none; }
  .tbl.stack-sm tbody tr:hover td { background: none; }
}
.btn.ghost.danger-ic:hover:not(:disabled) { color: #f1928b; background: rgba(229, 83, 75, .12); }
.ip-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; border-radius: 6px; background: rgba(126, 211, 33, .08); border: 1px solid rgba(126, 211, 33, .28); color: var(--muted); cursor: pointer; font-size: 12px; max-width: 100%; }
.ip-chip b { color: #c6ef9a; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ip-chip svg { width: 12px; height: 12px; color: var(--dim); flex: none; }
.ip-chip:hover { border-color: rgba(126, 211, 33, .5); }
.ip-line { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── v2.0.0 ─────────────────────────────────────────── */
:root { --token: #f2c94c; --shard: #b79cff; --boost: #ff9f5a; }

/* 上の帯: お知らせの数・財布 */
.nav a { position: relative; }
.nav a .ns { display: none; }
/* 字のある幅では字の後ろに並べる（右上に乗せると最後の字に重なる）・字を隠すスマホでは絵の右上に乗せる */
@media (max-width: 720px) { .nav a .count { position: absolute; top: 2px; right: 2px; } }
.nav a .count { min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--err); color: #fff; font: 700 10px/16px var(--sans); text-align: center; font-style: normal; }
/* 財布（.who .purse）は下の v2.1.0 に */
.maint-banner { margin-bottom: 16px; align-items: center; }
.maint-banner b { display: block; margin-bottom: 2px; }

/* ログイン */
.login-tabs { display: flex; width: 100%; margin-bottom: 16px; }
.login-tabs button { flex: 1; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.steps { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.steps li::marker { color: var(--accent); font-weight: 700; }
.login-code { font-size: 34px; letter-spacing: .14em; padding: 18px 10px; user-select: all; }

/* 種類の札（Java 版・統合版・Python の Bot・Node.js） */
.badge.k-minecraft { background: rgba(126, 211, 33, .12); color: #a6e264; }
.badge.k-bedrock { background: rgba(83, 196, 255, .13); color: #8fd6ff; }
.badge.k-discordbot { background: rgba(114, 137, 218, .16); color: #a9b8f5; }
.badge.k-nodejs { background: rgba(104, 160, 99, .18); color: #9fd19a; }
.mode .ic.k-minecraft { background: rgba(126, 211, 33, .14); color: #a6e264; }
.mode .ic.k-bedrock { background: rgba(83, 196, 255, .15); color: #8fd6ff; }
.mode .ic.k-discordbot { background: rgba(114, 137, 218, .18); color: #a9b8f5; }
.mode .ic.k-nodejs { background: rgba(104, 160, 99, .2); color: #9fd19a; }
/* Java アプリ（v2.7.0）: コーラルのアクセントと混ざらない琥珀色 */
.badge.k-javaapp { background: rgba(214, 160, 72, .15); color: #e6bd78; }
.mode .ic.k-javaapp { background: rgba(214, 160, 72, .17); color: #e6bd78; }
.modes.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.modes.four .mode, .modes.five .mode { flex-direction: column; gap: 8px; padding: 12px; }
.modes.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
/* Web サイト（v2.14.0）: ほかの種類の色と混ざらない藤色 */
.badge.k-website { background: rgba(196, 128, 214, .14); color: #d9a6e6; }
.mode .ic.k-website { background: rgba(196, 128, 214, .16); color: #d9a6e6; }
/* 6 種類（Web サイトを足した時）は 3 列 × 2 段 */
.modes.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.modes.six .mode { padding: 13px 14px; }
/* Web サイトのひな形（作る小窓） */
.site-tpl-field { display: flex; flex-direction: column; gap: 8px; }
.modes.tpls .mode { padding: 12px 14px; }
.modes.tpls .mode .ic { width: 36px; height: 36px; }
.modes.tpls .mode small { font-size: 12px; line-height: 1.5; }
/* サイトの URL（サーバーの画面の頭・サイトのタブ） */
.site-urls { display: flex; flex-direction: column; gap: 10px; }
.site-url-row { display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; gap: 10px; align-items: center; }
.site-url-row .k { color: var(--dim); font-size: 13px; }
.site-url-row .copy { min-width: 0; max-width: 100%; }
/* 長い URL は 1 行で … で切る（押すと全部をコピー・title にも全部） */
.copy .u { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy svg { flex: none; }
.ip-line.site-line { flex-wrap: nowrap; min-width: 0; max-width: 100%; }
.ip-line.site-line > .dim { flex: none; }
.ip-line.site-line .copy { min-width: 0; }
.ip-line.site-line .btn { flex: none; }
.site-url-row .acts { display: flex; gap: 6px; }
.slug-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.slug-row .prefix { color: var(--dim); font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; }
.slug-row .input { width: 180px; }
/* 一覧のカードの Web サイトの URL（長い URL は … で切る・カードを広げない） */
.ip-chip.site { background: rgba(196, 128, 214, .07); border-color: rgba(196, 128, 214, .3); min-width: 0; }
.ip-chip.site span { white-space: nowrap; flex: none; }
.ip-chip.site b { color: #e2bdec; min-width: 0; }
.ip-chip.site:hover { border-color: rgba(196, 128, 214, .55); }
.srv { min-width: 0; }
@media (max-width: 640px) {
  .site-url-row { grid-template-columns: minmax(0, 1fr) auto; }
  .site-url-row .k { grid-column: 1 / -1; }
}

/* 起動設定（v2.7.0: 起動コマンドの欄・差し込み・見本） */
.cmd-edit { min-height: 64px; resize: vertical; font-size: 12.5px; line-height: 1.55; }
.cmd-preview { margin: 0; padding: 12px; background: var(--term); border-radius: 8px; border: 1px solid var(--line); white-space: pre-wrap; word-break: break-all; color: var(--muted); font-size: 12.5px; }
.cmd-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.cmd-var { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line); background: var(--bg2); color: var(--muted); font-size: 12px; cursor: pointer; max-width: 100%; }
.cmd-var:hover:not(:disabled) { border-color: var(--accent); color: var(--text); }
.cmd-var:disabled { cursor: default; opacity: .6; }
.cmd-var code { color: var(--text); font-size: 12px; }
.startup-card .check .hint { margin-top: 2px; }
.version-picker { gap: 12px; }
.spec-fixed b { display: block; margin-bottom: 2px; color: var(--text); }
.note.info { border-color: rgba(90, 169, 255, .4); background: rgba(90, 169, 255, .07); color: #b9d8ff; }

/* 小さな札（ブースト・レンタル・中身） */
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.srv .chips { margin: -6px 0 12px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); font-size: 12px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
a.chip:hover { text-decoration: none; border-color: var(--line2); color: var(--text); }
.chip svg { width: 13px; height: 13px; flex: none; }
.chip small { color: var(--dim); font-size: 11px; }
.chip.boost { background: rgba(255, 159, 90, .1); border-color: rgba(255, 159, 90, .35); color: #ffc39a; }
.chip.rental { background: rgba(183, 156, 255, .1); border-color: rgba(183, 156, 255, .35); color: #d4c6ff; }
.small { font-size: 12px; }

/* お知らせ */
.notice-list { display: flex; flex-direction: column; gap: 12px; }
.notice { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; position: relative; }
.notice.unread { border-color: rgba(var(--accent-rgb), .45); box-shadow: inset 3px 0 0 var(--accent); }
.notice.pinned { background: var(--panel); border-top: 2px solid rgba(242, 201, 76, .55); }
.notice.system { background: var(--bg2); }
.notice header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; cursor: pointer; }
.notice.preview header { cursor: default; }
.notice .ttl { display: flex; align-items: center; gap: 8px; font-weight: 650; font-size: 15px; min-width: 0; }
.notice .ttl .md { font-weight: 650; }
.notice .when { display: flex; align-items: center; gap: 8px; flex: none; font-size: 12px; }
.notice .dot-new { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.notice .pin svg { width: 14px; height: 14px; color: var(--gold); }
.notice .body { margin-top: 10px; max-height: 7.5em; overflow: hidden; }
.notice .body.clamped { -webkit-mask-image: linear-gradient(180deg, #000 70%, transparent); mask-image: linear-gradient(180deg, #000 70%, transparent); }
.notice.open .body, .notice.preview .body { max-height: none; -webkit-mask-image: none; mask-image: none; }
.notice .more-btn { margin-top: 4px; padding: 2px 0; border: 0; background: none; color: var(--accent); font: inherit; font-size: 12.5px; cursor: pointer; }
.notice .more-btn:hover { text-decoration: underline; }
.notice .rewards { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.notice .rewards .lbl { color: var(--dim); font-size: 12px; }
.notice .rewards .spacer { flex: 1; }
.reward { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.reward svg { width: 14px; height: 14px; }
.reward.tok { background: rgba(242, 201, 76, .12); color: var(--token); }
.reward.shd { background: rgba(183, 156, 255, .14); color: var(--shard); }
.reward.cpn { background: rgba(255, 159, 90, .12); color: #ffc39a; }
.notice.preview { min-height: 80px; }
.md-tools { display: flex; gap: 4px; flex-wrap: wrap; }
.md-tools .mdbtn { height: 26px; min-width: 30px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); cursor: pointer; font: 600 12px var(--mono); }
.md-tools .mdbtn:hover { color: var(--text); border-color: var(--line3); }
textarea.md-src { min-height: 180px; font-family: var(--mono); }
.hint.count { text-align: right; }

/* ショップ */
.shop-strip { margin-bottom: 18px; }
.shop-strip .stat:nth-child(1) .k svg { color: var(--token); }
.shop-strip .stat:nth-child(2) .k svg { color: var(--shard); }
.stat .earn { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-size: 13px; color: var(--muted); }
.stat .earn > div { display: flex; justify-content: space-between; gap: 8px; }
.stat .earn b { color: var(--text); font-variant-numeric: tabular-nums; }
/* ホームのタブ（サーバー｜不具合報告）・お知らせのタブ（運営｜Reef）と、その数（v2.7.0） */
.home-tabs, .notice-tabs { margin-top: -4px; }
.tab-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; }
/* 合計（1 日の上限は合計 1 つ・v2.7.0）を内訳より目立たせる */
.stat .earn > .total { color: var(--text); font-weight: 600; padding-bottom: 4px; margin-bottom: 2px; border-bottom: 1px solid var(--line); }
.sale-banner { margin-bottom: 16px; align-items: center; }
.sale-banner b { display: block; }
.section-title { display: flex; align-items: center; gap: 8px; margin: 22px 0 4px; font-size: 16px; }
.section-title svg { width: 18px; height: 18px; color: var(--accent); }
.section-lead { margin: 0 0 12px; font-size: 13px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.shop-grid > .card + .card { margin-top: 0; }
.shop-item, .card.coupon { display: flex; flex-direction: column; gap: 12px; }
.shop-item .top, .card.coupon .top { display: flex; gap: 12px; align-items: flex-start; }
.shop-item .ic, .card.coupon .ic { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.shop-item .ic svg, .card.coupon .ic svg { width: 20px; height: 20px; }
.ic.cpn { background: rgba(255, 159, 90, .13); color: #ffc39a; }
.ic.rent { background: rgba(183, 156, 255, .14); color: var(--shard); }
.shop-item .desc, .card.coupon .desc { font-size: 12.5px; margin-top: 2px; }
.shop-item .bottom, .card.coupon .bottom { margin-top: auto; }
.shop-item.on-sale { border-color: rgba(227, 164, 59, .45); }
.kinds-line { display: flex; gap: 5px; flex-wrap: wrap; }

/* 編集の小窓（v2.3.0）: 区切りの見出し・よく使う値の札・大きい切り替え・ショップでの見え方 */
.form-sec { display: flex; flex-direction: column; gap: 2px; padding-top: 6px; margin-top: 2px; border-top: 1px solid var(--line); }
.form-sec:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.form-sec h3 { margin: 0; font-size: 13.5px; color: var(--text); }
.presets { display: flex; flex-wrap: wrap; gap: 6px; }
.presets button { height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line2); background: var(--panel2); color: var(--muted); cursor: pointer; font: 600 12.5px var(--sans); }
.presets button:hover { color: var(--text); border-color: var(--line3); }
.presets button.on { border-color: var(--accent); color: var(--text); background: rgba(var(--accent-rgb), .12); }
.pill-tabs.big { display: flex; width: 100%; }
.pill-tabs.big button { flex: 1; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; font-size: 13.5px; }
.pill-tabs.big button svg { width: 16px; height: 16px; }
.pill-tabs.big button.on { box-shadow: inset 0 0 0 1px var(--accent); }
.modes.two .mode { padding: 12px 14px; }
textarea.input.plain { font-family: var(--sans); font-size: 14px; }
.input-unit.w-sm { width: 180px; max-width: 100%; }
.item-preview { max-width: 360px; }
.shop-item.preview.off { opacity: .6; }
.ip-chip.inside { background: rgba(90, 169, 255, .08); border-color: rgba(90, 169, 255, .3); }
.ip-chip.inside b { color: #b9d8ff; }
@media (max-width: 720px) {
  .modes.two .mode { gap: 10px; padding: 10px 12px; align-items: center; }
  .modes.two .mode small { display: none; }
  .modes.two .mode .ic { width: 34px; height: 34px; }
}
.price { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; }
.price svg { width: 16px; height: 16px; color: var(--token); }
.price b { font-variant-numeric: tabular-nums; }
.price s { font-size: 12px; }
.card.coupon.used, .card.coupon.expired, .card.coupon.revoked { opacity: .6; }
.empty-card { grid-column: 1 / -1; }
.tbl td.plus { color: #86d9ad; }
.tbl td.minus { color: #f1928b; }
b.plus { color: #86d9ad; }
b.minus { color: #f1928b; }
.purse-mini { display: inline-flex; align-items: center; gap: 3px; font-variant-numeric: tabular-nums; }
.purse-mini svg:first-child { color: var(--token); }
.purse-mini svg:last-of-type { color: var(--shard); }

/* SFTP */
.sftp-kv { grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr); border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; }
.sftp-kv > div { white-space: normal; overflow: visible; }
.sftp-kv > div:nth-last-child(-n+2) { border-bottom: 0; }
.sftp-kv .val .copy.wrap { width: auto; max-width: 100%; }
.route-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.route-row:last-of-type { border-bottom: 0; }
.fp { font-size: 11.5px; word-break: break-all; }
.sftp-row { border-bottom: 1px solid var(--line); }
.sftp-row:last-child { border-bottom: 0; }
.sftp-row .line { display: flex; align-items: center; gap: 12px; padding: 12px 18px; flex-wrap: wrap; }
.sftp-row .line .fname { display: flex; align-items: center; gap: 8px; flex: 1 1 180px; min-width: 0; }
.sftp-row .line .fname svg { width: 17px; height: 17px; color: var(--dim); flex: none; }
.sftp-row .acts { display: flex; gap: 6px; margin-left: auto; }
.sftp-detail { padding: 0 18px 16px; }
.sftp-detail h3 { margin: 10px 0 6px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 13px; }

/* サーバーの画面: 割り当て（見るだけ）・ブースト */
.spec-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.spec-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spec-row .k { color: var(--dim); font-size: 12.5px; min-width: 72px; }
.spec-row b { font-size: 16px; font-variant-numeric: tabular-nums; }
.boost-list { margin-top: 8px; }

/* 運営 */
.perm-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.perm-grid.user-picks { max-height: 220px; overflow: auto; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg2); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bulk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 18px; border-bottom: 1px solid var(--line); background: rgba(var(--accent-rgb), .06); }
.tbl td.pick { width: 34px; }
.tbl tr.off td { opacity: .55; }
.mini-ledger { display: flex; flex-direction: column; gap: 6px; max-height: 220px; overflow: auto; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--bg2); font-size: 13px; }
.sub-tabs { margin-bottom: 16px; flex-wrap: wrap; }
pre.codes-out { margin: 0; padding: 12px; background: var(--term); border: 1px solid var(--line); border-radius: 8px; max-height: 300px; overflow: auto; white-space: pre-wrap; color: var(--gold); }
.msg-list { display: flex; flex-direction: column; }
.msg-item { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.msg-item:last-child { border-bottom: 0; }
.msg-item code { font-size: 12px; color: var(--muted); word-break: break-all; }
textarea.msg-ta { min-height: 38px; font-family: var(--sans); font-size: 13.5px; }
.msg-item .default { font-style: italic; }
.filters .grid4 { gap: 10px; }

@media (max-width: 1000px) {
  .modes.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modes.five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .modes.six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .perm-grid.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .modes.five, .modes.six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modes.six .mode { flex-direction: column; gap: 8px; padding: 12px; }
}
@media (max-width: 720px) {
  .brand-name { display: none; }
  .who .avatar { display: none; }
  .nav { gap: 0; }
  .nav a { padding: 8px 7px; }
  .login-code { font-size: 28px; letter-spacing: .1em; }
  .shop-grid { grid-template-columns: 1fr; }
  .perm-grid.four, .perm-grid.user-picks { grid-template-columns: 1fr 1fr; }
  .sftp-kv { grid-template-columns: 1fr; }
  .sftp-kv > .key { border-bottom: 0; padding-bottom: 0; color: var(--dim); }
  .sftp-row .line { padding: 12px 14px; }
  .sftp-row .acts { width: 100%; }
  .sftp-row .acts .btn { flex: 1; }
  .sftp-detail { padding: 0 14px 14px; }
  .notice { padding: 12px 14px; }
  .notice header { flex-direction: column; gap: 6px; }
  .bulk-bar { padding: 10px 14px; }
  .msg-item { padding: 12px 14px; }
}
@media (max-width: 400px) {
  .nav a { padding: 8px 6px; }
}

/* ── v2.2.0: どこに打っているかが見える（コンソールの入力欄・直す欄は outline を消していた） ── */
.term .in:focus-within { box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb), .45); }
.editor:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .15); }
.btn:focus-visible, .nav a:focus-visible, .tabs a:focus-visible, .pill-tabs button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tbl td.when-cell { white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── v2.1.0: 不具合報告 ─────────────────────────────── */
.badge.info { background: rgba(90, 169, 255, .14); color: #9cc8ff; }
.badge.rstate { height: 22px; }
.rtitle { display: flex; align-items: baseline; gap: 8px; min-width: 0; flex-wrap: wrap; }
.rtitle b { overflow-wrap: anywhere; }
.rmeta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rbody { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.6; }
.rbody.main { padding: 12px 14px; background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius-s); }
.rfiles { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rthumb { position: relative; display: block; width: 104px; height: 78px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line2); background: var(--bg2); }
.rthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rthumb .rx { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; padding: 0; }
.rthumb .rx svg { width: 12px; height: 12px; }
.sr-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.rposts { display: flex; flex-direction: column; gap: 10px; }
.rpost { border: 1px solid var(--line); border-radius: var(--radius-s); padding: 10px 12px; background: var(--panel); }
.rpost.staff { border-color: rgba(var(--accent-rgb), .4); background: var(--panel); box-shadow: inset 3px 0 0 var(--accent); }
.rpost.user { margin-left: 18px; }
.rpost.sys { border: 0; padding: 0 2px; background: none; display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
.rpost .rhead { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
textarea.rtext { font-family: var(--sans); font-size: 14px; }
@media (max-width: 720px) {
  .rpost.user { margin-left: 8px; }
  .rthumb { width: 88px; height: 66px; }
}

/* ── v2.1.0: 通貨の絵と財布 ─────────────────────────── */
/* 通貨の絵（curIcon）は線の coin / gem。線の色は通貨の色（どこに置いても同じ色に見えるように、置き場の color より強く） */
svg.cur { width: 16px; height: 16px; flex: none; overflow: visible; }
svg.cur.token { color: var(--token); }
svg.cur.shard { color: var(--shard); }
svg.cur.tiny { width: 14px; height: 14px; vertical-align: -3px; margin-right: 4px; }
.price svg.cur { width: 18px; height: 18px; }
.reward svg.cur { width: 15px; height: 15px; }
.tbl td.num svg.cur.tiny, b svg.cur.tiny { margin-right: 3px; }

/* 上の帯の財布: Token の区画｜Shard の区画 */
.who .purse {
  display: inline-flex; align-items: stretch; height: 32px; padding: 0;
  border-radius: 999px; overflow: hidden; color: var(--text);
  background: var(--panel2);
  border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .35);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.who .purse:hover { text-decoration: none; border-color: #41566f; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 6px 18px rgba(0, 0, 0, .4), 0 0 0 3px rgba(242, 201, 76, .06); }
.who .purse:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.who .purse .seg { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 6px; }
.who .purse .seg + .seg { border-left: 1px solid rgba(255, 255, 255, .07); }
.who .purse .seg.token { background: rgba(242, 201, 76, .08); }
.who .purse .seg.shard { background: rgba(183, 156, 255, .08); }
.who .purse svg.cur { width: 18px; height: 18px; }
.who .purse b { font-size: 13.5px; font-weight: 700; letter-spacing: .01em; font-variant-numeric: tabular-nums; line-height: 1; }
.who .purse .seg.token b { color: #ffe7a3; }
.who .purse .seg.shard b { color: #ddd1ff; }
/* 増えた（緑）・減った（赤）を一瞬光らせ、絵を弾ませる */
.who .purse .seg.up { animation: purse-up 1.2s ease-out; }
.who .purse .seg.down { animation: purse-down 1.2s ease-out; }
.who .purse .seg.up svg.cur, .who .purse .seg.down svg.cur { animation: purse-pop .5s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes purse-up { 0%, 25% { box-shadow: inset 0 0 0 40px rgba(69, 185, 127, .22); } 100% { box-shadow: inset 0 0 0 40px rgba(69, 185, 127, 0); } }
@keyframes purse-down { 0%, 25% { box-shadow: inset 0 0 0 40px rgba(229, 83, 75, .2); } 100% { box-shadow: inset 0 0 0 40px rgba(229, 83, 75, 0); } }
@keyframes purse-pop { 0% { transform: scale(1); } 40% { transform: scale(1.3) rotate(-8deg); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .who .purse, .who .purse .seg, .who .purse svg.cur { animation: none !important; transition: none; }
  .who .purse:hover { transform: none; }
}

/* 残高の札（ショップ・運営）: 札の頭に通貨の絵・数の後ろに淡い光 */
.stat.cur-stat { position: relative; overflow: hidden; }
.stat.cur-stat .k svg.cur { width: 18px; height: 18px; }
.stat.cur-stat.token { background: var(--panel); }
.stat.cur-stat.shard { background: var(--panel); }
.stat.cur-stat.token .v { color: #ffe7a3; }
.stat.cur-stat.shard .v { color: #ddd1ff; }

@media (max-width: 720px) {
  .who .purse { height: 30px; }
  .who .purse .seg { gap: 4px; padding: 0 9px 0 5px; }
  .who .purse svg.cur { width: 16px; height: 16px; }
  .who .purse b { font-size: 12.5px; }
}
/* ── v2.2.0: スマホは下に字の付いたタブ（上の帯は印・財布・ログアウトだけ）。
   前は上の帯に絵だけの札が 7 つ並び、虫（不具合報告）や盾（運営）が何か分からず、狭い幅では帯からはみ出していた ── */
@media (max-width: 720px) {
  /* backdrop-filter があると、中の position: fixed が帯を基準にしてしまう（下のタブが画面の下に付かない） */
  .topbar { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; justify-content: space-around; gap: 0; margin: 0;
    padding: 4px 4px calc(4px + env(safe-area-inset-bottom));
    background: var(--bg); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, .35);
  }
  .nav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; padding: 7px 2px 6px; border-radius: 10px; font-size: 10.5px; line-height: 1.2; }
  .nav a .nl { display: none; }
  .nav a .ns { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav a svg { width: 20px; height: 20px; }
  .nav a .count { position: absolute; top: 3px; right: calc(50% - 22px); }
  main { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
  #toasts { bottom: calc(76px + env(safe-area-inset-bottom)); }

  /* 押せる所は 36px 以上（割り当ての候補・書式の札・画像を外す・写す札） */
  .presets button { height: 36px; padding: 0 12px; }
  .md-tools .mdbtn { height: 36px; min-width: 40px; }
  .rthumb .rx { width: 32px; height: 32px; }
  .copy, .ip-chip { min-height: 32px; }

  /* 見出しの行: 見出しが細切れに折れないよう、札は次の段へ回す */
  .row.between > h2 { flex: 1 1 auto; min-width: min(100%, 11em); }
}
@media (max-width: 400px) {
  /* 使用量の札の見出しと値を 1 行に（「ディス／ク」「11.5 / MB」と折れていた） */
  .bar .k { white-space: nowrap; gap: 4px; }
  .bar .k span { overflow: hidden; text-overflow: ellipsis; }
  .bar .k b { font-size: 11px; }
}
@media (max-width: 360px) {
  /* 運営は下のタブが 7 つ＝1 つ 44px。4 字が切れずに入る大きさ */
  .nav a { font-size: 9.5px; letter-spacing: -.02em; }
}

/* ── v2.6.0: 落ち着いた見た目へ（飾りを減らす） ───────────────
   光る輪・グラデーション・浮き上がりをやめ、色はアクセント（コーラル）を本当に要る所だけに。
   Token と Shard の絵と色は変えない */
body { letter-spacing: .01em; }
.brand { letter-spacing: .01em; font-weight: 650; }
.brand img { border-radius: 6px; }
.nav a { font-weight: 500; }
.nav a.on { background: transparent; color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav a:hover { background: transparent; }
h2 { font-weight: 600; }
.card { box-shadow: none; }
.stat .v { font-weight: 650; }
/* 一覧の数の札の見出しの絵は飾りなので出さない（Token と Shard の札の絵は残す） */
.stat:not(.cur-stat) .k svg { display: none; }
.section-title svg { color: var(--muted); }
.btn { font-weight: 550; }
.btn.primary { font-weight: 650; }
.badge { letter-spacing: 0; }
.tabs a { font-weight: 500; }
.tabs a.on { font-weight: 600; }
.mode .ic { border-radius: 7px; }
.login .brand { gap: 12px; }
.login .box { background: var(--panel); }
.toast { border-radius: var(--radius); }
.empty svg { opacity: .45; }