:root {
  color-scheme: light;
  --ink: #17233d;
  --muted: #51617c;
  --paper: #f5f7fc;
  --line: #dce2ee;
  --blue: #254ad2;
  --night: #14234c;
  --lime: #d8f78b;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { display: block; }
.symbols { position: absolute; width: 0; height: 0; }
button svg, a svg, .upload-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible, .drop:focus-within { outline: 3px solid #7893fc; outline-offset: 4px; }
.shell { width: min(1120px, calc(100% - 80px)); margin-inline: auto; }
.top { min-height: 76px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 12px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 760; letter-spacing: -.04em; text-decoration: none; white-space: nowrap; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--blue); border-radius: 9px; }
.privacy { color: #314364; font-size: .81rem; font-weight: 650; display: inline-flex; align-items: center; gap: 8px; }
.privacy i { width: 8px; height: 8px; border-radius: 50%; background: #55732a; box-shadow: 0 0 0 3px #e8f1d7; }
.tool-head { padding: 34px 0 26px; }
.eyebrow, .index, .state, .score-head, .sheet-head span { font: 650 .72rem/1.3 ui-monospace, Consolas, monospace; letter-spacing: .09em; }
.eyebrow { color: var(--blue); }
h1 { font-size: clamp(3rem, 7.5vw, 6rem); font-weight: 780; letter-spacing: -.09em; line-height: 1.03; }
h1 span { color: var(--blue); }
.tool-head p { margin-top: 8px; color: var(--muted); font-size: clamp(.96rem, 2vw, 1.12rem); }
.console { display: grid; grid-template-columns: 1fr 1.04fr; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; box-shadow: 0 13px 38px #1c327b10; }
.input-pane, .output-pane { min-width: 0; padding: 24px 26px 18px; }
.input-pane { background: white; }
.output-pane { background: var(--night); color: #f6f8ff; }
.pane-head { display: flex; align-items: center; gap: 10px; min-height: 27px; margin-bottom: 16px; }
.pane-head h2, .sheet-head h2 { font-size: 1.12rem; letter-spacing: -.025em; font-weight: 720; }
.index { display: grid; place-items: center; width: 27px; height: 25px; border-radius: 6px; background: #eaf0ff; color: var(--blue); flex: none; }
.output-pane .index { background: #293c6a; color: #d5e0ff; }
.state { margin-left: auto; font-size: .62rem; color: #becdef; border: 1px solid #52658e; padding: 4px 7px; border-radius: 5px; }
.state[data-ready="true"] { color: var(--lime); border-color: #93b151; }
.drop { position: relative; display: grid; justify-items: center; align-content: center; gap: 5px; text-align: center; min-height: 159px; padding: 12px; border: 1px dashed #899ddd; border-radius: 13px; background: #f5f7ff; cursor: pointer; transition: background-color .15s, border-color .15s; }
.drop:hover, .drop[data-over="true"] { background: #eaf0ff; border-color: var(--blue); }
.drop:has(input:disabled) { cursor: wait; }
.drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: inherit; }
.upload-icon { width: 41px; height: 41px; display: grid; place-items: center; color: var(--blue); background: white; border: 1px solid #dce4ff; border-radius: 11px; margin-bottom: 2px; }
.drop strong { max-width: 100%; overflow-wrap: anywhere; font-size: 1rem; letter-spacing: -.025em; }
.pick { color: var(--blue); font-size: .83rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.formats { margin: 9px 0 13px; font-size: .77rem; color: var(--muted); line-height: 1.45; }
.convert, .action { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 9px; min-height: 46px; padding: 8px 12px; font-weight: 720; font-size: .87rem; text-decoration: none; text-align: center; cursor: pointer; transition: background-color .15s, transform .15s; }
.convert { justify-content: space-between; width: 100%; color: white; background: var(--blue); }
.convert:hover:not(:disabled) { background: #193bb8; }
.convert:disabled { color: #536486; background: #e9eefb; cursor: default; }
.convert:active:not(:disabled), .action:active:not(:disabled):not([aria-disabled="true"]) { transform: translateY(1px); }
.status, .output-status { min-height: 20px; margin-top: 8px; font-size: .78rem; color: var(--muted); overflow-wrap: anywhere; }
.status[data-error="true"] { color: #a52339; font-weight: 650; }
.output-status { color: #cedbfb; }
progress { width: 100%; height: 5px; display: block; accent-color: var(--blue); margin-top: 8px; }
.score { display: grid; gap: 7px; padding: 12px; border-radius: 12px; border: 1px solid #3a4f7b; background: #1a2b55; min-width: 0; }
.score-head { display: flex; justify-content: space-between; gap: 5px; color: #c2cff0; font-size: .65rem; }
#roll { width: 100%; height: 104px; border-radius: 4px; background-color: #16254b; background-image: linear-gradient(#354976 1px, transparent 1px), linear-gradient(90deg, #354976 1px, transparent 1px); background-size: 100% 20%, 12.5% 100%; }
.score figcaption { font-size: .76rem; color: #c5d3f7; }
.actions { margin-top: 14px; display: grid; grid-template-columns: 1.13fr 1fr; gap: 8px; }
.action { background: #233660; color: #eef3ff; border-color: #52658e; }
.action:hover:not(:disabled):not([aria-disabled="true"]) { background: #344a7a; }
.download:not([aria-disabled="true"]) { color: #233000; background: var(--lime); border-color: var(--lime); }
.download:hover:not([aria-disabled="true"]) { background: #e4ffa6; }
.action:disabled, .action[aria-disabled="true"] { color: #bbc9e9; background: #233660; cursor: default; }
.action svg { width: 17px; height: 17px; flex: none; }
.note-sheet { background: white; border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; padding: 14px 18px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 7px; }
.sheet-head span { color: var(--blue); }
.table-wrap { max-height: 21rem; overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: .84rem; font-variant-numeric: tabular-nums; text-align: right; }
th, td { padding: 7px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 650; position: sticky; top: 0; background: white; }
th:first-child, td:first-child { text-align: left; }
.guide { margin-top: 49px; }
.guide-head { margin-bottom: 19px; }
.guide h2, .faq h2 { font-size: clamp(1.62rem, 4vw, 2.4rem); line-height: 1.1; letter-spacing: -.055em; margin-top: 4px; }
.guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 23px; }
.guide-grid article { border-top: 1px solid #a8b8dd; padding-top: 13px; }
.guide-grid h3 { font-size: 1.08rem; letter-spacing: -.025em; margin-top: 6px; }
.guide-grid p, .faq p { color: var(--muted); font-size: .92rem; line-height: 1.65; margin-top: 5px; max-width: 62ch; }
.faq { display: grid; grid-template-columns: 1fr 2.08fr; gap: 23px; margin: 48px 0; }
details { border-top: 1px solid var(--line); padding: 11px 0; }
details:last-child { border-bottom: 1px solid var(--line); }
summary { font-size: .94rem; font-weight: 680; cursor: pointer; }
.footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; padding: 16px 0 24px; color: var(--muted); font-size: .8rem; }
@media (max-width: 730px) {
  .shell { width: calc(100% - 32px); }
  .top { min-height: 60px; }
  .tool-head { padding: 21px 0 17px; }
  .console { grid-template-columns: minmax(0, 1fr); border-radius: 15px; }
  .input-pane, .output-pane { padding: 15px 15px 10px; }
  .pane-head { margin-bottom: 10px; }
  .drop { min-height: 108px; }
  .upload-icon { width: 32px; height: 32px; }
  .formats { margin: 7px 0 9px; }
  .score { padding: 8px; }
  #roll { height: 70px; }
  .actions { margin-top: 8px; }
  .output-status:empty { display: none; }
  .note-sheet { padding-inline: 12px; }
  .guide { margin-top: 33px; }
  .guide-grid, .faq { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .faq { margin: 34px 0; }
}
@media (max-width: 360px) {
  .shell { width: calc(100% - 24px); }
  .action { font-size: .77rem; padding-inline: 6px; }
  th, td { padding-inline: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
  .convert:active, .action:active { transform: none !important; }
}
