:root {
  --bg: #0a0c0f;
  --panel: #12161b;
  --panel-2: #171d23;
  --line: #2a333d;
  --line-strong: #465361;
  --text: #e8edf2;
  --muted: #9da9b4;
  --accent: #b99454;
  --accent-2: #d5b87b;
  --danger: #c86363;
  --ok: #78a983;
  --warning: #caa764;
  --input: #0d1115;
  --shadow: 0 12px 34px rgba(0, 0, 0, .28);
  font-family: "Yu Gothic UI", "Yu Gothic", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(185, 148, 84, .08), transparent 32rem),
    linear-gradient(180deg, #0d1014 0, var(--bg) 24rem);
  line-height: 1.65;
}
button, input, select, textarea { font: inherit; }
button, .file-button, .button-link {
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: .68rem 1rem;
  color: #16120b;
  background: var(--accent-2);
  font-weight: 700;
  cursor: pointer;
  transition: transform .14s ease, filter .14s ease, border-color .14s ease;
}
button:hover, .file-button:hover, .button-link:hover { filter: brightness(1.08); transform: translateY(-1px); }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .file-button:focus-within, .button-link:focus-visible {
  outline: 3px solid rgba(213, 184, 123, .35);
  outline-offset: 2px;
}
button.secondary, .button-link.secondary { color: var(--text); background: #1d252d; border-color: var(--line-strong); }
button.ghost, .button-link.ghost { background: transparent; }
button.danger, .button-link.danger { color: #ffdede; border-color: rgba(200, 99, 99, .72); }
button:disabled { opacity: .48; cursor: not-allowed; transform: none; }
.button-link { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
a { color: #d9c08b; text-underline-offset: .18em; }
a:hover { color: #f0d99f; }

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: center;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 3rem) 1.25rem;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: .035em; }
h1 { font-size: clamp(1.55rem, 3vw, 2.45rem); }
h2 { font-size: clamp(1.35rem, 2.4vw, 1.95rem); }
h3 { font-size: 1rem; }
.eyebrow { margin: 0 0 .2rem; color: var(--accent-2); font-size: .74rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.subhead { margin: .35rem 0 0; color: var(--muted); font-size: .9rem; }
.header-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; }

.privacy-banner {
  max-width: 1380px;
  margin: 0 auto 1rem;
  padding: .85rem 1rem;
  border: 1px solid rgba(120, 169, 131, .42);
  border-radius: 9px;
  background: rgba(120, 169, 131, .08);
  color: #cfe4d3;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: .35rem;
  overflow-x: auto;
  max-width: 1440px;
  margin: 0 auto;
  padding: .75rem clamp(1rem, 4vw, 3rem);
  background: rgba(10, 12, 15, .94);
  border-block: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.tab {
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  border-radius: 6px;
  padding: .55rem .8rem;
}
.tab.active { color: #15110b; background: var(--accent-2); border-color: var(--accent-2); }

main { max-width: 1440px; margin: 0 auto; padding: 1.3rem clamp(1rem, 4vw, 3rem) 4rem; }
.panel {
  display: none;
  padding: clamp(1rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(23, 29, 35, .96), rgba(17, 21, 26, .98));
  box-shadow: var(--shadow);
}
.panel.active { display: block; }
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  align-items: end;
  margin-bottom: 1.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.section-heading > p { max-width: 54rem; margin: 0; color: var(--muted); }

label { display: grid; gap: .35rem; color: #c9d1d8; font-size: .89rem; font-weight: 700; }
.field-note, .table-note { color: var(--muted); font-size: .76rem; font-weight: 500; line-height: 1.45; }
.table-note { display: inline-block; min-width: 12rem; margin-top: .18rem; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  padding: .65rem .72rem;
  color: var(--text);
  background: var(--input);
}
input[type="checkbox"], input[type="radio"] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }
#heresy-custom[readonly] { cursor: default; border-style: dashed; background: rgba(255, 255, 255, .035); }
select[size] { min-height: 12rem; }
.form-grid { display: grid; gap: 1rem; }
.two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.four-col { grid-template-columns: 2fr 1fr 1fr auto; align-items: end; }
.span-2 { grid-column: span 2; }
.heresy-box { margin: 1.2rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(0, 0, 0, .18); }
.checkbox-line { display: flex; align-items: center; gap: .6rem; }

.toolbar { display: flex; align-items: end; gap: .75rem; margin: 1rem 0; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar .grow { flex: 1 1 16rem; }
.compact { grid-template-columns: auto 7rem; align-items: center; }
.counter-card { padding: .55rem .8rem; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-2); }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; }
.stat-card { padding: .9rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.16); }
.stat-card header { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .4rem; }
.stat-card code { color: var(--accent-2); font-weight: 800; }
.stat-card small { color: var(--muted); }
.stat-card input { font-size: 1.18rem; font-weight: 800; text-align: center; }
.stat-card.hat, .stat-card.pgn { border-color: rgba(185, 148, 84, .46); }

.derived-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; margin-top: 1.2rem; }
.derived-card { padding: .85rem; border-left: 3px solid var(--accent); background: #0e1318; }
.derived-card span { display: block; color: var(--muted); font-size: .78rem; }
.derived-card strong { display: block; margin-top: .15rem; font-size: 1.12rem; }

.benefit-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .85rem; margin-top: 1rem; }
.benefit-card { padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.17); }
.benefit-card h3 { color: var(--accent-2); }
.benefit-card p { margin: .55rem 0 0; color: #c9d1d8; }

.skill-summary, .inventory-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.skill-summary > div, .inventory-summary > div { padding: .85rem; border: 1px solid var(--line); border-radius: 8px; background: #0e1318; }
.skill-summary span, .inventory-summary span { display: block; color: var(--muted); font-size: .78rem; }
.skill-summary strong, .inventory-summary strong { font-size: 1.05rem; }
.custom-skill-labels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin: 1rem 0; }

.table-wrap { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--line); border-radius: 9px; }
table { width: 100%; border-collapse: collapse; background: rgba(8, 11, 14, .45); }
th, td { border-bottom: 1px solid var(--line); padding: .58rem .55rem; text-align: left; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 2; color: #d5dde4; background: #1b2229; font-size: .78rem; white-space: nowrap; }
td { font-size: .84rem; }
tbody tr:hover { background: rgba(185, 148, 84, .045); }
td.numeric, th.numeric { text-align: right; }
.skill-table input[type="number"] { min-width: 4.2rem; padding: .4rem; text-align: right; }
.skill-table input.growth-readonly {
  cursor: default;
  color: #c6cdd3;
  border-style: dashed;
  background: rgba(255, 255, 255, .035);
  appearance: textfield;
}
.skill-table input.growth-readonly::-webkit-inner-spin-button,
.skill-table input.growth-readonly::-webkit-outer-spin-button { appearance: none; margin: 0; }
.growth-readonly-cell { position: relative; }
.skill-name { min-width: 9rem; font-weight: 800; }
.skill-category { color: var(--muted); white-space: nowrap; }
.skill-final { font-size: .98rem; color: #fff; font-weight: 900; }
.essence-value { color: var(--accent-2); font-weight: 900; }
.row-hidden { display: none; }

.rule-note { margin-top: 1.2rem; padding: 1rem; border: 1px solid rgba(185, 148, 84, .5); border-radius: 9px; background: rgba(185, 148, 84, .07); }
.rule-note h3 { color: var(--accent-2); }
.rule-note p { margin: .45rem 0 0; }

.inventory-add-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.add-card, .custom-item-box, .data-actions article { padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.15); }
.add-card h3, .custom-item-box h3, .data-actions h3 { margin-bottom: .7rem; color: var(--accent-2); }
.inline-fields { display: grid; grid-template-columns: 8rem auto; align-items: end; gap: .7rem; margin-top: .7rem; }
.custom-item-box { margin-top: 1rem; }
.inventory-table input[type="number"] { width: 4.8rem; padding: .4rem; }
.inventory-table .remove-item { padding: .35rem .55rem; }
.inventory-table .palette-check { width: 1.2rem; height: 1.2rem; }

.inventory-skill-options {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .8rem;
  margin: .45rem 0 0;
  padding: .45rem .6rem .55rem;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.inventory-skill-options legend {
  padding: 0 .35rem;
  color: var(--muted);
  font-size: .78rem;
}
.checkbox-line.compact { gap: .35rem; font-size: .88rem; }
#custom-item-skill[multiple] { min-height: 12rem; }
#custom-item-skill-note { display: block; margin-top: .35rem; }
.over-cap { color: #ffd2d2 !important; }

.palette-filter { display: grid; gap: .55rem; padding: 1rem; border: 1px solid var(--line); border-radius: 9px; }
.palette-filter label { display: flex; align-items: center; gap: .55rem; font-weight: 600; }
.palette-output { min-height: 34rem; font-family: Consolas, "SFMono-Regular", monospace; line-height: 1.45; white-space: pre; }
.small-note { color: var(--muted); font-size: .84rem; }

.data-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.data-actions p { color: var(--muted); }
.file-button { display: inline-flex; align-items: center; justify-content: center; }
.file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.messages { margin-top: .85rem; }
.message { margin: .35rem 0; padding: .65rem .8rem; border-left: 3px solid var(--line-strong); background: rgba(255,255,255,.035); }
.message.error { border-color: var(--danger); color: #ffd0d0; }
.message.warning { border-color: var(--warning); color: #ffe3a8; }
.message.ok { border-color: var(--ok); color: #cce7d2; }

footer { max-width: 1440px; margin: 0 auto; padding: 0 clamp(1rem, 4vw, 3rem) 3rem; color: var(--muted); font-size: .8rem; }
footer p { margin: .2rem 0; }

@media (max-width: 980px) {
  .site-header, .section-heading { align-items: flex-start; flex-direction: column; }
  .header-actions { justify-content: flex-start; }
  .stat-grid, .derived-grid, .skill-summary, .inventory-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-col, .benefit-grid, .data-actions { grid-template-columns: 1fr; }
  .four-col { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .two-col, .custom-skill-labels, .inventory-add-grid, .stat-grid, .derived-grid, .skill-summary, .inventory-summary, .four-col { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .compact { grid-template-columns: 1fr; }
  .inline-fields { grid-template-columns: 1fr; }
  main { padding-inline: .65rem; }
  .panel { border-radius: 8px; padding: 1rem .75rem; }
}

/* サイトの使い方ページ */
.help-main { max-width: 1180px; padding-bottom: 4rem; }
.help-panel { display: block; }
.help-lead { max-width: 56rem; margin: 0; color: #cbd3da; }
.help-layout { display: grid; grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.help-toc {
  position: sticky;
  top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(10, 14, 18, .88);
}
.help-toc h2 { margin-bottom: .65rem; font-size: 1rem; color: var(--accent-2); }
.help-toc ol { margin: 0; padding-left: 1.25rem; }
.help-toc li + li { margin-top: .35rem; }
.help-toc a { color: #cfd7de; }
.help-toc-link, .text-link {
  display: inline;
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #cfd7de;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: .18em;
  cursor: pointer;
}
.help-toc-link:hover, .text-link:hover {
  color: #f0d99f;
  background: transparent;
  filter: none;
  transform: none;
}
.help-toc-link:focus-visible, .text-link:focus-visible {
  outline: 3px solid rgba(213, 184, 123, .35);
  outline-offset: 3px;
}
#help-view .privacy-banner { margin-top: 0; }
body.help-view-active .last-updated-line { visibility: hidden; }

.help-content { display: grid; gap: 1rem; min-width: 0; }
.help-section {
  scroll-margin-top: 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .16);
}
.help-section h2 { margin-bottom: .75rem; color: var(--accent-2); font-size: 1.2rem; }
.help-section h3 { margin: 1rem 0 .35rem; color: #e7d4aa; }
.help-section p { margin: .55rem 0; }
.help-section ul, .help-section ol { margin: .55rem 0; padding-left: 1.4rem; }
.help-section li + li { margin-top: .35rem; }
.help-note {
  margin: .8rem 0;
  padding: .8rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(185, 148, 84, .08);
}
.help-note.important { border-color: var(--warning); color: #f3dfb6; }
.help-note.safe { border-color: var(--ok); color: #cfe4d3; }
.help-steps { counter-reset: help-step; display: grid; gap: .7rem; padding: 0; list-style: none; }
.help-steps > li {
  counter-increment: help-step;
  position: relative;
  min-height: 2.4rem;
  padding: .65rem .75rem .65rem 3.15rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1318;
}
.help-steps > li::before {
  content: counter(help-step);
  position: absolute;
  left: .75rem;
  top: .62rem;
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  color: #17120b;
  background: var(--accent-2);
  font-weight: 900;
}
.help-table { width: 100%; border-collapse: collapse; }
.help-table th, .help-table td { padding: .7rem .75rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.help-table th { width: 12rem; color: var(--accent-2); background: #111820; }
.help-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.help-actions .button-link { min-width: 11rem; }
.help-code { font-family: Consolas, "SFMono-Regular", monospace; overflow-wrap: anywhere; }

@media (max-width: 820px) {
  .help-layout { grid-template-columns: 1fr; }
  .help-toc { position: static; }
  .help-table th { width: auto; }
}
@media (max-width: 560px) {
  .help-table, .help-table tbody, .help-table tr, .help-table th, .help-table td { display: block; width: 100%; }
  .help-table tr + tr { margin-top: .7rem; }
  .help-table th { border-bottom: 0; }
}

@media print {
  .tabs, .header-actions, .privacy-banner, footer, button, .button-link, .toolbar, .inventory-add-grid, .custom-item-box { display: none !important; }
  body { color: #000; background: #fff; }
  .site-header, main { max-width: none; padding: 0; }
  .panel { display: block !important; box-shadow: none; border: 0; background: #fff; page-break-after: always; }
  input, select, textarea { color: #000; background: #fff; border-color: #999; }
  table, th { color: #000; background: #fff; }
}


/* 技能値上限超過の可視化 */
.skill-over-cap > td { background: rgba(177, 63, 63, .18); }
.skill-points-added > td { background: rgba(46, 145, 88, .15); }
.skill-benefit-added > td { background: rgba(190, 151, 45, .15); }
.skill-points-added:hover > td { background: rgba(46, 145, 88, .23); }
.skill-benefit-added:hover > td { background: rgba(190, 151, 45, .23); }
.skill-over-cap:hover > td { background: rgba(177, 63, 63, .25); }
.skill-over-cap .skill-final, .skill-over-cap .skill-name { color: #ffd2d2; }
.skill-over-cap input { border-color: rgba(225, 111, 111, .72); background: rgba(92, 28, 28, .22); }
.excel-import-card { grid-column: 1 / -1; }
.import-report { white-space: pre-wrap; }


/* v0.3.0: 管理機能・オリジナル要素 */
.last-updated-line { margin-top: .35rem; color: var(--muted); font-size: .86rem; }
.original-skill-box { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.15); }
.original-skill-box h3 { color: var(--accent-2); margin-bottom: .45rem; }
.original-skill-form { display: grid; grid-template-columns: minmax(14rem, 2fr) minmax(11rem, 1fr) auto; gap: .75rem; align-items: end; margin-top: .8rem; }
.skill-table { border-collapse: separate; border-spacing: 0; }
.skill-group-heading td {
  padding: .65rem .8rem .45rem;
  color: var(--accent-2);
  font-weight: 900;
  letter-spacing: .08em;
  background: #111820;
  border-top: 2px solid rgba(189, 158, 92, .62);
  border-left: 2px solid rgba(189, 158, 92, .62);
  border-right: 2px solid rgba(189, 158, 92, .62);
  border-radius: 10px 10px 0 0;
}
.skill-group-heading:not(:first-child) td { border-top-width: 2px; }
.skill-category-grouped > td:first-child { border-left: 2px solid rgba(189, 158, 92, .62); }
.skill-category-grouped > td:last-child { border-right: 2px solid rgba(189, 158, 92, .62); }
.skill-category-end > td { border-bottom: 2px solid rgba(189, 158, 92, .62); padding-bottom: .7rem; }
.skill-category-end > td:first-child { border-radius: 0 0 0 10px; }
.skill-category-end > td:last-child { border-radius: 0 0 10px 0; }
.skill-group-heading.row-hidden { display: none; }
.skill-group-heading + .skill-group-row td { padding-top: .65rem; }
.skill-category-end + .skill-group-heading td { border-top: 12px solid #0f1419; box-shadow: inset 0 2px rgba(189, 158, 92, .62); }
.skill-action { text-align: center; min-width: 4.8rem; }
.compact-button { padding: .35rem .55rem; white-space: nowrap; }
.custom-item-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.custom-item-primary-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.custom-item-skill-field { grid-column: 1 / -1; }
#custom-item-skill:not([multiple]) { min-height: 0; height: auto; }
.management-card { margin: 1rem 0; padding: 1rem; border: 1px solid var(--line); border-radius: 9px; background: rgba(0,0,0,.15); }
.management-card h3 { color: var(--accent-2); margin-bottom: .35rem; }
.record-add-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; align-items: end; margin-top: .85rem; }
.record-add-grid.six-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.record-add-grid.report-fields { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.record-add-grid label.wide, .record-add-grid .wide { grid-column: span 2; }
.management-table input, .management-table textarea { min-width: 7rem; padding: .4rem; }
.management-table textarea { min-width: 14rem; resize: vertical; }
.management-table-wrap { margin-top: .85rem; }
.management-table td { vertical-align: top; }

@media (max-width: 980px) {
  .custom-item-grid, .record-add-grid, .record-add-grid.six-fields, .record-add-grid.report-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .original-skill-form { grid-template-columns: 1fr 1fr; }
  .original-skill-form button { grid-column: 1 / -1; }
}
@media (max-width: 680px) {
  .custom-item-grid, .record-add-grid, .record-add-grid.six-fields, .record-add-grid.report-fields, .original-skill-form { grid-template-columns: 1fr; }
  .custom-item-primary-row { grid-template-columns: 1fr; }
  .record-add-grid label.wide, .record-add-grid .wide { grid-column: auto; }
}
@media print {
  .original-skill-box, .management-card [data-record-form] { display: none !important; }
}


.stat-threshold-section, .inventory-copy-box {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0,0,0,.15);
}
.stat-threshold-section h3, .inventory-copy-box h3 { color: var(--accent-2); margin-bottom: .65rem; }
.threshold-benefit-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.threshold-benefit-card { padding: .75rem; border: 1px solid rgba(189, 158, 92, .32); border-radius: 8px; background: rgba(189, 158, 92, .07); }
.threshold-benefit-card strong { color: #f1d99d; }
.threshold-benefit-card p { margin: .35rem 0 0; color: #d2d8de; }
.inventory-copy-output { width: 100%; min-height: 14rem; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.management-subtabs { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; padding: .55rem; border: 1px solid var(--line); border-radius: 10px; background: rgba(0,0,0,.16); }
.management-subtab { background: #161d24; border-color: #36424d; color: #cbd3da; }
.management-subtab.active { background: var(--accent); border-color: var(--accent-2); color: #0a0c0e; }
.management-subpanel { display: none; }
.management-subpanel.active { display: block; }
.growth-apply-status { white-space: nowrap; color: #b8d9be; font-weight: 800; }
.management-table select { min-width: 10rem; }
@media (max-width: 760px) {
  .threshold-benefit-grid { grid-template-columns: 1fr; }
  .management-subtabs { display: grid; grid-template-columns: 1fr 1fr; }
}

/* v0.5.0: 自由記入チャットパレット・ココフォリア連携 */
.palette-section-grid { display: grid; gap: 1rem; }
.palette-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .15);
}
.palette-card h3 { margin-bottom: .75rem; color: var(--accent-2); }
.palette-extra-option {
  margin-top: .8rem;
  padding: .7rem .8rem;
  border: 1px solid rgba(189, 158, 92, .32);
  border-radius: 8px;
  background: rgba(189, 158, 92, .06);
  font-weight: 700;
}
.custom-palette-input {
  width: 100%;
  min-height: 12rem;
  margin-top: .75rem;
  font-family: Consolas, "SFMono-Regular", monospace;
  line-height: 1.45;
}
.palette-output[readonly] {
  cursor: default;
  border-style: dashed;
  background: rgba(255, 255, 255, .03);
}
.ccfolia-card { border-color: rgba(98, 153, 193, .48); }
.ccfolia-card h3 { color: #a9d5ef; }
.ccfolia-palette-output { min-height: 30rem; }
.palette-card code { color: #d7e8f4; }

@media print {
  .custom-palette-card, .ccfolia-card { display: none !important; }
}


/* v0.5.1: チャットパレット内部タブ */
.palette-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin: 1rem 0;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, .16);
}
.palette-subtab { background: #161d24; border-color: #36424d; color: #cbd3da; }
.palette-subtab.active { background: var(--accent); border-color: var(--accent-2); color: #0a0c0e; }
.palette-subpanel { display: none; }
.palette-subpanel.active { display: block; }
@media (max-width: 760px) {
  .palette-subtabs { display: grid; grid-template-columns: 1fr; }
}


/* 期間限定β版の案内 */
.beta-notice {
  max-width: 1380px;
  margin: 0 auto 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(202, 167, 100, .62);
  border-left: 4px solid var(--warning);
  border-radius: 9px;
  background: rgba(202, 167, 100, .09);
  color: #f1dfb8;
}

.beta-notice-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .45rem .8rem;
}

.beta-notice-heading strong {
  color: #ffe2a6;
  font-size: 1.05rem;
}

.beta-notice-heading span {
  color: var(--muted);
  font-size: .82rem;
}

.beta-notice p {
  margin: .55rem 0;
}

.beta-notice ul {
  margin: .45rem 0 0;
  padding-left: 1.3rem;
}

.beta-notice li + li {
  margin-top: .2rem;
}

@media (max-width: 680px) {
  .beta-notice {
    margin-inline: .65rem;
    padding: .85rem;
  }
}
