:root {
  color-scheme: light;
  font-family: "Times New Roman", "Liberation Serif", Times, serif;
  color: #20352f;
  background: #f6f7f4;
  --ink: #20352f;
  --muted: #53665e;
  --line: #d8dfd8;
  --accent: #226552;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid #358875; outline-offset: 3px;
}
[hidden], .icon-library { display: none !important; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }
.container { max-width: 1512px; padding-inline: clamp(16px, 4vw, 64px); margin: 0 auto; }
.masthead { background: #fff; border-bottom: 1px solid var(--line); }
.masthead-inner { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; }
.wordmark svg { width: 33px; height: 33px; color: #21614e; }
.sample-link { display: inline-flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 600; color: var(--ink); text-decoration: none; padding: 8px 3px; }
.sample-link .icon { width: 16px; height: 16px; }
.sample-link:hover { color: var(--accent); text-decoration: underline; }
.intro { margin: clamp(22px, 3vw, 40px) 0 24px; }
h1, h2, p { margin: 0; }
h1 { font-weight: 400; letter-spacing: -.025em; font-size: clamp(32px, 4vw, 53px); line-height: 1.08; }
.workspace { display: grid; grid-template-columns: minmax(260px, 288px) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 42px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.settings { padding: 23px; }
h2, legend { font-size: 18px; line-height: 1.35; font-weight: 700; }
fieldset { border: none; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 10px; }
.upload-section { border-bottom: 1px solid var(--line); padding-bottom: 18px; margin-bottom: 18px; }
.upload-section h2 { margin-bottom: 12px; }
.drop-zone { padding: 16px 12px; display: grid; justify-items: center; width: 100%; border: 1px dashed #94b6a9; border-radius: 10px; background: #f4f9f5; }
.drop-zone:hover, .drop-zone.drag-active { border-color: var(--accent); background: #e9f4ed; }
.upload-icon { margin-bottom: 6px; width: 30px; height: 30px; display: grid; place-items: center; color: var(--accent); }
.upload-icon .icon { width: 24px; height: 24px; }
.drop-title { font-weight: 650; font-size: 14px; }
.drop-hint { font-size: 12px; color: var(--muted); margin-top: 3px; }
.file-info { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.file-info .icon { width: 15px; height: 15px; color: var(--accent); }
.file-info span { min-width: 0; overflow-wrap: anywhere; }
.save-json { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 12px; padding: 8px; min-height: 36px; border: 1px solid var(--line); border-radius: 8px; color: var(--accent); background: #fff; font-size: 14px; }
.save-json .icon { width: 16px; height: 16px; }
.save-json:hover:enabled { border-color: var(--accent); background: #f4f9f5; }
.save-json:disabled { color: var(--muted); opacity: .6; }
.period { margin-bottom: 19px; }
.dates, .formats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.dates label { display: grid; gap: 5px; font-size: 12px; color: var(--muted); }
.dates input { height: 39px; width: 100%; min-width: 0; padding: 0 6px; border-radius: 7px; border: 1px solid #cbd5ce; background: #fff; color: var(--ink); font-size: 13px; }
.dates input::-webkit-calendar-picker-indicator { opacity: .65; cursor: pointer; width: 14px; }
.dates input:disabled { background: #f6f7f6; }
.period-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 6px; }
.period-presets button { padding: 5px 9px; min-height: 32px; border: 1px solid var(--line); border-radius: 6px; color: var(--accent); background: white; font-size: 13px; }
.period-presets button:hover:enabled { border-color: var(--accent); background: #f4f9f5; }
.period-presets button:disabled { color: var(--muted); opacity: .6; }
.formats label { cursor: pointer; position: relative; }
.formats input, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; padding: 0; margin: -1px; border: 0; }
.formats label span { display: flex; align-items: center; justify-content: center; height: 40px; gap: 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; font-weight: 600; }
.formats label .icon { width: 17px; height: 17px; }
.formats input:checked + span { color: #185840; border: 1.5px solid #46836b; background: #eaf4ec; }
.formats input:focus-visible + span { outline: 3px solid #358875; outline-offset: 2px; }
.formats label:hover span { border-color: #749989; }
.color-option { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; min-height: 24px; font-size: 14px; cursor: pointer; }
.color-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.primary { display: flex; justify-content: center; align-items: center; gap: 9px; width: 100%; margin-top: 18px; min-height: 44px; border: none; border-radius: 8px; color: white; background: var(--accent); font-size: 14px; font-weight: 650; }
.primary .icon { width: 16px; height: 16px; }
.primary:hover:enabled { background: #194e3f; }
.primary:disabled { background: #788b81; }
.expand { display: grid; place-items: center; width: 36px; height: 36px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--muted); }
.expand:hover:enabled { border-color: var(--line); background: #f5f8f4; }
.expand:disabled { opacity: .35; }
.expand .icon { width: 17px; height: 17px; }
dialog { width: min(1200px, 96vw); max-height: 93dvh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 0; color: var(--ink); }
dialog::backdrop { background: #19372b94; }
.dialog-bar { display: flex; align-items: center; justify-content: space-between; padding: 8px 16px; border-bottom: 1px solid var(--line); }
.dialog-image { overflow: auto; }
.dialog-image img { display: block; width: 100%; min-width: 800px; height: auto; }
#preview-status { margin: 16px; overflow-wrap: anywhere; }
@media (max-width: 800px) {
  .container { padding-inline: 20px; }
  .workspace { gap: 12px; grid-template-columns: 250px minmax(0, 1fr); }
  .settings { padding: 18px; }
}
@media (max-width: 680px) {
  .masthead-inner { min-height: 58px; }
  .intro { margin-top: 20px; margin-bottom: 16px; }
  .workspace { grid-template-columns: minmax(0, 1fr); margin-bottom: 24px; }
  .editor { grid-row: 1; }
}
