:root {
  color-scheme: dark;
  --bg: #101b1b;
  --panel: #1a2928;
  --panel-soft: #213331;
  --text: #f5f4ed;
  --muted: #b0c2ba;
  --dim: #879c95;
  --border: #60766b45;
  --orange: #ff9d72;
  --lime: #c4efb2;
  --ink: #12201a;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-width: 320px; margin: 0; color: var(--text);
  background: #101a1b;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; z-index: -1; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at 12% -8%, #29483a75, transparent 52%),
              radial-gradient(ellipse at 105% 86%, #5a403029, transparent 52%);
}
button, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--lime); outline-offset: 3px; }
::selection { color: var(--ink); background: var(--orange); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.shell { width: min(1480px, calc(100% - 80px)); margin-inline: auto; }
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  min-height: 92px; border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.brand-icon { width: 41px; height: 40px; position: relative; transform: rotate(-8deg); flex: none; }
.brand-icon i {
  position: absolute; display: block; height: 9px; background: var(--lime);
  border: 2px solid var(--bg); border-radius: 2px;
}
.brand-icon i:nth-child(1) { width: 25px; left: 5px; top: 6px; background: var(--orange); transform: rotate(16deg); }
.brand-icon i:nth-child(2) { width: 29px; left: 10px; top: 17px; transform: rotate(-13deg); }
.brand-icon i:nth-child(3) { width: 40px; left: 0; top: 29px; transform: rotate(7deg); }
.brand-type { font-size: 22px; font-weight: 950; line-height: .84; letter-spacing: -.065em; }
.brand-type span { display: block; color: var(--lime); }
.preview-chip {
  padding: 8px 13px; color: var(--muted); font-size: 12px; font-weight: 700;
  border: 1px solid #6c897b55; border-radius: 999px; letter-spacing: .005em;
}
.intro { padding: clamp(52px, 6.4vw, 94px) 0 46px; max-width: 1180px; }
.intro h1 {
  max-width: 1160px; margin: 0; font-size: clamp(46px, 5.3vw, 82px);
  line-height: 1.04; font-weight: 900; letter-spacing: -.064em;
  text-wrap: balance;
}
.intro h1 em { color: var(--orange); font-style: normal; }
.intro p {
  margin: 22px 0 0; color: var(--muted); font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.5; letter-spacing: -.016em;
}
.dashboard-grid {
  display: grid; grid-template-columns: minmax(550px, 1.27fr) minmax(360px, .93fr);
  align-items: stretch; gap: 24px;
}
.dump-panel, .chart-panel {
  border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; background: var(--panel);
}
.dump-panel { position: relative; min-height: 515px; padding: clamp(28px, 2.6vw, 43px); }
.dump-panel h2 {
  margin: 0 0 26px; font-weight: 800; letter-spacing: -.045em;
  font-size: clamp(26px, 2.4vw, 34px); line-height: 1.16;
}
textarea {
  display: block; width: 100%; min-height: 211px; resize: vertical;
  padding: 20px 21px; border: 1px solid #4c665e8a; border-radius: 12px;
  background: #111e1e; color: var(--text); font-size: 16px; line-height: 1.62;
  transition: border-color .16s ease, box-shadow .16s ease;
}
textarea::placeholder { color: #93a7a0; opacity: 1; }
textarea:focus { outline: none; border-color: var(--lime); box-shadow: 0 0 0 3px #c4efb222; }
.counter-row {
  display: flex; justify-content: space-between; gap: 10px;
  margin: 12px 0 25px; color: var(--dim); font-size: 12px; line-height: 1.3;
}
.counter-row > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.action-button {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; min-height: 86px; padding: 14px 10px; border-radius: 14px;
  border: 1px solid transparent; text-align: center;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
}
.action-button:not(:disabled):hover { transform: translateY(-2px); }
.action-button:not(:disabled):active { transform: translateY(0); }
.action-button:disabled { cursor: not-allowed; }
.action-button strong { font-size: 15px; line-height: 1.2; font-weight: 850; letter-spacing: -.018em; }
.action-button small { display: block; font-size: 11px; line-height: 1.35; font-weight: 550; max-width: 100%; }
.void-button {
  color: #e5ede7; border-color: #71877b70;
  background: linear-gradient(180deg,#314641,#273a37);
  box-shadow: inset 0 1px 0 #ffffff0c;
}
.void-button small { color: #bbd1c4; }
.void-button:not(:disabled):hover { background: #385149; border-color: #a3c4b2; }
.void-button:disabled { opacity: .73; }
.pile-button {
  color: #1c211a; border-color: #ffb08e;
  background: linear-gradient(160deg,#ffb58d,#ff9871);
  box-shadow: 0 6px 16px #070e0b25, inset 0 1px 0 #fff5cf4a;
}
.pile-button small { color: #40332a; }
.pile-button:not(:disabled):hover { box-shadow: 0 9px 22px #070e0b55, inset 0 1px 0 #fff5cf5e; background: linear-gradient(160deg,#ffc4a0,#ff9e7b); }
.pile-button:disabled { opacity: .86; filter: saturate(.8); }

.preview-note { color: var(--muted); font-size: 12px; margin: 19px 0 0; line-height: 1.45; }
.action-message { min-height: 18px; margin: 12px 0 0; color: var(--lime); font-size: 13px; line-height: 1.4; }
.action-message:empty { min-height: 0; margin: 0; }
.privacy-line { color: var(--dim); font-size: 11px; margin: 20px 0 0; line-height: 1.4; }
.chart-panel { min-height: 515px; display: flex; flex-direction: column; background: #192727; scroll-margin-top: 16px; }
.chart-heading {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 18px; padding: 34px 36px 26px; border-bottom: 1px solid var(--border);
}
.chart-heading h2 {
  margin: 0; font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.13; font-weight: 850; letter-spacing: -.048em;
}
.chart-heading p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.4; text-align: right; max-width: 290px; }
.ranking-list { display: flex; flex-direction: column; flex: 1; list-style: none; margin: 0; padding: 10px 36px 20px; }
.empty-chart {
  flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 14px; min-height: 270px; padding: 30px 20px; color: var(--muted);
  font-size: clamp(15px, 1.5vw, 19px); font-weight: 600; text-align: center; line-height: 1.5;
}
.empty-chart::before {
  content: ""; width: 60px; height: 60px; border: 1px solid #71908171;
  border-radius: 18px; transform: rotate(-9deg);
  background: linear-gradient(150deg, #c4efb31b, #ff9d720d);
  box-shadow: inset 0 0 0 10px #182b2870, 0 8px 28px #0813123c;
}
.ranking-row {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 8px 16px; border-bottom: 1px solid #5c74604d; padding: 12px 0;
}
.ranking-row:last-child { border-bottom: 0; }
.rank-number { grid-column: 1; grid-row: 1; padding-top: 4px; color: var(--dim); font-size: 14px; font-weight: 850; font-variant-numeric: tabular-nums; }
.ranking-row:nth-child(-n+3) .rank-number { color: var(--orange); }
.rank-main { grid-column: 2; grid-row: 1; min-width: 0; }
.rank-headline { display: block; font-size: clamp(15px, 1.2vw, 18px); font-weight: 760; line-height: 1.35; letter-spacing: -.025em; overflow-wrap: anywhere; }
.rank-report-count { grid-column: 3; grid-row: 1; display: flex; align-items: baseline; gap: 5px; justify-content: flex-end; white-space: nowrap; }
.rank-count { color: var(--lime); font-size: 17px; font-weight: 850; font-variant-numeric: tabular-nums; }
.rank-count-caption { color: var(--dim); font-size: 11px; }
.rank-track { grid-column: 2 / 4; grid-row: 2; height: 5px; width: 100%; overflow: hidden; border-radius: 999px; background: #30453d; }
.rank-fill { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.ranking-row:first-child .rank-fill { background: var(--orange); }
.site-footer { margin-top: 37px; padding: 22px 0 37px; color: var(--dim); font-size: 12px; border-top: 1px solid var(--border); }
@media (max-width: 1020px) {
  .dashboard-grid { grid-template-columns: minmax(410px, 1.2fr) minmax(300px, .9fr); gap: 15px; }
  .shell { width: calc(100% - 44px); }
  .dump-panel { padding: 26px; }
  .chart-heading { padding-inline: 26px; }
  .ranking-list { padding-inline: 26px; }
  .action-button strong { font-size: 13px; }
}
@media (max-width: 800px) {
  .shell { width: min(680px, calc(100% - 38px)); }
  .intro { padding: 48px 0 31px; }
  .intro h1 { font-size: clamp(40px, 7.7vw, 60px); }
  .dashboard-grid { grid-template-columns: 1fr; gap: 16px; }
  .dump-panel { min-height: initial; padding: 28px; }
  .chart-panel { min-height: 360px; }
}
@media (max-width: 520px) {
  .shell { width: calc(100% - 30px); }
  .site-header { min-height: 74px; }
  .brand-icon { transform: scale(.85) rotate(-8deg); transform-origin: center left; width: 35px; }
  .brand-type { font-size: 18px; }
  .preview-chip { padding: 7px 10px; font-size: 11px; }
  .intro { padding: 45px 0 28px; }
  .intro h1 { font-size: clamp(39px, 10.2vw, 54px); }
  .intro p { margin-top: 17px; font-size: 15px; }
  .dump-panel { padding: 25px 20px; border-radius: 16px; }
  .dump-panel h2 { font-size: 27px; margin-bottom: 22px; }
  textarea { min-height: 180px; padding: 15px; font-size: 15px; }
  .actions { gap: 8px; }
  .action-button { min-height: 80px; gap: 5px; padding: 12px 7px; }
  .action-button strong { font-size: 13px; }
  .action-button small { font-size: 10px; }
  .chart-panel { border-radius: 16px; }
  .chart-heading { padding: 26px 20px 22px; align-items: flex-start; flex-direction: column; gap: 7px; }
  .chart-heading p { text-align: left; }
  .chart-heading h2 { font-size: 31px; }
  .ranking-list { padding: 8px 20px 16px; }
  .ranking-row { grid-template-columns: 22px minmax(0,1fr) auto; gap: 7px 9px; }
  .rank-headline { font-size: 14px; }
  .rank-count { font-size: 15px; }
  .rank-count-caption { font-size: 10px; }
}
@media (max-width: 360px) {
  .actions { grid-template-columns: 1fr; }
  .action-button { min-height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

.site-footer a { color: var(--muted); margin-left: 15px; text-underline-offset: 3px; }
.site-footer a:hover { color: var(--lime); }
