:root {
  --paper: #f7f5ef;
  --ink: #272724;
  --muted: #67665e;
  --line: #d8d6cc;
  --accent: #642a3b;
  --tint: #efe3e1;
  --white: #fffefa;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  font: 14px/1.45 var(--sans);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
}
button,
input,
select,
summary {
  font: inherit;
}
button,
summary {
  cursor: pointer;
}
button {
  color: var(--ink);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #ac5d42;
  outline-offset: 3px;
}
.skip {
  position: absolute;
  transform: translateY(-200%);
  background: #fff;
  padding: 10px;
}
.skip:focus {
  transform: translateY(0);
  z-index: 3;
}
.mast {
  min-height: 64px;
  padding: 0 max(28px, 4.5vw);
  display: flex;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.studio,
.app-name,
.mast nav a {
  color: inherit;
  text-decoration: none;
}
.studio {
  font-size: 16px;
  font-weight: 660;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.6px;
}
.logo {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--ink);
  font:
    italic 26px/0.9 Georgia,
    serif;
  text-align: center;
  color: var(--paper);
}
.mast-divider {
  height: 20px;
  border-left: 1px solid var(--line);
  transform: rotate(18deg);
}
.app-name,
.mast nav {
  font-size: 13px;
}
.app-name {
  color: var(--muted);
}
.mast nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}
.help {
  background: transparent;
  border: 1px solid #a5a297;
  border-radius: 50%;
  width: 23px;
  height: 23px;
  line-height: 19px;
  padding: 0;
}
.mast nav a:hover,
.linklike:hover {
  text-decoration: underline;
}
main {
  width: min(1600px, 100%);
  margin: 0 auto;
  padding: 0 4.5vw;
}
.intro {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  padding: 42px 0 31px;
}
.kicker {
  font:
    600 10px/1.4 ui-monospace,
    monospace;
  letter-spacing: 1.7px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
}
.kicker span {
  width: 16px;
  height: 2px;
  background: var(--accent);
}
h1 {
  font:
    500 clamp(49px, 5.6vw, 82px)/1.02 Georgia,
    "Times New Roman",
    serif;
  letter-spacing: -0.066em;
  margin: 10px 0 8px;
}
h1 span {
  color: #aa655f;
}
.intro p {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
}
.local {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #50564c;
  font-size: 12px;
  white-space: nowrap;
  margin-bottom: 3px;
}
.dot {
  background: #577658;
  border-radius: 50%;
  width: 7px;
  height: 7px;
}
.desk {
  display: grid;
  grid-template-columns: minmax(155px, 0.72fr) minmax(250px, 3.02fr) minmax(
      210px,
      1.01fr
    );
  border: 1px solid #cfcac0;
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 7px 22px #42392d08;
}
.section-title,
.stage-head {
  height: 58px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.section-title {
  padding: 0 16px;
}
h2 {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.025em;
  margin: 0;
}
.count {
  font-size: 10px;
  line-height: 19px;
  background: #eeece6;
  min-width: 20px;
  text-align: center;
  border-radius: 4px;
  color: var(--muted);
}
.tray {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}
#source-list {
  display: grid;
  gap: 4px;
  padding: 12px 8px 5px;
}
.source-item {
  display: flex;
  align-items: center;
  gap: 9px;
  text-align: left;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  width: 100%;
  padding: 8px 6px;
}
.source-item.active {
  background: #f5ebe6;
  border-color: #ddc7be;
}
.source-item:hover {
  background: #f2efea;
}
.source-item img,
.source-item canvas,
.missing-thumb {
  width: 40px;
  height: 33px;
  object-fit: cover;
  background: #e8dfd1;
  border: 1px solid #d6cfc0;
  border-radius: 3px;
  flex-shrink: 0;
}
.source-item span {
  overflow: hidden;
}
.source-item strong,
.source-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.source-item strong {
  font-size: 12px;
  font-weight: 600;
}
.source-item small {
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}
.upload {
  border: 1px dashed #bcb6a8;
  background: transparent;
  border-radius: 6px;
  margin: 8px;
  font-size: 12px;
  padding: 10px 5px;
}
.upload:hover,
.quiet:hover,
.format-row button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.file {
  display: none;
}
.tray-bottom {
  margin-top: auto;
  padding: 18px 12px;
}
.linklike {
  border: 0;
  background: transparent;
  font-size: 11px;
  color: var(--muted);
}
.stage {
  min-width: 0;
}
.stage-head {
  padding: 0 15px;
}
.tabs,
.format-row {
  display: flex;
  gap: 3px;
}
.tabs {
  padding: 3px;
  background: #eeece6;
  border-radius: 7px;
}
.tabs button,
.format-row button {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 560;
  padding: 6px 11px;
}
.tabs button[aria-pressed="true"] {
  background: #fffefa;
  border-color: #dcd8cf;
  box-shadow: 0 1px 4px #4034210c;
}
.stage-head > span,
.stage-footer {
  color: var(--muted);
  font:
    10px/1.4 ui-monospace,
    monospace;
}
.board {
  min-height: 344px;
  aspect-ratio: 1.4;
  display: grid;
  place-items: center;
  padding: clamp(12px, 2vw, 34px);
  background-color: #e9e7df;
  background-image: radial-gradient(#bbb7aa 0.7px, transparent 0.8px);
  background-size: 9px 9px;
  position: relative;
}
.board.dragging {
  outline: 3px dashed var(--accent);
  outline-offset: -7px;
}
#preview-pane,
#redact-pane {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  min-height: 0;
}
#card-preview {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--ratio, 16/9);
  object-fit: contain;
  box-shadow: 0 8px 18px #382e3026;
}
.board.square-board #card-preview {
  max-height: clamp(230px, 29vw, 440px);
}
.mask-area {
  max-width: 100%;
  line-height: 0;
}
#source-preview {
  display: block;
  max-width: 100%;
  max-height: clamp(240px, 31vw, 500px);
  object-fit: contain;
  touch-action: none;
  cursor: crosshair;
}
.stage-footer {
  display: flex;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  gap: 8px;
}
.source-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 14px;
}
.quiet {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 9px;
  font-size: 11px;
}
.source-actions .quiet:last-child {
  color: var(--muted);
  margin-left: auto;
}
.settings {
  border-left: 1px solid var(--line);
}
.fields,
.review,
.export,
.layout {
  padding: 16px;
}
.fields {
  display: grid;
  gap: 6px;
}
.fields label,
legend {
  font-size: 11px;
  font-weight: 600;
  color: #55544f;
}
.fields input,
.fields select,
#mask-list input {
  border: 1px solid #cbc7bc;
  border-radius: 5px;
  background: var(--white);
  width: 100%;
  padding: 8px;
  color: var(--ink);
  font-size: 12px;
  min-width: 0;
}
.fields input + label,
fieldset,
#crop-group {
  margin-top: 10px;
}
fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}
legend {
  padding: 0;
  margin-bottom: 6px;
}
.palettes {
  display: flex;
  gap: 8px;
}
.swatch {
  padding: 0;
  width: 25px;
  height: 25px;
  border: 2px solid var(--white);
  outline: 1px solid #d9d5ca;
  border-radius: 50%;
}
.swatch[aria-pressed="true"] {
  outline: 2px solid var(--ink);
}
.format-row {
  gap: 5px;
}
.format-row button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex: 1;
  border-color: var(--line);
  padding: 7px 4px;
}
.format-row button[aria-pressed="true"] {
  background: var(--tint);
  border-color: #bd8b94;
  color: var(--accent);
}
.ratio {
  display: block;
  border: 1px solid currentColor;
  border-radius: 1px;
}
.ratio.wide {
  width: 13px;
  height: 8px;
}
.ratio.square {
  width: 9px;
  height: 9px;
}
#crop-group label {
  display: block;
  margin-bottom: 6px;
}
.review,
.layout {
  border-top: 1px solid var(--line);
}
.review {
  padding-bottom: 0;
}
.review label {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 11px;
}
.review input {
  accent-color: var(--accent);
  margin: 2px 0;
}
.export {
  padding-top: 12px;
}
.export button {
  width: 100%;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: white;
  border-radius: 5px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 650;
  font-size: 12px;
}
.export p,
.layout p,
#mask-panel p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--muted);
  margin: 7px 0 0;
}
.layout {
  font-size: 11px;
}
.layout p {
  margin-bottom: 10px;
}
.layout summary {
  font-weight: 600;
}
.stage #empty {
  text-align: center;
}
.stage #empty p {
  color: var(--muted);
  font-size: 12px;
}
#notice:not(:empty) {
  border: 1px solid #c9c0b3;
  background: #faf7ed;
  padding: 9px 12px;
  margin-bottom: 12px;
  border-radius: 6px;
  font-size: 12px;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0;
  color: var(--muted);
  font-size: 11px;
}
#mask-panel {
  padding: 0 16px 14px;
}
#mask-panel p {
  margin-bottom: 10px;
}
.mask-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  gap: 4px;
  align-items: end;
  margin-bottom: 8px;
}
.mask-row label {
  font-size: 10px;
  color: var(--muted);
}
dialog {
  max-width: min(420px, 90vw);
  background: var(--white);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 25px;
}
dialog::backdrop {
  background: #28232488;
}
dialog h2 {
  font:
    30px Georgia,
    serif;
}
dialog ol {
  padding-left: 19px;
}
dialog li {
  margin: 10px 0;
}
#close-guide {
  float: right;
  border: 0;
  background: none;
  font-size: 21px;
}
@media (min-width: 1650px) {
  main {
    padding: 0 74px;
  }
}
@media (max-width: 1050px) {
  main {
    padding: 0 24px;
  }
  .mast {
    padding: 0 24px;
  }
  .desk {
    grid-template-columns: 146px minmax(200px, 1fr) 205px;
  }
  .stage-head {
    padding: 0 9px;
  }
  .board {
    min-height: 310px;
    aspect-ratio: auto;
  }
  .section-title {
    padding: 0 12px;
  }
  .local {
    display: none;
  }
}
@media (max-width: 800px) {
  .desk {
    grid-template-columns: minmax(0, 1fr) 200px;
  }
  .tray {
    grid-column: 1/-1;
    border: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding: 8px;
    gap: 6px;
  }
  .tray .section-title {
    height: auto;
    border: 0;
    gap: 6px;
    padding: 5px;
  }
  .tray #source-list {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    max-height: 140px;
    overflow-y: auto;
  }
  .source-item {
    width: auto;
  }
  .source-item img,
  .source-item canvas,
  .missing-thumb {
    width: 27px;
    height: 23px;
  }
  .source-item small {
    display: none;
  }
  .upload {
    margin: 2px;
    padding: 6px;
  }
  .tray-bottom {
    margin: 0 0 0 auto;
    padding: 0;
  }
  .intro {
    padding: 30px 0 23px;
  }
  .stage-head,
  .settings .section-title {
    height: 46px;
  }
  .board {
    min-height: 260px;
  }
  .source-item strong {
    max-width: 100px;
  }
}
@media (max-width: 620px) {
  main {
    padding: 0 12px;
  }
  .mast {
    min-height: 52px;
    padding: 0 15px;
    gap: 10px;
  }
  .mast nav {
    gap: 10px;
  }
  .intro {
    padding: 25px 4px 19px;
  }
  .intro p {
    font-size: 13px;
    max-width: 340px;
  }
  .kicker {
    font-size: 9px;
  }
  .desk {
    display: flex;
    flex-direction: column;
  }
  .settings {
    border: 0;
    border-top: 1px solid var(--line);
  }
  .fields {
    grid-template-columns: 1fr 1fr;
    gap: 5px 10px;
  }
  .fields label[for="card-title"] {
    grid-column: 1;
    grid-row: 1;
  }
  .fields #card-title {
    grid-column: 1;
    grid-row: 2;
  }
  .fields label[for="card-label"] {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
  }
  .fields #card-label {
    grid-column: 2;
    grid-row: 2;
  }
  .board {
    min-height: 0;
    aspect-ratio: 1.42;
  }
  .board.square-board #card-preview {
    max-height: 48vw;
  }
  .stage-head > span {
    font-size: 9px;
  }
  .section-title {
    padding: 0 14px;
  }
  .tray .section-title {
    display: none;
  }
  .tray-bottom {
    margin-left: 0;
  }
  .source-actions {
    padding: 9px 12px;
  }
  .review,
  .fields,
  .layout,
  .export {
    padding: 12px;
  }
  .review {
    padding-bottom: 0;
  }
  .mask-row {
    gap: 2px;
  }
  .app-name {
    font-size: 12px;
  }
  footer {
    font-size: 10px;
  }
  .local {
    display: none;
  }
}
footer a {
  color: var(--muted);
  text-underline-offset: 2px;
}
.studio-icon {
  border-radius: 4px;
}
.intro {
  padding: 21px 0 18px;
}
.intro h1 {
  font-size: clamp(42px, 4.7vw, 65px);
  margin: 0 0 4px;
}
.board {
  aspect-ratio: 1.82;
  min-height: 260px;
}
.stage-export {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  border-top: 1px solid var(--line);
}
.stage-export .review {
  border: 0;
  padding: 13px 15px;
}
.stage-export .export {
  min-width: 185px;
  padding: 12px 15px;
}
.stage-export .review label,
.fields label,
legend,
.quiet {
  font-size: 12px;
}
.export #next-pending {
  background: transparent;
  border: 0;
  color: var(--accent);
  padding: 5px 0;
  text-decoration: underline;
  font-size: 12px;
}
#inspect-zoom {
  margin-left: auto;
}
.board.zoom-source {
  display: block;
  height: clamp(240px, 40vw, 450px);
  min-height: 0;
  padding: 10px;
}
.zoom-source #redact-pane {
  display: block;
  overflow: auto;
  overscroll-behavior: contain;
  background: #dddacf;
}
.zoom-source .mask-area {
  width: max-content;
  max-width: none;
}
.zoom-source #source-preview {
  max-width: none;
  max-height: none;
  touch-action: pan-x pan-y;
}
@media (max-width: 800px) {
  .source-item small {
    display: block;
  }
  .board {
    min-height: 230px;
  }
  .source-actions {
    flex-wrap: wrap;
  }
}
@media (max-width: 620px) {
  .mast {
    min-height: 48px;
  }
  .intro {
    padding: 13px 4px 12px;
  }
  .intro h1 {
    font-size: 40px;
  }
  .board {
    min-height: 0;
    aspect-ratio: 1.65;
  }
  .stage-export {
    gap: 4px;
  }
  .stage-export .review {
    padding: 10px 4px 10px 10px;
  }
  .stage-export .export {
    min-width: 150px;
    max-width: 52%;
    padding: 10px 10px 10px 4px;
  }
  .fields input,
  .fields select,
  #mask-list input {
    font-size: 16px;
  }
  .upload,
  .source-item,
  .source-actions .quiet,
  .tabs button,
  .format-row button,
  .export #export-pack {
    min-height: 36px;
  }
}
@media (max-width: 420px) {
  .mast .mast-divider,
  .mast .app-name {
    display: none;
  }
  .source-item small {
    font-size: 11px;
  }
}
.board.zoom-source {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  aspect-ratio: auto;
}
