@font-face {
  font-family: PaperSerif;
  src: url("./assets/paper-serif.ttf") format("truetype");
  font-display: swap;
  font-weight: 400 700;
}
@font-face {
  font-family: 'DM Serif Display';
  src: url("./assets/dm-serif-display.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Inter;
  src: url('./assets/inter.woff2') format('woff2');
  font-display: swap;
  font-weight: 100 900;
}
:root {
  --page: #f7f4ed;
  --paper: #fffdf8;
  --mat: #efede5;
  --ink: #1c1917;
  --muted: #696359;
  --red: #b83c2f;
  --jade: #4c705b;
  --red-soft: #f2e4dc;
  --line: #dedad0;
  --serif: 'DM Serif Display', PaperSerif, Georgia, serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
button {
  border: 0;
  background: none;
}
button:disabled {
  cursor: default;
  opacity: 0.35;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
svg:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 5px;
}
::selection {
  background: #d7ac98;
  color: #302e29;
}
* {
  scrollbar-width: thin;
  scrollbar-color: #b7ae9e transparent;
}
[hidden] {
  display: none !important;
}
svg.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button svg,
a svg {
  pointer-events: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
button,
a {
  transition:
    color 0.18s,
    background-color 0.18s,
    border-color 0.18s;
}
button:enabled:hover {
  color: var(--red);
}
.site-header {
  height: 94px;
  max-width: 1536px;
  padding: 0 52px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand-seal {
  background: var(--red);
  color: #fff9ec;
  width: 39px;
  height: 43px;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 28px;
  border-radius: 3px 5px 2px 3px;
  transform: rotate(-3deg);
  outline: 1px solid #f8e7d5;
  outline-offset: -4px;
}
.brand-name {
  font-family: var(--serif);
  font-size: 27px;
  letter-spacing: 0.17em;
}
.brand-name small {
  display: block;
  font-family: var(--sans);
  font-size: 9px;
  letter-spacing: 0.12em;
  margin-top: 4px;
}
.site-header nav {
  height: 100%;
  display: flex;
  gap: 43px;
  align-items: stretch;
  margin-left: -88px;
}
.nav-link {
  display: flex;
  align-items: center;
  position: relative;
  font-size: 14px;
  color: var(--muted);
}
.nav-link.active {
  color: var(--red);
}
.nav-link.active:after {
  content: "";
  position: absolute;
  bottom: 0;
  height: 2px;
  left: 0;
  right: 0;
  background: var(--red);
}
.help-button {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
  padding: 10px 0 10px 10px;
}
.help-button svg {
  width: 17px;
  height: 17px;
}
#studio-view {
  max-width: 1536px;
  margin: auto;
  padding: 0 52px;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 38px 0 31px;
  gap: 28px;
}
.intro h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 34px;
  letter-spacing: 0.025em;
  line-height: 1.55;
}
.intro p {
  font-size: 14px;
  color: var(--muted);
  margin-top: 9px;
}
.mode-switch {
  display: flex;
  border: 1px solid var(--line);
  padding: 5px;
  border-radius: 7px;
  flex-shrink: 0;
  background: #efede6;
}
.mode-switch button {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  padding: 12px 17px;
  font-size: 14px;
  white-space: nowrap;
}
.mode-switch .selected {
  background: var(--paper);
  box-shadow: 0 2px 6px #3c342410;
  color: var(--red);
}
.mode-switch .icon {
  width: 18px;
  height: 18px;
}
.workbench {
  display: grid;
  grid-template-columns: 222px minmax(0, 1fr) 240px;
  gap: 30px;
  border-top: 1px solid var(--line);
  padding-top: 25px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 27px;
}
.panel-heading h2 {
  font-size: 17px;
  font-family: var(--serif);
  font-weight: 600;
}
.tiny-label {
  font-size: 12px;
  color: var(--muted);
}
.pattern-filters {
  display: flex;
  gap: 20px;
  margin: 20px 0 18px;
}
.pattern-filters button {
  font-size: 13px;
  color: var(--muted);
  padding: 0 0 7px;
  white-space: nowrap;
}
.pattern-filters .active {
  color: var(--red);
  border-bottom: 1px solid var(--red);
}
.pattern-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 13px;
}
.pattern-card {
  padding: 0;
  text-align: left;
  min-width: 0;
}
.pattern-thumb {
  position: relative;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #eeeae1;
  border: 1px solid transparent;
  border-radius: 3px;
  overflow: hidden;
}
.pattern-card:hover .pattern-thumb {
  background: #e8e1d5;
}
.pattern-card.selected .pattern-thumb {
  border-color: var(--red);
  background: #f3eae0;
}
.pattern-card svg.paper-art {
  width: 86%;
  height: 86%;
}
.pattern-check {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 19px;
  height: 19px;
  background: var(--red);
  color: white;
  display: grid;
  place-items: center;
}
.pattern-check .icon {
  width: 13px;
  height: 13px;
}
.pattern-title {
  display: block;
  font-size: 14px;
  margin-top: 9px;
}
.pattern-level {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}
.paper-colors {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.paper-colors > span {
  font-size: 13px;
  color: var(--muted);
}
#colors {
  display: flex;
  gap: 15px;
  margin-top: 15px;
}
.color-dot {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--swatch);
  position: relative;
  padding: 0;
  outline: 1px solid transparent;
  outline-offset: 4px;
}
.color-dot.active {
  outline-color: var(--swatch);
}
.color-dot.active:after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  position: absolute;
  left: 8px;
  top: 8px;
  background: white;
}
.panel-footnote {
  font-family: var(--serif);
  font-size: 13px;
  color: var(--muted);
  margin-top: 27px;
}
.cutting-panel {
  min-width: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 26px;
}
.canvas-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0 17px;
}
.canvas-heading > div:first-child {
  display: flex;
  align-items: center;
  gap: 13px;
}
.canvas-heading h2 {
  font-size: 16px;
  font-weight: 500;
}
.canvas-heading #current-fold {
  font-size: 12px;
  color: var(--muted);
}
.history-actions {
  display: flex;
  gap: 7px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  padding: 5px;
  color: var(--muted);
}
.icon-button:enabled:hover {
  background: #e8e1d6;
}
.icon-button svg {
  width: 18px;
  height: 18px;
}
.cutting-mat {
  background: var(--mat);
  position: relative;
  min-height: 375px;
  aspect-ratio: 1.34;
  isolation: isolate;
  overflow: hidden;
  border-radius: 3px;
}
.step-caption {
  position: absolute;
  top: 20px;
  left: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #746f64;
  z-index: 1;
  pointer-events: none;
}
.step-dot {
  height: 5px;
  width: 5px;
  border-radius: 50%;
  background: #b7a58d;
}
.mat-corner {
  position: absolute;
  width: 13px;
  height: 13px;
  pointer-events: none;
  border-color: #c8c2b5;
  border-style: solid;
  border-width: 0;
}
.top-left {
  left: 14px;
  top: 14px;
  border-top-width: 1px;
  border-left-width: 1px;
}
.top-right {
  right: 14px;
  top: 14px;
  border-top-width: 1px;
  border-right-width: 1px;
}
.bottom-left {
  left: 14px;
  bottom: 14px;
  border-bottom-width: 1px;
  border-left-width: 1px;
}
.bottom-right {
  right: 14px;
  bottom: 14px;
  border-bottom-width: 1px;
  border-right-width: 1px;
}
#cutting-svg {
  width: 100%;
  height: 100%;
  position: absolute;
  inset: 0;
  touch-action: none;
  cursor: crosshair;
  overflow: visible;
}
.fold-label {
  position: absolute;
  bottom: 98px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: #81796b;
  font-size: 12px;
  pointer-events: none;
}
.fold-label .icon {
  width: 16px;
  height: 16px;
}
.tool-dock {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  padding: 5px 7px;
  align-items: center;
  gap: 4px;
  background: #fffdf8;
  border-radius: 7px;
  box-shadow: 0 4px 14px #514b3d12;
}
.tool {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 61px;
  height: 57px;
  border-radius: 4px;
  padding: 6px;
}
.tool span {
  font-size: 11px;
  white-space: nowrap;
}
.tool.active {
  background: var(--red-soft);
  color: var(--red);
}
.tool .icon {
  width: 22px;
  height: 22px;
}
.tool-divider {
  width: 1px;
  height: 27px;
  background: var(--line);
  margin: 0 2px;
}
.canvas-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  gap: 8px;
}
.guide-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
}
.guide-toggle input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.guide-toggle:focus-within .switch-track {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}
.switch-track {
  width: 27px;
  height: 15px;
  background: #c6c0b5;
  border-radius: 20px;
  position: relative;
  transition: background 0.2s;
}
.switch-track:after {
  content: "";
  position: absolute;
  width: 11px;
  height: 11px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: white;
  transition: transform 0.2s;
}
.guide-toggle input:checked + .switch-track {
  background: #b84134;
}
.guide-toggle input:checked + .switch-track:after {
  transform: translateX(12px);
}
.text-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 0;
}
.text-button .icon {
  width: 16px;
  height: 16px;
}
.canvas-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 19px;
}
.progress-copy {
  font-size: 12px;
  color: var(--muted);
}
.progress-segments {
  display: flex;
  gap: 4px;
  margin-top: 9px;
}
.progress-segments i {
  display: block;
  width: 18px;
  height: 3px;
  background: #ded9ce;
}
.progress-segments i.done {
  background: var(--red);
}
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 19px;
  border-radius: 4px;
  background: var(--red);
  color: #fffaf0;
  font-size: 14px;
  line-height: 1.45;
}
.primary-button:enabled:hover {
  color: #fff;
  background: #9a3028;
}
.primary-button .icon {
  width: 20px;
  height: 20px;
}
.interaction-hint {
  font-size: 12px;
  text-align: center;
  color: var(--muted);
  margin: 15px 0 0;
  line-height: 1.7;
}
.preview-panel .panel-heading > .icon {
  color: var(--muted);
  width: 17px;
  height: 17px;
}
.preview-tabs {
  display: flex;
  gap: 22px;
  margin-top: 21px;
  font-size: 12px;
}
.preview-tabs button {
  padding: 0 0 7px;
  color: var(--muted);
}
.preview-tabs button.active {
  color: var(--red);
  border-bottom: 1px solid var(--red);
}
.preview-art {
  height: 224px;
  display: grid;
  place-items: center;
  position: relative;
}
.preview-art:before {
  content: "";
  width: 172px;
  height: 172px;
  border: 1px solid #e3ded3;
  border-radius: 50%;
  position: absolute;
}
.preview-art .paper-art {
  width: 205px;
  height: 205px;
  filter: drop-shadow(1px 3px 2px #5c322020);
}
.preview-art-caption {
  text-align: center;
}
.preview-art-caption > span:first-child {
  display: block;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.13em;
}
.preview-art-caption > span:last-child {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 8px;
}
.meaning-preview {
  margin-top: 25px;
  border-top: 1px solid var(--line);
  padding-top: 21px;
}
.meaning-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 11px;
}
.meaning-label > span {
  display: block;
  width: 12px;
  height: 1px;
  background: #b1997a;
}
.meaning-preview h3 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  line-height: 1.6;
  margin-top: 12px;
}
.meaning-preview p {
  font-size: 12px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 9px;
}
.meaning-preview a {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--red);
  font-size: 12px;
  margin-top: 16px;
}
.meaning-preview a:hover {
  gap: 20px;
}
.meaning-preview .icon {
  width: 16px;
  height: 16px;
}
.little-reminder {
  display: flex;
  gap: 9px;
  color: var(--muted);
  margin-top: 28px;
}
.little-reminder .icon {
  width: 16px;
  height: 16px;
  margin-top: 3px;
}
.little-reminder p {
  font-size: 11px;
  line-height: 1.9;
}
.studio-footer {
  margin-top: 32px;
  border-top: 1px solid var(--line);
  padding: 22px 0 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  gap: 20px;
}
.studio-footer ol {
  list-style: none;
  display: flex;
  gap: 30px;
  padding: 0;
  margin: 0;
}
.studio-footer li {
  display: flex;
  align-items: center;
  gap: 9px;
}
.studio-footer li span {
  font-family: var(--serif);
  font-style: italic;
  color: #a0927b;
}
.footer-mark {
  font-family: var(--serif);
  letter-spacing: 0.1em;
}
.free-options h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  margin-top: 25px;
}
.free-options p {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 10px;
}
.fold-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 20px;
}
.fold-options button {
  text-align: left;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: var(--serif);
  font-size: 18px;
}
.fold-options button.active {
  border-color: var(--red);
  color: var(--red);
  background: #f1e6dd;
}
.fold-options span {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  color: var(--muted);
  margin-top: 7px;
}
.free-note {
  display: flex;
  gap: 8px;
  margin-top: 23px;
}
.free-note .icon {
  color: var(--red);
  width: 16px;
  height: 16px;
  margin-top: 13px;
}
#size-control {
  align-items: center;
  gap: 8px;
  font-size: 12px;
  display: flex;
  color: var(--muted);
}
input[type="range"] {
  accent-color: var(--red);
  width: 95px;
}
dialog {
  border: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  max-height: 90dvh;
  box-shadow: 0 20px 80px #26231c38;
  border-radius: 6px;
}
dialog::backdrop {
  background: #29271e80;
  backdrop-filter: blur(4px);
}
.dialog-close {
  position: absolute;
  right: 16px;
  top: 16px;
  z-index: 2;
  width: 34px;
  height: 34px;
}
.result-dialog {
  width: min(910px, calc(100vw - 36px));
}
.result-layout {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  min-height: 540px;
}
.result-paper {
  background: #eeeade;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 45px;
}
.result-paper #result-art {
  width: 100%;
  aspect-ratio: 1;
}
.result-paper .paper-art {
  width: 100%;
  height: 100%;
  filter: drop-shadow(2px 5px 3px #6d38232b);
  animation: paper-open 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.result-signature {
  position: absolute;
  bottom: 26px;
  color: #877c68;
  font-size: 12px;
  letter-spacing: 0.15em;
}
.result-content {
  padding: 48px 38px;
}
.result-seal {
  display: grid;
  place-items: center;
  border: 1px solid var(--red);
  color: var(--red);
  width: 30px;
  height: 34px;
  font-family: var(--serif);
  font-size: 20px;
  transform: rotate(5deg);
  margin-bottom: 24px;
}
.result-content h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 27px;
  line-height: 1.5;
}
.result-content > p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.9;
  margin-top: 13px;
}
.result-details {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin-top: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.meaning-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  margin-bottom: 18px;
  color: var(--red);
}
.meaning-button small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.meaning-button strong {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
}
.result-content h3 {
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
  margin-bottom: 13px;
}
.export-actions {
  display: flex;
  gap: 10px;
}
.export-actions .primary-button {
  gap: 7px;
  padding: 12px 15px;
  flex: 1;
}
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
}
.outline-button:hover {
  border-color: var(--red);
}
.result-content p.export-note {
  font-size: 11px;
  margin: 12px 0 16px;
}
.small-dialog {
  max-width: 480px;
  width: calc(100vw - 32px);
  padding: 40px;
}
.small-dialog h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  line-height: 1.6;
}
.help-steps {
  padding-left: 22px;
  margin: 27px 0;
}
.help-steps li {
  padding-left: 7px;
  margin: 20px 0;
}
.help-steps li::marker {
  color: var(--red);
  font-family: var(--serif);
}
.help-steps strong {
  font-size: 15px;
  font-weight: 500;
}
.help-steps p,
.small-dialog > p {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  margin-top: 8px;
}
.small-dialog p.keyboard-note {
  font-size: 12px;
  margin-bottom: 25px;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 28px;
}
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: #33302a;
  color: #fffaf0;
  padding: 13px 22px;
  font-size: 14px;
  border-radius: 5px;
  box-shadow: 0 5px 20px #332d2420;
  opacity: 0;
  pointer-events: none;
  z-index: 10;
  transition:
    opacity 0.2s,
    transform 0.2s;
  max-width: calc(100vw - 32px);
  text-align: center;
  line-height: 1.6;
}
.toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@keyframes paper-open {
  from {
    transform: perspective(800px) rotateY(-65deg) scale(0.7);
    clip-path: inset(0 45% 0 0);
  }
  to {
    transform: perspective(800px) rotateY(0) scale(1);
    clip-path: inset(0);
  }
}
#stories-view {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 52px 70px;
}
.stories-intro {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 35px;
  gap: 20px;
}
.stories-intro h1,
.story-heading h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 38px;
  line-height: 1.5;
}
.stories-intro p {
  margin-top: 13px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--red);
  white-space: nowrap;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
.story-card {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 24px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}
.story-card-art {
  aspect-ratio: 1;
  background: #eee9de;
  padding: 15px;
}
.story-card-art svg {
  width: 100%;
  height: 100%;
}
.story-card h2 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}
.story-card p {
  font-size: 14px;
  line-height: 1.85;
  color: var(--muted);
  margin: 10px 0 15px;
}
.story-card > a:hover h2 {
  color: var(--red);
}
.story-card .back-link {
  font-size: 13px;
}
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 65px;
  margin-top: 34px;
}
.story-heading {
  border-bottom: 1px solid var(--line);
  padding-bottom: 25px;
}
.story-heading > p {
  color: var(--muted);
  font-size: 15px;
  margin-top: 15px;
  line-height: 1.85;
}
.article-body h2 {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  margin-top: 34px;
  margin-bottom: 13px;
}
.article-body p {
  font-size: 16px;
  line-height: 2.1;
  color: #575249;
  margin: 10px 0;
}
.article-body a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.article-sources {
  border-top: 1px solid var(--line);
  margin-top: 34px;
  padding-top: 22px;
  font-size: 13px;
  color: var(--muted);
  line-height: 2;
}
.article-sources a {
  color: var(--red);
}
.story-aside {
  align-self: start;
  position: sticky;
  top: 35px;
  background: #efebe1;
  padding: 28px;
  text-align: center;
}
.story-aside svg {
  width: 100%;
  aspect-ratio: 1;
}
.story-aside p {
  font-size: 13px;
  line-height: 1.8;
  color: var(--muted);
  margin: 10px 0 20px;
}
.story-aside .primary-button {
  width: 100%;
}
@media (min-width: 1450px) {
  .workbench {
    grid-template-columns: 242px minmax(0, 1fr) 265px;
    gap: 34px;
  }
  .cutting-panel {
    padding: 0 32px;
  }
  .cutting-mat {
    min-height: 420px;
  }
  .preview-art {
    height: 245px;
  }
  .preview-art .paper-art {
    width: 226px;
    height: 226px;
  }
  .pattern-list {
    gap: 22px 17px;
  }
  .intro {
    padding-top: 43px;
    padding-bottom: 37px;
  }
  .intro h1 {
    font-size: 38px;
  }
}
@media (max-width: 1180px) {
  .site-header {
    padding: 0 28px;
  }
  #studio-view {
    padding: 0 28px;
  }
  .workbench {
    grid-template-columns: 184px minmax(0, 1fr) 200px;
    gap: 20px;
  }
  .cutting-panel {
    padding: 0 18px;
  }
  .intro h1 {
    font-size: 30px;
  }
  .mode-switch button {
    padding: 11px 12px;
  }
  .canvas-heading > div:first-child {
    gap: 5px;
    align-items: start;
    flex-direction: column;
  }
  .cutting-mat {
    min-height: 352px;
  }
  .pattern-filters {
    gap: 14px;
  }
  .primary-button {
    padding: 13px;
  }
  .preview-art .paper-art {
    width: 185px;
    height: 185px;
  }
  .preview-art {
    height: 215px;
  }
  .studio-footer ol {
    gap: 15px;
  }
  .studio-footer > span:first-child {
    display: none;
  }
  .canvas-footer {
    align-items: start;
    flex-direction: column;
    gap: 16px;
  }
  .canvas-footer .primary-button {
    width: 100%;
  }
  .progress-copy {
    display: flex;
    gap: 15px;
    align-items: center;
  }
  .progress-segments {
    margin: 0;
  }
  .panel-footnote {
    font-size: 12px;
  }
  .tool {
    min-width: 53px;
  }
  .tool-dock {
    gap: 1px;
  }
  .little-reminder p {
    font-size: 12px;
  }
  .meaning-preview p {
    font-size: 13px;
  }
  .meaning-preview a {
    font-size: 13px;
  }
}
@media (max-width: 960px) {
  .workbench {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .preview-panel {
    display: none;
  }
  .cutting-panel {
    border-right: 0;
    padding-right: 0;
  }
  .cutting-mat {
    min-height: 400px;
    aspect-ratio: 1.3;
  }
  .canvas-footer {
    flex-direction: row;
    align-items: center;
  }
  .canvas-footer .primary-button {
    width: auto;
  }
  .progress-copy {
    display: block;
  }
  .progress-segments {
    margin-top: 8px;
  }
  .intro {
    align-items: start;
  }
  .intro h1 {
    font-size: 27px;
  }
  .intro p {
    font-size: 13px;
    max-width: 280px;
    line-height: 1.8;
  }
  .mode-switch button {
    font-size: 13px;
    padding: 10px;
  }
  .mode-switch .icon {
    display: none;
  }
  .site-header nav {
    margin-left: 0;
    gap: 27px;
  }
  .story-layout {
    gap: 30px;
    grid-template-columns: minmax(0, 1fr) 230px;
  }
  .story-card {
    grid-template-columns: 105px 1fr;
    gap: 18px;
  }
  .story-card h2 {
    font-size: 20px;
  }
}
@media (max-width: 680px) {
  .site-header {
    height: 76px;
    padding: 0 20px;
  }
  .brand {
    gap: 10px;
  }
  .brand-seal {
    width: 30px;
    height: 35px;
    font-size: 23px;
  }
  .brand-name {
    font-size: 24px;
  }
  .brand-name small {
    font-size: 8px;
  }
  .site-header nav {
    gap: 20px;
  }
  .nav-link {
    font-size: 12px;
  }
  .help-button {
    padding: 5px;
  }
  .help-button > span:last-child {
    display: none;
  }
  .site-header nav {
    margin-left: auto;
    margin-right: 18px;
  }
  .brand-name small {
    display: none;
  }
  #studio-view {
    padding: 0 20px;
  }
  .intro {
    flex-direction: column;
    padding: 26px 0 22px;
    gap: 20px;
  }
  .intro h1 {
    font-size: 28px;
  }
  .intro p {
    max-width: none;
    font-size: 12px;
    margin-top: 6px;
  }
  .mode-switch {
    width: 100%;
    border-radius: 5px;
  }
  .mode-switch button {
    flex: 1;
    justify-content: center;
    font-size: 14px;
    padding: 10px;
  }
  .mode-switch .icon {
    display: block;
    width: 17px;
    height: 17px;
  }
  .workbench {
    display: flex;
    flex-direction: column;
    padding-top: 19px;
    gap: 22px;
  }
  .pattern-panel {
    position: relative;
  }
  .panel-heading h2 {
    font-size: 16px;
  }
  .pattern-panel .tiny-label {
    display: none;
  }
  .pattern-filters {
    position: absolute;
    top: 0;
    right: 0;
    gap: 16px;
    margin: 0;
  }
  .pattern-filters button {
    font-size: 12px;
    padding: 4px 0 5px;
  }
  .pattern-list {
    display: flex;
    gap: 12px;
    margin-top: 15px;
    overflow-x: auto;
    padding: 0 1px 5px;
  }
  .pattern-card {
    flex: 0 0 calc((100% - 36px) / 4);
  }
  .pattern-title {
    font-size: 12px;
    white-space: nowrap;
    margin-top: 7px;
  }
  .pattern-level {
    font-size: 11px;
    line-height: 1.6;
    margin-top: 3px;
  }
  .pattern-thumb {
    min-height: 65px;
  }
  .paper-colors {
    padding: 0;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 0;
  }
  .paper-colors > span {
    font-size: 12px;
  }
  #colors {
    margin: 0;
    gap: 15px;
  }
  .color-dot {
    width: 17px;
    height: 17px;
  }
  .color-dot.active:after {
    left: 6px;
    top: 6px;
  }
  .panel-footnote {
    display: none;
  }
  .cutting-panel {
    border: 0;
    padding: 0;
    border-top: 1px solid var(--line);
    padding-top: 18px;
  }
  .canvas-heading {
    padding-bottom: 12px;
  }
  .canvas-heading > div:first-child {
    flex-direction: row;
    gap: 10px;
    align-items: center;
  }
  .canvas-heading h2 {
    font-size: 15px;
  }
  .canvas-heading #current-fold {
    font-size: 11px;
  }
  .cutting-mat {
    min-height: 350px;
    aspect-ratio: 1.02;
  }
  .step-caption {
    font-size: 11px;
    left: 23px;
    top: 21px;
  }
  .tool-dock {
    bottom: 18px;
  }
  .tool {
    min-width: 58px;
    height: 53px;
  }
  .fold-label {
    bottom: 87px;
    font-size: 11px;
  }
  .canvas-controls {
    min-height: 52px;
  }
  .canvas-footer {
    padding-top: 17px;
  }
  .canvas-footer .primary-button {
    font-size: 13px;
    padding: 14px;
    gap: 8px;
  }
  .progress-copy {
    font-size: 11px;
  }
  .progress-segments i {
    width: 13px;
  }
  .interaction-hint {
    font-size: 11px;
    margin-top: 14px;
  }
  .studio-footer {
    margin-top: 24px;
    padding: 18px 0 22px;
  }
  .studio-footer ol {
    gap: 12px;
    justify-content: space-between;
    width: 100%;
  }
  .studio-footer li {
    font-size: 10px;
    gap: 5px;
  }
  .studio-footer li span {
    font-size: 11px;
  }
  .footer-mark {
    display: none;
  }
  .free-options h3,
  .free-options > p,
  .free-note {
    display: none;
  }
  .fold-options {
    display: flex;
    margin: 16px 0 0;
    gap: 10px;
  }
  .fold-options button {
    flex: 1;
    font-size: 17px;
    text-align: center;
    padding: 11px 5px;
  }
  .fold-options span {
    font-size: 10px;
  }
  .result-layout {
    grid-template-columns: 1fr;
  }
  .result-paper {
    padding: 28px 62px 42px;
    min-height: 285px;
  }
  .result-paper #result-art {
    max-width: 230px;
  }
  .result-signature {
    bottom: 15px;
    font-size: 11px;
  }
  .result-content {
    padding: 28px;
  }
  .result-seal {
    display: none;
  }
  .result-content h2 {
    font-size: 26px;
  }
  .result-content > p {
    font-size: 13px;
  }
  .result-details {
    margin-top: 17px;
  }
  .meaning-button {
    margin-bottom: 6px;
  }
  .result-dialog .dialog-close {
    background: #fffaf0b5;
  }
  .small-dialog {
    padding: 33px 27px;
  }
  .small-dialog h2 {
    font-size: 23px;
  }
  #stories-view {
    padding: 30px 20px 50px;
  }
  .stories-intro {
    align-items: start;
    flex-direction: column;
    gap: 18px;
  }
  .stories-intro h1,
  .story-heading h1 {
    font-size: 30px;
  }
  .story-grid {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .story-card {
    grid-template-columns: 112px 1fr;
  }
  .story-card p {
    font-size: 13px;
  }
  .story-layout {
    display: flex;
    flex-direction: column;
    gap: 25px;
  }
  .story-aside {
    position: static;
    width: 100%;
    padding: 23px;
    display: grid;
    grid-template-columns: 115px 1fr;
    column-gap: 20px;
    align-items: center;
  }
  .story-aside svg {
    grid-row: span 2;
  }
  .story-aside p {
    margin: 0;
  }
  .story-aside .primary-button {
    font-size: 13px;
    align-self: end;
  }
  .article-body p {
    font-size: 15px;
  }
  .story-heading > p {
    font-size: 14px;
  }
  .toast {
    font-size: 13px;
    width: max-content;
  }
  .help-button .icon {
    width: 19px;
    height: 19px;
  }
}
.cutting-mat {
  aspect-ratio: auto;
  height: 400px;
  min-height: 0;
}
.tool span,
.guide-toggle,
.text-button,
.progress-copy,
.interaction-hint,
.canvas-controls {
  font-size: 13px;
}
.step-caption {
  font-size: 13px;
}
.preview-tabs,
.meaning-preview p,
.meaning-preview a {
  font-size: 13px;
}
.pattern-level {
  font-size: 12px;
}
.little-reminder p {
  font-size: 12px;
}
.meaning-label {
  font-size: 12px;
}
.preview-art-caption > span:last-child {
  font-size: 12px;
}
.fold-label {
  font-size: 12px;
}
.brand-name small {
  font-size: 10px;
}
@media (min-width: 1450px) {
  .cutting-mat {
    height: 440px;
  }
}
@media (max-width: 960px) {
  .cutting-mat {
    height: 390px;
  }
}
@media (max-width: 680px) {
  .intro {
    padding: 20px 0 18px;
    gap: 16px;
  }
  .intro h1 {
    font-size: 26px;
  }
  .intro p {
    display: none;
  }
  .pattern-card {
    flex-basis: calc((100% - 36px) / 4);
  }
  .cutting-mat {
    height: 350px;
  }
  .tool span {
    font-size: 12px;
  }
  .guide-toggle,
  .text-button,
  .progress-copy,
  .interaction-hint,
  .step-caption {
    font-size: 12px;
  }
  .fold-label {
    font-size: 11px;
    bottom: 85px;
  }
  .pattern-title {
    font-size: 13px;
  }
  .pattern-level {
    font-size: 11px;
  }
  .studio-footer li {
    font-size: 11px;
  }
  .studio-footer li span {
    display: none;
  }
}
@media (max-width: 960px) {
  .preview-panel {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 1fr 1fr;
    column-gap: 26px;
    padding-top: 23px;
    border-top: 1px solid var(--line);
  }
  .preview-panel .panel-heading,
  .preview-panel .preview-tabs {
    grid-column: 1 / -1;
  }
  .preview-panel .preview-art {
    grid-column: 1;
    grid-row: 3;
  }
  .preview-panel .preview-art-caption {
    grid-column: 1;
    grid-row: 4;
  }
  .preview-panel .meaning-preview {
    grid-column: 2;
    grid-row: 3 / 5;
    margin-top: 25px;
    border-top: 0;
    padding-top: 0;
  }
  .preview-panel .little-reminder {
    grid-column: 1 / -1;
    margin-top: 22px;
  }
}
@media (max-width: 680px) {
  .preview-panel {
    column-gap: 17px;
  }
  .preview-panel .preview-art {
    height: 170px;
  }
  .preview-panel .preview-art:before {
    width: 130px;
    height: 130px;
  }
  .preview-panel .preview-art .paper-art {
    width: 155px;
    height: 155px;
    max-width: 100%;
  }
  .preview-panel .meaning-preview h3 {
    font-size: 17px;
  }
  .preview-panel .meaning-preview p,
  .preview-panel .meaning-preview a {
    font-size: 12px;
  }
  .preview-panel .little-reminder {
    display: none;
  }
}
@media (max-width: 360px) {
  .preview-panel {
    display: block;
  }
  .preview-panel .meaning-preview {
    margin-top: 24px;
  }
}
.brand-name {
  font-size: 22px;
  letter-spacing: -0.035em;
}
.brand-name small {
  font-size: 8px;
  letter-spacing: 0.13em;
}
.brand-seal,
.result-seal {
  font-family: PaperSerif, SimSun, serif;
}
.intro h1 {
  letter-spacing: -0.035em;
}
.panel-heading h2 {
  line-height: 1.4;
}
.pattern-panel .tiny-label {
  display: none;
}
.pattern-title {
  line-height: 1.4;
}
.pattern-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}
.pattern-thumb { width: 100%; flex-shrink: 0; }
.pattern-level {
  line-height: 1.5;
}
.preview-art-caption > span:first-child {
  letter-spacing: 0;
}
.canvas-heading > div:first-child {
  flex-wrap: wrap;
  gap: 7px 12px;
}
.canvas-heading #current-fold {
  font-size: 11px;
}
.footer-mark {
  letter-spacing: 0;
}
.fold-options button {
  font-size: 16px;
}
@media (max-width: 1180px) {
  .intro h1 {
    font-size: 28px;
  }
  .panel-heading h2 {
    font-size: 16px;
  }
}
@media (max-width: 680px) {
  .site-header nav .nav-link:first-child {
    display: none;
  }
  .site-header nav {
    margin-right: 13px;
  }
  .brand-name {
    font-size: 16px;
  }
  .intro h1 {
    font-size: 26px;
  }
  .pattern-panel .panel-heading h2 {
    font-size: 15px;
  }
  .pattern-filters {
    gap: 12px;
  }
  .pattern-filters button {
    font-size: 11px;
  }
  .pattern-title {
    font-size: 12px;
    white-space: normal;
    min-height: 2.8em;
  }
  .pattern-level {
    font-size: 10px;
  }
  .canvas-heading > div:first-child {
    display: block;
  }
  .canvas-heading #current-fold {
    display: block;
    margin-top: 5px;
  }
  .canvas-heading h2 {
    font-size: 16px;
  }
  .canvas-footer .primary-button {
    gap: 9px;
  }
  .fold-label {
    font-size: 10px;
  }
  .fold-options button {
    font-size: 15px;
  }
  .fold-options span {
    font-size: 9px;
  }
  .result-content h2 {
    font-size: 25px;
  }
  .meaning-button strong {
    font-size: 19px;
  }
}
@media (max-width: 360px) {
  .brand-name {
    font-size: 14px;
  }
  .brand {
    gap: 7px;
  }
  .site-header nav {
    margin-right: 8px;
  }
  .nav-link {
    font-size: 11px;
  }
  .intro h1 {
    font-size: 22px;
  }
  .pattern-panel .panel-heading h2 {
    font-size: 13px;
  }
  .pattern-filters {
    gap: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
