:root {
  color-scheme: dark;
  --bg-dark: #000;
  --bg-card: #0a0a0a;
  --orange: #ff7a28;
  --orange-light: #ffab74;
  --text-main: var(--orange);
  --text-muted: var(--orange-light);
  --border: #984616;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; color: var(--text-main); font: 1rem/1.55 'DM Sans', sans-serif;
  background: var(--bg-dark);
  min-height: 100vh;
}
.shell { max-width: 1050px; margin: auto; padding: 0 clamp(16px, 4vw, 48px); }
.actions { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
header { justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--border); }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--orange); text-decoration: none; font: 600 1.45rem 'Playfair Display', Georgia, serif; }
.brand img { border-radius: 12px; }
nav { margin: 1.25rem 0; }
nav button[aria-current="page"] { background: #281208; border-color: var(--orange); color: var(--orange-light); }
main { padding: 1.45rem 0 2rem; }
h1, h2, h3, p { margin: 0 0 .65rem; }
h1 { font: 400 clamp(2.5rem, 6vw, 4.5rem)/1.08 'Playfair Display', Georgia, serif; color: var(--orange); }
h2 { font: 600 1.6rem 'Playfair Display', Georgia, serif; color: var(--orange); }
h3 { font-size: 1.1rem; }
p, small, footer { color: var(--text-muted); }
button, .button, input, select { font: inherit; border-radius: 11px; min-height: 44px; }
button, .button {
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; text-decoration: none;
  padding: .55rem .9rem; background: var(--orange-light); border: 1px solid var(--orange-light); color: #000; font-weight: 800;
}
.quiet { background: transparent; border: 1px solid var(--border); color: var(--text-main); }
button:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
label { display: grid; gap: .3rem; font-weight: 700; }
label.check { display: flex; align-items: center; gap: .7rem; min-height: 44px; }
input, select { padding: .55rem .7rem; width: 100%; min-width: 0; color: var(--text-main); background: #000; border: 1px solid var(--border); }
input[type="checkbox"] { accent-color: var(--orange); width: 1.1rem; min-height: 0; height: 1.1rem; flex: none; }
form, .stack { display: grid; gap: .9rem; }
.panel { padding: clamp(1rem, 3vw, 1.7rem); border: 1px solid var(--border); border-radius: 20px; background: var(--bg-card); }
.auth { max-width: 490px; margin: 1.5rem auto; }
.auth .actions { margin-bottom: 1rem; }
.hero { margin-bottom: 1.45rem; }
.columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: .9rem; }
.row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .55rem; padding: .65rem 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; }
.ticket-lines { color: var(--text-muted); overflow-wrap: anywhere; }
.tag { color: var(--orange-light); }
.chart { margin: .8rem 0; display: grid; gap: .5rem; max-height: 27rem; overflow: auto; }
.chart-row { display: grid; grid-template-columns: 4rem 1fr auto; align-items: center; gap: .65rem; }
.bars { display: grid; gap: 3px; }
meter { width: 100%; height: .65rem; appearance: none; }
meter::-webkit-meter-bar { background: #261006; border: 0; }
meter::-webkit-meter-optimum-value { background: var(--orange); }
meter.gains::-webkit-meter-optimum-value { background: var(--orange-light); }
meter::-moz-meter-bar { background: var(--orange); }
meter.gains::-moz-meter-bar { background: var(--orange-light); }
#notice:empty { display: none; }
#notice { position: sticky; bottom: .75rem; border: 1px solid var(--border); border-radius: 12px; padding: .8rem 1rem; background: #100803; color: var(--orange-light); overflow-wrap: anywhere; }
footer { padding: 1rem 0 2rem; border-top: 1px solid var(--border); font-size: .85rem; }

header { text-align: center; }
.logo-button { padding: 0; border: 0; border-radius: 50%; background: none; }
.heading img { display: block; }
.heading .brand { display: block; margin: .1rem 0; font-size: clamp(1.8rem, 5vw, 2.75rem); }
.heading .subtitle { margin: 0; }
.footer-menu { display: flex; justify-content: center; margin: 0 0 1.25rem; }
footer { display: grid; justify-items: center; gap: .2rem; text-align: center; }
footer a { color: var(--orange-light); }

#menu {
  width: min(26rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto;
  padding: 1.25rem; background: var(--bg-card); color: var(--text-main);
  border: 1px solid var(--border); border-radius: 20px;
}
#menu::backdrop { background: rgb(0 0 0 / .72); }
#menu nav, .menu-actions { display: grid; gap: .5rem; }
#menu nav { margin: 0 0 .65rem; }
#menu nav:empty { display: none; }
.summary { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.summary th, .summary td { padding: .65rem .25rem; text-align: left; border-bottom: 1px solid var(--border); }
.summary th { font-weight: 600; }
.summary td, .summary th:last-child:not([scope="row"]) { text-align: right; }
.summary td { color: var(--orange); font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 600px) { .footer-brand { display: block; } }
@media (min-width: 601px) { .summary th, .summary td { padding-inline: .75rem; } }

body { font-size: 1.125rem; line-height: 1.6; }
button, .button, input, select, textarea { min-height: 50px; }
button, .button {
  background: linear-gradient(110deg, var(--orange-light), var(--orange));
  border-color: var(--orange);
}
.quiet { background: #080402; color: var(--text-main); }
.logo-button {
  background: none; border: 0;
  filter: drop-shadow(0 0 11px rgb(255 153 72 / .36));
}
.heading .brand {
  color: var(--orange-light);
  text-shadow: 0 0 .65em rgb(255 153 72 / .32);
}
.panel, #menu { box-shadow: 0 0 16px rgb(255 135 54 / .12); }
textarea {
  width: 100%; padding: .65rem .75rem; resize: vertical; font: inherit;
  color: var(--text-main); background: #000; border: 1px solid var(--border); border-radius: 11px;
}
.comment-inbox { margin-top: 1rem; }
.comment { padding: .8rem 0; border-bottom: 1px solid var(--border); }
.comment:last-child { border-bottom: 0; }
.comment p { white-space: pre-wrap; overflow-wrap: anywhere; }
#comment-status:empty { display: none; }

:root {
  --orange: #ff794a;
  --orange-light: #ffb08c;
  --text-main: #fff1e9;
  --text-muted: #e0c9d2;
  --bg-card: #170e19;
  --border: #a64d56;
  --violet: #c6a4ff;
}

body {
  background:
    radial-gradient(ellipse at 50% 8rem, #401b28 0, #1a0c1e 16rem, transparent 33rem),
    var(--bg-dark);
}

header { padding: clamp(1.5rem, 4vw, 2.5rem) 0 1.5rem; border-bottom-color: #61374e; }
.heading .brand {
  font-size: clamp(2.5rem, 7vw, 4rem);
  color: var(--orange-light);
  text-shadow: 0 0 18px rgb(255 100 53 / .45);
}
.logo-button { filter: drop-shadow(0 0 16px rgb(255 126 60 / .3)); }
.panel, #menu, #install-help {
  background: linear-gradient(145deg, #211222, var(--bg-card) 65%);
  box-shadow: 0 0 24px rgb(218 87 112 / .13);
}
.auth {
  border-top: 2px dotted var(--orange);
  max-width: 32rem;
}
.quiet { background: #1d1120; border-color: #92638c; }
.quiet:hover, .quiet:focus-visible { border-color: var(--violet); }
input, select, textarea { background: #100a13; }
nav button[aria-current="page"] { background: #39213f; }
.install-access { display: grid; justify-items: center; padding: 0 0 1.5rem; }
.install-access:has(button[hidden]) { display: none; }
.install-access button { color: var(--violet); padding-inline: 1.25rem; }
#install-help {
  width: min(31rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow: auto;
  padding: clamp(1rem, 4vw, 1.6rem); color: var(--text-main);
  border: 1px solid var(--border); border-radius: 20px;
}
#install-help::backdrop { background: rgb(0 0 0 / .8); }
#install-help ol { margin: 1rem 0 1.4rem; padding-left: 1.5rem; }
#install-help li + li { margin-top: .6rem; }
footer { border-color: #61374e; }
