:root {
  /* ロゴ（Stellaxis）の濃紺〜青〜紫から取った配色 */
  --bg: #f3f4f8;
  --surface: #ffffff;
  --surface-sub: #f8f9fc;
  --line: #e1e3ec;
  --line-strong: #cdd1de;
  --text: #171a2e;
  --muted: #646a82;
  --brand: #16267a;
  --brand-hover: #0f1b5e;
  --brand-tint: #eaedfa;
  --brand-line: linear-gradient(90deg, #1e42a2 0%, #3c6fe0 45%, #a04ef0 100%);
  --amber: #9a5b00;
  --amber-bg: #fcf0db;
  --amber-bar: #d9901f;
  --danger: #b3261e;
  --danger-bg: #fbeceb;
  --radius: 10px;
  --radius-sm: 6px;
  --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6a78' stroke-width='1.4'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1120;
    --surface: #171a2c;
    --surface-sub: #131626;
    --line: #2a2e45;
    --line-strong: #3a3f5a;
    --text: #e9ebf6;
    --muted: #9ba1bd;
    --brand: #8fa6ff;
    --brand-hover: #b0c0ff;
    --brand-tint: #20284a;
    --amber: #f0b45a;
    --amber-bg: #3a2a10;
    --amber-bar: #d9901f;
    --danger: #f08a82;
    --danger-bg: #3a1c1a;
    --caret: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23a19cb0' stroke-width='1.4'/%3E%3C/svg%3E");
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans JP", "BIZ UDPGothic", "Hiragino Sans", "Meiryo", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .brand, .title-input { font-feature-settings: "palt"; }

input, select, button { font: inherit; color: inherit; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.topbar { position: relative; height: 64px; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand-line); opacity: 0.85; }
.brand-wrap { display: flex; align-items: center; gap: 16px; min-width: 0; }
.brand { display: flex; align-items: flex-end; gap: 8px; color: inherit; text-decoration: none; }
.brand-logo { display: block; height: 40px; width: auto; }
.brand-product {
  margin-bottom: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-style: italic;
  letter-spacing: 0.06em;
  color: var(--brand);
}
.brand-tagline { padding-left: 16px; border-left: 1px solid var(--line); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; white-space: nowrap; }
@media (prefers-color-scheme: dark) {
  /* 濃紺のロゴは暗い背景では読めないため、明るい単色で表示する */
  .brand-logo { filter: brightness(0) invert(0.93); }
}

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  gap: 24px;
  max-width: 1360px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}
.main { min-width: 0; }

/* ---------- sidebar ---------- */
.sidebar { position: sticky; top: 20px; align-self: start; }
.sidebar-head { font-size: 12px; font-weight: 500; color: var(--muted); padding: 0 12px 8px; }
.gacha-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.gacha-item {
  display: grid;
  gap: 2px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: none;
  text-align: left;
  cursor: pointer;
}
.gacha-item:hover { background: rgba(22, 38, 122, 0.05); }
.gacha-item.is-active { background: var(--surface); border-color: var(--line); box-shadow: inset 3px 0 0 var(--brand); }
.gacha-item-name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gacha-item-meta { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag-out { color: var(--amber); font-weight: 500; }
.add-gacha {
  margin-top: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.add-gacha:hover { color: var(--brand); border-color: var(--brand); }

/* ---------- title bar ---------- */
.title-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.title-input {
  flex: 1;
  min-width: 0;
  max-width: 520px;
  margin-left: -9px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: none;
  font-size: 22px;
  font-weight: 700;
}
.title-input:hover { border-color: var(--line); }
.title-input:focus { outline: none; border-color: var(--brand); background: var(--surface); }
.title-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ---------- panels ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; overflow: hidden; }
.grid-2 > .panel { margin-bottom: 0; }
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 8px 16px;
  border-bottom: 1px solid var(--line);
}
.panel-head h2 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-meta { font-size: 12px; color: var(--muted); text-align: right; }
.panel-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.panel-body { padding: 16px; }
.panel-foot { padding: 10px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover { background: var(--surface-sub); border-color: var(--muted); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-ghost { border-color: transparent; background: none; }
.btn-ghost:hover { background: var(--surface-sub); border-color: transparent; }
.btn-danger-text { color: var(--danger); }
.btn-danger-text:hover:not(:disabled) { background: var(--danger-bg); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
@media (prefers-color-scheme: dark) { .btn-primary { color: #17161c; } }
.btn-block { width: 100%; height: 42px; font-size: 15px; font-weight: 700; letter-spacing: 0.04em; }
.btn-primary.is-test { background: var(--surface); color: var(--brand); border: 1px dashed var(--brand); }
.btn-primary.is-test:hover { background: var(--brand-tint); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); cursor: pointer; width: fit-content; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--brand); }
.test-badge { display: inline-block; margin-right: 8px; padding: 1px 6px; border: 1px dashed var(--brand); border-radius: 4px; color: var(--brand); font-weight: 700; }

.draw-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.field input, .input-sm, .input-xs {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.input-sm { height: 28px; width: 200px; font-size: 12.5px; }
.input-xs { height: 26px; width: 52px; padding: 0 6px; text-align: right; font-size: 12.5px; }
.field input:focus, .input-sm:focus, .input-xs:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint); }
.inline-field { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.count-row { display: flex; gap: 8px; }
.count-row input { width: 110px; text-align: right; font-variant-numeric: tabular-nums; }
.presets { display: flex; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); overflow: hidden; }
.preset { height: 34px; padding: 0 12px; border: 0; border-left: 1px solid var(--line-strong); background: var(--surface); font-size: 13px; cursor: pointer; }
.preset:first-child { border-left: 0; }
.preset:hover { background: var(--surface-sub); }
.preset.is-active { background: var(--brand-tint); color: var(--brand); font-weight: 700; }

/* ---------- tables ---------- */
.table-wrap { position: relative; overflow-x: auto; } /* 中の見えない補助テキストが外にはみ出して、ページが横に広がらないように */
.table { width: 100%; border-collapse: collapse; }
/* 狭い画面では列を潰さず、表ごと横スクロールさせる */
/* 景品表は列幅を固定し、残りの幅をすべて景品名に回す */
.table-prizes { min-width: 900px; table-layout: fixed; }
.table-prizes .w-prob { width: 70px; }
.table-rarity { min-width: 420px; }
.table-users { min-width: 560px; }
.online-off .table-users { min-width: 420px; }
.table-history { min-width: 600px; }
.table th {
  padding: 8px 10px;
  background: var(--surface-sub);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.table th.num { text-align: right; }
.table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table-edit td { padding: 4px 6px; }
.table-edit td.num, .table-edit td.plain { padding: 4px 10px; }
.empty-row td { padding: 20px 16px !important; color: var(--muted); text-align: center; font-size: 13px; }

.w-rarity { width: 88px; }
.w-no { width: 44px; }
.col-check { width: 34px; text-align: center; }
.col-check input { width: 15px; height: 15px; margin: 0; accent-color: var(--brand); vertical-align: middle; }
.w-type { width: 104px; }
.w-stock { width: 70px; }
.w-remain { width: 106px; }
.w-drawn { width: 54px; }
.w-file { width: 148px; }
.w-memo { width: 100px; }
.w-action { width: 40px; }
.w-swatch { width: 44px; }
.w-prob { width: 76px; }
.w-count { width: 80px; }
.w-seq { width: 52px; }
.w-date { width: 104px; }
.w-user { width: 120px; min-width: 96px; }
.table td.num { white-space: nowrap; }

/* 入力できる欄は、マウスを乗せなくても入力欄だとわかるよう常に枠を表示する */
.cell-input, .cell-select {
  width: 100%;
  height: 30px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--surface);
}
.cell-input.num { text-align: right; }
.cell-select { appearance: none; padding-right: 22px; background: var(--surface) var(--caret) no-repeat right 7px center; cursor: pointer; }
.cell-input:hover, .cell-select:hover { border-color: var(--muted); }
.cell-input:focus, .cell-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-tint); }
.cell-input::placeholder { color: var(--muted); opacity: 0.7; }
.cell-input::-webkit-inner-spin-button, .cell-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.cell-input[type="number"] { -moz-appearance: textfield; }

.swatch { width: 26px; height: 22px; padding: 0; border: 1px solid var(--line-strong); border-radius: 4px; background: none; cursor: pointer; }
.swatch::-webkit-color-swatch-wrapper { padding: 2px; }
.swatch::-webkit-color-swatch { border: 0; border-radius: 2px; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { color: var(--danger); background: var(--danger-bg); }
.icon-btn svg { width: 16px; height: 16px; }

/* ---------- stock ---------- */
.stock { display: flex; align-items: center; gap: 10px; padding-left: 4px; }
.stock-figure { display: grid; gap: 3px; min-width: 64px; }
.stock-num { font-variant-numeric: tabular-nums; font-weight: 700; }
.stock-num small { font-weight: 400; color: var(--muted); font-size: 12px; }
.stock-bar { display: block; width: 64px; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.stock-bar > span { display: block; height: 100%; background: var(--brand); }
.stock.is-low .stock-num { color: var(--amber); }
.stock.is-low .stock-bar > span { background: var(--amber-bar); }
.stock.is-out .stock-num { color: var(--danger); }
.stock-label { font-size: 11px; font-weight: 700; color: var(--danger); }
.link-btn { padding: 0; border: 0; background: none; color: var(--brand); font-size: 12px; cursor: pointer; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; text-underline-offset: 2px; }
.link-muted { color: var(--muted); }

/* ---------- digital file ---------- */
.file { display: flex; align-items: center; gap: 8px; min-width: 0; padding-left: 4px; }
.file-name {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 12.5px;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.file-name:hover { text-decoration: underline; text-underline-offset: 2px; }
.file-count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.file-count.is-full { color: var(--amber); font-weight: 700; }

/* ---------- rarity chip ---------- */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  flex-shrink: 0;
}
.chip-sm { min-width: 28px; height: 18px; font-size: 10.5px; padding: 0 4px; }

/* ---------- result ---------- */
.result-list { list-style: none; margin: 0; padding: 0 4px 0 0; max-height: 330px; overflow-y: auto; }
.result-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.result-row:last-child { border-bottom: 0; }
.result-name { flex: 1; min-width: 0; font-weight: 500; }
.result-count { font-variant-numeric: tabular-nums; font-weight: 700; }
.notice { margin-bottom: 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--amber-bg); color: var(--amber); font-size: 13px; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 16px 8px 8px; color: var(--muted); font-size: 13px; text-align: center; }
.empty img { width: 88px; height: auto; }

/* ---------- history / stats ---------- */
.tags { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.tag b { font-variant-numeric: tabular-nums; }

/* ---------- online ---------- */
.online-off .is-online-only { display: none; }
.account { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.account-name { color: var(--muted); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.publish-bar {
  display: flex;
  align-items: center;
  gap: 10px 14px;
  flex-wrap: wrap;
  margin: -4px 0 16px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
}
.publish-label { font-weight: 700; }
.publish-url { color: var(--brand); font-variant-numeric: tabular-nums; word-break: break-all; }
.sync-status { margin-left: auto; font-size: 12px; color: var(--muted); }
.sync-status.is-error { color: var(--danger); }
.w-dist { width: 150px; }
.dist-actions { display: flex; align-items: center; gap: 10px; }
.w-row-actions { width: 84px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }

/* ---------- listener pages ---------- */
.public-main { max-width: 860px; margin: 0 auto; padding: 28px 20px 56px; }
.public-hero { margin-bottom: 18px; }
.public-hero h1 { margin: 2px 0 4px; font-size: 24px; font-weight: 700; font-feature-settings: "palt"; }
.public-hero p { margin: 0; font-size: 13px; }
.public-kicker { color: var(--brand); font-weight: 700; }
.public-message { display: grid; justify-items: center; gap: 6px; padding: 48px 16px; text-align: center; }
.public-message h1 { margin: 8px 0 0; font-size: 18px; }
.public-message p { margin: 0; color: var(--muted); font-size: 13px; }
.result-list-open { max-height: none; overflow: visible; }
.result-list small { font-weight: 400; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .grid-2 > .panel { margin-bottom: 0; }
}
@media (max-width: 820px) {
  .topbar { padding: 0 16px; }
  .brand-tagline { display: none; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 16px 16px 40px; }
  .sidebar { position: static; }
  .gacha-list { display: flex; flex-wrap: wrap; gap: 6px; }
  .gacha-item { width: auto; padding: 6px 12px; border-color: var(--line); background: var(--surface); }
  .gacha-item-meta { display: none; }
  .add-gacha { width: auto; }
  .title-input { font-size: 19px; }
  .panel-head { flex-wrap: wrap; }
  .input-sm { width: 150px; }
}

/* ---------- footer ---------- */
.site-footer { display: grid; justify-items: center; gap: 2px; padding: 28px 16px 36px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; letter-spacing: 0.04em; }
.site-footer-name { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 14px; color: var(--brand); }
.footer-links { display: flex; gap: 16px; margin-top: 6px; }
.footer-links a, .legal a, .consent a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-links a:hover, .legal a:hover, .consent a:hover { color: var(--brand); }
.legal { max-width: 760px; line-height: 1.85; font-size: 14px; }
.legal h1 { margin: 0 0 4px; font-size: 24px; }
.legal h2 { margin: 28px 0 8px; font-size: 16px; }
.legal p { margin: 0 0 10px; }
.legal ol { margin: 0 0 10px; padding-left: 1.6em; }
.legal li { margin-bottom: 4px; }
.legal-date { color: var(--muted); font-size: 13px; }
.legal-links { margin-top: 32px !important; }
.consent { font-size: 11.5px; color: var(--muted); }
.move-notice { margin-bottom: 16px; padding: 10px 14px; }
.move-notice a { color: inherit; font-weight: 700; text-decoration: underline; }
.result-actions { display: flex; justify-content: flex-end; margin-top: 12px; }
.btn-x { gap: 8px; height: 36px; padding: 0 18px; font-size: 14px; background: #000; border-color: #000; color: #fff; font-weight: 700; }
.btn-x:hover { background: #272727; border-color: #272727; }
.btn-x svg { width: 15px; height: 15px; }
@media (prefers-color-scheme: dark) { .btn-x { border-color: #5a5f73; } }
.cloud-status { font-size: 12px; color: var(--muted); white-space: nowrap; }
.cloud-status.is-error { color: var(--danger); }
@media (max-width: 820px) { .cloud-status { display: none; } }

/* ---------- prize list (grouped) ---------- */
.panel-count { margin-left: 6px; font-size: 12px; font-weight: 500; color: var(--muted); }
.group-row td { padding: 8px 12px !important; background: var(--surface-sub); border-bottom: 1px solid var(--line); }
.group-head { display: flex; align-items: center; gap: 12px; font-size: 12.5px; }
.group-count { font-weight: 700; }
.table-prizes tr.is-selected td { background: var(--brand-tint); }

.panel-hint { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--line); font-size: 12.5px; line-height: 1.7; color: var(--muted); }
.bulk-help { margin: 0; font-size: 12.5px; color: var(--text); }
.bulk-add { display: grid; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-sub); }
.bulk-add-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.bulk-add .field select, .bulk-add .field .input-sm { height: 32px; }
.bulk-add .input-name { width: 220px; }
.bulk-add .input-count { width: 90px; text-align: right; }
.bulk-add textarea { width: min(520px, 100%); padding: 8px 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); font: inherit; resize: vertical; }
.bulk-preview, .bulk-note { margin: 0; font-size: 12.5px; color: var(--muted); }
.bulk-actions { display: flex; gap: 8px; }

.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--brand-tint); font-size: 12.5px; }
.bulk-count { font-weight: 700; color: var(--brand); margin-right: 4px; }
.bulk-bar .inline-field { color: var(--text); }

/* ---------- listener pages: prize tables ---------- */
.public-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 12.5px; }
.draw-block { margin-bottom: 14px; }
.draw-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-sub); }
.draw-no { font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.draw-user { font-size: 15px; font-weight: 700; }
.draw-count { font-weight: 700; color: var(--brand); }
.draw-date { margin-left: auto; font-size: 12px; color: var(--muted); }
.prize-list td { padding: 7px 12px; }
.prize-list .rarity-cell { width: 88px; text-align: center; vertical-align: middle; border-right: 1px solid var(--line); background: var(--surface); }
.prize-list tbody tr:last-child td { border-bottom: 0; }
.prize-name-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.count-cell { font-weight: 700; }
.new-badge { flex-shrink: 0; padding: 1px 6px; border-radius: 4px; background: var(--brand-line); color: #fff; font-size: 10.5px; font-weight: 700; letter-spacing: 0.06em; }
.dl-link { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 500; text-decoration: none; }
.dl-link:hover span { text-decoration: underline; text-underline-offset: 2px; }
.dl-link svg { width: 16px; height: 16px; flex-shrink: 0; }

/* リスナー向けページの景品表: スマホでは景品名の欄を広く取る */
.prize-name-cell > span, .prize-name-cell > .dl-link { min-width: 0; }
@media (max-width: 600px) {
  .prize-list th, .prize-list td { padding: 6px 8px; }
  .prize-list .w-rarity, .prize-list .rarity-cell { width: 58px; }
  .prize-list .w-no { width: 34px; }
  .prize-list .w-count { width: 54px; }
  .prize-name-cell { flex-wrap: wrap; gap: 2px 6px; }
  .prize-name-cell > span:not(.new-badge), .prize-name-cell > .dl-link { flex: 1 1 7em; }
}

/* スマホで入力欄をタップしたときに、画面が自動で拡大されないよう16px以上にする */
@media (max-width: 820px) {
  input:not([type="checkbox"]):not([type="color"]), select:not([multiple]), textarea:not([hidden]) { font-size: 16px; }
}
