.tools-home .wrap { width: min(100% - 40px, 1120px); }
.tools-home { --display: var(--ui); }
.tools-home .footer { font-size: 13px; }
.compress-preset { display: flex; flex-wrap: wrap; gap: var(--s2); font-size: 13px; }
.compress-preset button { padding-inline: var(--s3); }
.compress-preset p { flex-basis: 100%; margin: 0; color: var(--muted); }
.compress-preset p:empty { display: none; }
.compress-preset [data-tone="error"] { color: var(--accent); }
.tool-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 6vw, 80px);
  padding: clamp(24px, 4vw, 48px) 0;
}
.game-card-copy .eyebrow { text-transform: uppercase; }
.tool-hero h1 {
  font-size: clamp(38px, 4.8vw, 62px);
  font-weight: 730;
  line-height: 1.06;
  max-width: 14ch;
  margin-block: var(--s4) var(--s5);
  text-wrap: balance;
}
.hero-picture { display: block; min-width: 0; }
.hero-art {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.55;
  object-fit: cover;
  border-radius: var(--r-stage);
  background: #204435;
}
.tool-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--s5);
  min-height: 46px;
  padding-inline: var(--s4);
  border-radius: var(--r-control);
  background: var(--brand);
  color: var(--on-brand);
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}
.tool-cta:hover { background: #114e42; }
.tool-section { margin-bottom: var(--s16); scroll-margin-top: var(--s5); }
.section-heading { border-top: 1px solid var(--line); padding-top: var(--s5); margin-bottom: var(--s5); }
.section-heading h2 { font-size: clamp(27px, 3vw, 36px); font-weight: 680; letter-spacing: -.035em; margin: 0; }
.section-heading p { margin: var(--s1) 0 0; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.tool-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--r-stage);
  background: var(--surface);
  transition: border-color 120ms ease-out;
}
.tool-card:hover { border-color: var(--brand); }
@media (min-width: 641px) {
  .tool-card-wide { display: grid; grid-column: 1 / -1; grid-template-columns: minmax(0, .65fr) minmax(0, 1fr); }
  .tool-card-wide .card-art { border-bottom: 0; border-right: 1px solid var(--line); }
}
.card-art {
  display: grid;
  place-items: center;
  min-height: 136px;
  padding: var(--s2);
  border-bottom: 1px solid var(--line);
}
.card-art svg { display: block; width: min(100%, 290px); height: 132px; }
.crop-art { background: #e3ebe2; }
.portrait-art { background: #eef0e4; }
.svg-art { background: #dbe8de; }
.invoice-art { background: #e9eee7; }
.card-copy { display: flex; flex: 1; flex-direction: column; padding: clamp(16px, 2.4vw, 24px); }
.card-copy h3 { font: 650 clamp(22px, 2.5vw, 28px)/1.2 var(--display); letter-spacing: -.025em; margin: 0 0 var(--s2); }
.card-copy p { margin: 0 0 var(--s5); color: var(--muted); font-size: 15px; max-width: 52ch; }
.card-end { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: auto; }
.card-format { font: 12px/1.5 var(--mono); color: var(--muted); }
.card-action { color: var(--brand); font-size: 14px; font-weight: 680; }
.card-action span[aria-hidden] { margin-inline-start: var(--s1); }
.tool-card:hover .card-action, .game-card-link:hover .card-action { text-decoration: underline; text-underline-offset: 4px; }
.game-card-link {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: var(--s4);
  padding: clamp(24px, 5vw, 56px);
  background: #1b4337;
  color: #f7faf3;
  border-radius: var(--r-stage);
  text-decoration: none;
}
.game-card-copy h3 { font: 400 clamp(36px, 6vw, 66px)/1 var(--display); letter-spacing: -.05em; margin: 0 0 var(--s3); }
.game-card-copy p { max-width: 46ch; color: #dae9de; }
.game-card-copy .eyebrow { color: #c2d7c8; margin-bottom: var(--s3); }
.game-card-copy .card-action { display: inline-block; color: #f7faf3; }
.puzzle-art { width: 100%; display: block; }
.mini-game-grid { margin-top: var(--s4); }
.mini-game-art img { display: block; width: 112px; height: 112px; border-radius: 24px; }
.game-more { margin: var(--s4) 0 0; }
.tools-answers {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: var(--s8);
  border-top: 1px solid var(--line);
  padding-top: var(--s5);
}
.tools-answers .section-heading { margin: 0; padding: 0; border: 0; }
.answers-list details { border-bottom: 1px solid var(--line); }
.answers-list summary { padding-block: var(--s3); font-weight: 650; font-size: 15px; }
.answers-list p { color: var(--muted); margin: 0 0 var(--s4); font-size: 15px; }
.tool-intro { max-width: 65ch; color: var(--muted); }
.tool-app { --display: var(--ui); }
.tool-main { padding: clamp(24px, 5vw, 56px) 0 var(--s16); }
.tool-page-intro .eyebrow {
  display: inline-block;
  margin: 0;
  padding: 5px var(--s3);
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
  font: 650 12px/1.4 var(--ui);
}
.tool-page-intro h1 {
  margin-block: var(--s3);
  font-size: clamp(32px, 5.2vw, 54px);
  font-weight: 720;
  text-wrap: balance;
}
.tool-page-intro .tool-intro { font-size: 16px; margin-bottom: 0; }
.tool-workspace { display: grid; gap: var(--s4); margin: var(--s6) 0; }
.tool-panel {
  min-width: 0;
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid var(--line);
  border-radius: var(--r-stage);
  background: var(--surface);
  box-shadow: 0 3px 8px rgb(23 58 47 / .04);
}
.tool-panel h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.tool-panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: var(--s2);
  padding: var(--s2) var(--s5);
  border-bottom: 1px solid var(--line);
  background: #fdfefc;
}
.tool-panel-body { display: grid; gap: var(--s5); padding: var(--s5); }
.tool-group { display: grid; gap: var(--s3); }
.tool-group + .tool-group { border-top: 1px solid var(--line); padding-top: var(--s4); }
.tool-group h3 { font-size: 13px; margin: 0; color: var(--ink); }
.tool-panel-foot { display: grid; gap: var(--s2); padding: var(--s4) var(--s5); border-top: 1px solid var(--line); }
.tool-quiet { color: var(--brand); background: transparent; padding: var(--s1) var(--s2); font-size: 13px; }
.tool-quiet:hover { background: var(--brand-soft); }
.tool-icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.tool-form .file-drop {
  position: relative;
  justify-items: center;
  text-align: center;
  gap: 6px;
  padding: var(--s4);
  border: 1px dashed #9ab8aa;
  border-radius: 12px;
  background: #f5f8f4;
}
.tool-form .file-drop:hover, .file-drop[data-dragging], .file-drop:has(input:focus-visible) {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.file-drop:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.tool-form .file-drop input {
  position: absolute;
  inset: 0;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-drop-icon, .tool-empty-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--s1);
  color: var(--brand);
  border-radius: 12px;
  background: var(--brand-soft);
}
.file-drop-title { color: var(--brand); font-size: 13px; overflow-wrap: anywhere; min-width: 0; max-width: 100%; }
.file-drop-hint { color: var(--muted); font-size: 12px; font-weight: 450; }
.tool-unit { position: relative; }
.tool-unit > span {
  position: absolute;
  inset-inline-end: 12px;
  top: 50%;
  translate: 0 -50%;
  color: var(--muted);
  pointer-events: none;
  font: 500 12px var(--mono);
}
.tool-unit input[type="number"] { appearance: textfield; }
.tool-unit input::-webkit-inner-spin-button { appearance: none; }
.tool-tag { padding: 4px var(--s2); border-radius: var(--r-pill); color: var(--brand);
  background: var(--brand-soft); font-size: 12px; font-weight: 650; }
.tool-local { display: flex; align-items: center; gap: var(--s2); color: var(--muted); font-size: 13px; }
.tool-local .tool-icon { width: 15px; height: 15px; }
.splitter-workspace > .tool-panel { padding: 0; }
.splitter-workspace .tool-form { gap: 0; }
.splitter-workspace .tool-panel-bar { border-radius: var(--r-stage) var(--r-stage) 0 0; }
.split-preview { display: flex; flex-direction: column; }
.splitter-workspace .tool-empty { flex: 1; margin: 0; min-height: 365px; border: 0;
  border-radius: 0 0 var(--r-stage) var(--r-stage); }
.tool-form { display: grid; align-content: start; gap: var(--s4); }
.tool-form > .primary, .tool-panel-foot > .primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  font-size: 14px;
}
.tool-form .primary:disabled { opacity: 1; color: var(--muted); background: var(--brand-soft); }
.tool-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
.tool-form input, .tool-form select, .tool-form textarea, .tool-select {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: #fdfefc;
  color: var(--ink);
  font: 450 16px/1.35 var(--ui);
  padding: var(--s2) var(--s3);
}
.tool-form select, .tool-select {
  appearance: none;
  padding-inline-end: var(--s10);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%235f6d66' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 16px;
  background-position: right 14px center;
}
@media (forced-colors: active) {
  .tool-form select, .tool-select { appearance: auto; background-image: none; }
}
.tool-form .tool-unit input { padding-inline-end: 43px; }
.tool-form :is(input, select, textarea):focus-visible, .tool-select:focus-visible { border-color: var(--brand); outline: 2px solid var(--brand); outline-offset: 1px; }
.tool-form input::placeholder { color: var(--muted); opacity: 1; }
.tool-form input[type="range"] { padding: 0; }
.tool-form fieldset { display: grid; gap: var(--s3); padding: 0; margin: 0; border: 0; min-width: 0; }
.tool-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); }
.tool-form p { color: var(--muted); font-size: 14px; margin: 0; }
.tool-help {
  max-width: 72ch;
  border-top: 1px solid var(--line);
  padding-top: var(--s8);
  margin-top: var(--s12);
}
.tool-help h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -.035em; margin-bottom: var(--s4); }
.tool-help h3 { font-size: 17px; margin: var(--s6) 0 var(--s2); }
.tool-help p, .tool-help ol { color: var(--muted); }
.tool-help ol { padding-inline-start: var(--s6); }
.tool-help li { margin-bottom: var(--s2); padding-inline-start: var(--s1); }
.tool-help li::marker { color: var(--brand); font-weight: 700; }
.tool-table-wrap { overflow-x: auto; margin: var(--s4) 0; border: 1px solid var(--line); border-radius: var(--r-stage); background: var(--surface); }
.tool-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; line-height: 1.5; }
.tool-table th, .tool-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink); }
.tool-table tr:last-child td { border-bottom: none; }
.tool-table th { background: var(--paper); font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) { .tool-table { font-size: 13px; } .tool-table th, .tool-table td { padding: 8px 10px; } }
.tool-figure { margin: var(--s4) 0; }
.tool-figure img { display: block; width: 207px; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--r-control); background: var(--surface); }
.tool-figure figcaption { margin-top: var(--s2); font-size: 14px; color: var(--muted); }
.tool-help .ref { font-size: .72em; line-height: 0; margin-left: 1px; }
.tool-help .ref a { color: var(--brand); text-decoration: none; padding: 4px 2px; }
.tool-help .ref a:hover, .tool-help .ref a:focus-visible { text-decoration: underline; }
.tool-sources { margin-top: var(--s8); padding-top: var(--s4); border-top: 1px solid var(--line); }
.tool-sources ol { font-size: 14px; overflow-wrap: anywhere; }
.tool-sources li:target { background: var(--brand-soft); border-radius: var(--r-control); }
.tool-empty, .tool-part-art {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 245px;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: 12px;
  background-color: #f5f8f4;
  background-image: radial-gradient(#cbd9cf 1px, transparent 1px);
  background-size: 16px 16px;
  text-align: center;
}
.tool-empty { margin-top: var(--s4); }
.tool-empty-icon { width: 50px; height: 50px; margin-bottom: var(--s3); background: var(--surface);
  border: 1px solid var(--line); box-shadow: 0 3px 8px rgb(23 58 47 / .08); }
.tool-empty-icon .tool-icon { width: 24px; height: 24px; }
.tool-empty strong, .tool-empty p { background: #f5f8f4; }
.tool-empty p { margin: var(--s1) 0 0; color: var(--muted); font-size: 14px; max-width: 34ch; }
.tool-preview canvas { display: block; max-width: 100%; height: auto; margin: var(--s3) auto; }
.tool-preview canvas[hidden] { display: none; }
.crop-hint { margin: var(--s2) 0 var(--s3); color: var(--muted); font-size: 13px; }
.crop-stage {
  position: relative;
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  cursor: crosshair;
  background: conic-gradient(#e6ede7 25%, #fff 0 50%, #e6ede7 0 75%, #fff 0) 0 0 / 16px 16px;
}
.tool-preview .crop-stage canvas { width: auto; margin: 0; }
.crop-selection {
  position: absolute;
  outline: 2px solid white;
  outline-offset: -2px;
  box-shadow: 0 0 0 1500px rgb(16 35 28 / .58);
  cursor: move;
}
.crop-selection[data-full="true"] { cursor: crosshair; }
.crop-selection > span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
}
.crop-selection > span::after {
  content: "";
  width: 10px;
  height: 10px;
  border: 1px solid var(--brand);
  border-radius: 3px;
  background: white;
}
.crop-selection [data-corner="nw"] { top: -5px; left: -5px; cursor: nwse-resize; }
.crop-selection [data-corner="ne"] { top: -5px; right: -5px; cursor: nesw-resize; }
.crop-selection [data-corner="sw"] { bottom: -5px; left: -5px; cursor: nesw-resize; }
.crop-selection [data-corner="se"] { bottom: -5px; right: -5px; cursor: nwse-resize; }
.portrait-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: clamp(12px, 3vw, 24px);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: radial-gradient(#cbd9cf 1px, #f5f8f4 1px) 0 0 / 16px 16px;
}
.portrait-frame {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 0 0 2px var(--brand), 0 4px 12px rgb(23 58 47 / .12);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.portrait-frame[data-dragging] { cursor: grabbing; }
.tool-preview .portrait-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; }
.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(100% - 1px), rgb(255 255 255 / .45) 0) 0 0 / calc(100% / 3) 100%,
    linear-gradient(to bottom, transparent calc(100% - 1px), rgb(255 255 255 / .45) 0) 0 0 / 100% calc(100% / 3);
}
.portrait-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-top: var(--s3);
}
.portrait-size { color: var(--muted); font: 12px var(--mono); }
.portrait-zoom {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
}
.portrait-zoom button {
  width: 44px;
  padding: 0;
  background: transparent;
  color: var(--brand);
  font-size: 19px;
}
.portrait-zoom button:not(:disabled):hover { background: var(--brand-soft); }
.portrait-zoom-value { min-width: 46px; text-align: center; font: 600 12px var(--mono); }
.photo-quota { font-size: 14px; color: var(--muted); }
.photo-quota p { margin: 0; }
.photo-quota[data-error] { color: var(--accent); }
.tool-status { overflow-wrap: anywhere; }
.tool-status:empty { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.tool-preview-link { display: none; }
.tool-preview[id], .invoice-preview[id], .split-preview[id] { scroll-margin-top: var(--s4); }
.tool-parts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); padding: var(--s4); }
.split-preview .tool-parts { flex: 1; align-content: start; border-radius: 0 0 var(--r-stage) var(--r-stage);
  background: #f5f8f4; }
.tool-parts:empty { display: none; }
.split-map {
  margin: var(--s4) var(--s4) 0;
  padding: var(--s3);
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f5f8f4;
}
.split-map figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s1);
  color: var(--ink); font-size: 13px; font-weight: 650; }
.split-map figcaption span { color: var(--muted); font: 12px/1.5 var(--mono); }
.split-map svg { display: block; width: 100%; height: clamp(72px, 15vw, 125px); margin-top: var(--s3);
  overflow: visible; }
.split-map polygon { fill: #dbece2; stroke: var(--brand); stroke-width: 1; }
.split-map polygon:nth-child(even) { fill: #bddbc9; }
.tool-part { padding: var(--s3); border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.tool-part-art { min-height: 116px; padding: var(--s3); border-radius: var(--r-control); }
.tool-part svg { width: 100%; height: 92px; fill: var(--brand); }
.tool-part h3 { font-size: 14px; margin: var(--s3) 0 0; }
.tool-part p { margin: var(--s1) 0 var(--s2); color: var(--muted); font: 12px/1.5 var(--mono); }
.tool-part button { width: 100%; padding-inline: var(--s2); font-size: 13px; }
.invoice-edit-head, .invoice-draft-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
}
.invoice-edit-head button, .invoice-draft-bar button { flex-shrink: 0; }
.invoice-draft-bar { border-top: 1px solid var(--line); }
.invoice-draft-bar p { font-size: 12px; }
.invoice-logo-control { display: grid; gap: var(--s1); }
.invoice-logo-control button { justify-self: start; }
.tool-form .invoice-logo-drop { padding: var(--s3); }
.invoice-logo-drop .file-drop-icon { width: 32px; height: 32px; }
.invoice-preview { align-self: start; overflow-wrap: anywhere; }
.invoice-paper-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: var(--s3);
  border-bottom: 2px solid var(--brand);
  padding-bottom: var(--s3);
  margin-bottom: var(--s5);
}
.invoice-preview h2 { font-size: clamp(25px, 5vw, 38px); color: var(--brand); }
.invoice-paper-head p { margin: var(--s1) 0 0; color: var(--muted); font-size: 12px; }
.invoice-paper-head img { width: auto; max-width: min(34%, 110px); max-height: 64px; object-fit: contain; }
.invoice-preview address { white-space: pre-wrap; font-style: normal; }
.invoice-preview table { width: 100%; border-collapse: collapse; margin: var(--s5) 0; font-size: 13px; }
.invoice-preview th, .invoice-preview td { padding: var(--s2); text-align: start; border-bottom: 1px solid var(--line); }
.invoice-preview th { background: var(--brand-soft); }
.invoice-preview :is(th, td):not(:first-child) { text-align: end; font-variant-numeric: tabular-nums; }
.invoice-preview td:first-child { white-space: pre-wrap; }
.invoice-totals { max-width: 240px; margin-inline-start: auto; }
.invoice-totals p { display: flex; justify-content: space-between; gap: var(--s2); margin-bottom: var(--s2);
  font-size: 13px; }
.invoice-totals .invoice-total { display: block; padding: var(--s2); border-radius: 6px; background: var(--brand-soft);
  color: var(--brand); text-align: end; font-size: 15px; font-weight: 750; }
.invoice-preview #invoice-memo { white-space: pre-wrap; }
.tool-form .invoice-line-section { gap: 0; }
.invoice-line-section legend { padding: 0; margin-bottom: var(--s2); font-size: 14px; font-weight: 700; }
.invoice-item, .invoice-line-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(44px, .32fr) minmax(60px, .49fr) minmax(54px, .53fr) 44px;
  align-items: center;
  gap: var(--s1);
}
.invoice-line-head {
  padding-block: var(--s2);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}
.invoice-item { padding-block: var(--s1); border-bottom: 1px solid var(--line); }
.invoice-item input { min-height: 44px; padding-inline: var(--s2); font-variant-numeric: tabular-nums; }
.invoice-item textarea {
  display: block; min-height: 44px; field-sizing: content; resize: vertical;
}
.invoice-item textarea::placeholder { color: var(--muted); }
.invoice-item input[type="number"] { appearance: textfield; }
.invoice-item input::-webkit-inner-spin-button { appearance: none; }
.invoice-line-amount { min-width: 0; overflow-wrap: anywhere; font-size: 12px; font-weight: 650;
  font-variant-numeric: tabular-nums; }
.invoice-item label > span, .invoice-line-amount > span {
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);
}
.invoice-remove {
  display: grid; place-items: center; width: 44px; padding: 0; color: var(--muted); background: transparent;
}
.invoice-remove:hover { color: #a12636; background: #fff0f2; }
.invoice-remove:disabled { visibility: hidden; }
.invoice-add { justify-self: start; margin-top: var(--s1); }
.invoice-add span { font-size: 17px; margin-inline-end: var(--s1); }
@media (max-width: 999px) {
  .invoice-line-head { display: none; }
  .invoice-item { grid-template-columns: repeat(3, minmax(0, 1fr)) 44px; gap: var(--s2);
    grid-template-areas: "description description description remove" "quantity price amount amount";
    padding-block: var(--s2); align-items: end; }
  .invoice-line-description { grid-area: description; }
  .invoice-line-quantity { grid-area: quantity; }
  .invoice-line-price { grid-area: price; }
  .invoice-line-amount { grid-area: amount; }
  .invoice-remove { grid-area: remove; }
  .invoice-item label > span, .invoice-line-amount > span {
    position: static; width: auto; height: auto; overflow: visible; clip-path: none;
  }
  .invoice-line-amount { display: grid; align-content: space-between; align-self: stretch; padding-bottom: 7px; }
  .invoice-line-amount > span { color: var(--muted); }
}
@media (max-width: 779px) {
  .tool-preview-link { display: inline-flex; align-items: center; justify-self: start; min-height: 44px;
    color: var(--brand); font-size: 14px; font-weight: 650; }
  .tool-form:has(#photo-source[hidden]) .tool-preview-link,
  .splitter-workspace:not(:has(.tool-part)) .tool-preview-link { display: none; }
}
@media (min-width: 780px) {
  .tool-workspace { grid-template-columns: minmax(265px, 0.85fr) minmax(0, 1.25fr); }
  .invoice-workspace { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tool-hero, .tools-answers, .tool-grid, .game-card-link { grid-template-columns: 1fr; }
  .tool-hero h1 { max-width: 13ch; }
  .hero-art { aspect-ratio: 1.8; }
  .tool-section { margin-bottom: var(--s12); }
  .tools-answers { gap: var(--s3); }
  .puzzle-art { max-width: 300px; margin-inline: auto; }
}
@media (max-width: 480px) {
  .tool-parts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
  .splitter-workspace .tool-empty { min-height: 250px; }
}
@media (prefers-reduced-motion: reduce) {
  .tool-card { transition: none; }
}
@media print {
  .invoice-site { background: white; }
  .invoice-site .tool-header, .invoice-site .tool-page-intro, .invoice-site .footer,
  .invoice-site .tool-form, .invoice-site .tool-help, .invoice-site noscript { display: none; }
  .invoice-site .tool-main, .invoice-site .tool-workspace, .invoice-preview { display: block; margin: 0; padding: 0; }
  .invoice-site .wrap { width: 100%; }
  .invoice-preview { border: 0; box-shadow: none; }
  .invoice-totals { break-inside: avoid; }
  .invoice-preview tr { break-inside: avoid; }
}

.tool-pro-actions { display: flex; flex-wrap: wrap; gap: var(--s2); }
#split-zip { margin: var(--s3) var(--s4) 0; }

/* Task-first tool directory, using the existing paper and green palette. */
.task-section { margin: 8px 0 56px; scroll-margin-top: 24px; }
.task-section h2 { margin: 0 0 18px; font: 650 20px/1.3 var(--ui); letter-spacing: -.02em; }
.task-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--surface); }
.task-grid a { display: grid; position: relative; align-content: start; gap: 8px; padding: 22px; text-decoration: none; min-width: 0; color: var(--ink); }
.task-grid a + a { border-left: 1px solid var(--line); }
.task-grid a:hover, .task-grid a:focus-visible { background: var(--brand-soft); }
.task-grid strong { font-size: 16px; line-height: 1.4; max-width: 19ch; }
.task-grid a > span { font-size: 12px; color: var(--muted); }
.task-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.pro-workflow { display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: -16px 0 56px; padding: 24px 0; border-block: 1px solid var(--line); }
.pro-workflow h2 { margin: 0 0 6px; font: 650 20px/1.3 var(--ui); }
.pro-workflow p { max-width: 65ch; color: var(--muted); margin: 0; font-size: 14px; }
.pro-workflow a { color: var(--brand); font-size: 14px; font-weight: 650; flex-shrink: 0; padding-block: 12px; }
.tool-guide { border-top: 1px solid var(--line); margin-top: 32px; padding-top: 28px; }
:lang(zh-Hans) .tool-help, :lang(zh-Hant) .tool-help, :lang(ja) .tool-help, :lang(ko) .tool-help { line-height: 1.8; }
@media (max-width: 779px) {
  .task-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .task-grid a { padding: 18px; }
  .task-grid a:nth-child(3) { border-left: 0; }
  .task-grid a:nth-child(n+3) { border-top: 1px solid var(--line); }
  .task-section { margin-bottom: 40px; }
  .pro-workflow { align-items: start; flex-direction: column; gap: 8px; }
}
@media (max-width: 640px) {
  .tools-home .tool-hero { grid-template-columns: 1fr; gap: 20px; padding-top: 28px; }
  .tools-home .tool-hero h1 { font-size: 40px; max-width: 15ch; }
  .tools-home .hero-picture { display: none; }
  .tools-home .card-art { min-height: 96px; }
  .tools-home .card-art svg { height: 96px; }
  .task-grid strong { font-size: 14px; }
  .task-grid a > span { line-height: 1.5; }
}
