:root {
  --color-ink: #1a1a1a;
  --color-paper: #ffffff;
  --color-muted: #6b6b6b;
  --color-line: #e5e0d8;
  --color-accent: #e0522f;
  --color-accent-soft: #fdece6;
  --color-bg: #faf8f5;
  --color-bg-alt: #f3ede3;
  --shadow-card: 0 1px 2px rgba(26,19,10,0.04), 0 10px 24px rgba(26,19,10,0.06);
  --shadow-card-hover: 0 4px 10px rgba(26,19,10,0.06), 0 16px 32px rgba(26,19,10,0.10);
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --max-width: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-ink);
  background: var(--color-bg);
  line-height: 1.5;
  min-width: 320px;
}

img, svg { max-width: 100%; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Header ---- */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--color-line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.brand .scissors { color: var(--color-accent); }
.site-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}
.site-nav a:not(.btn) {
  color: var(--color-ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.site-nav a:not(.btn):hover { color: var(--color-accent); }
.btn-small { padding: 10px 18px; font-size: 14px; }
@media (max-width: 640px) {
  .site-nav a:not(.btn) { display: none; }
}

/* ---- Hero ---- */
.hero-section {
  padding: 56px 0 64px;
}
.hero {
  display: grid;
  gap: 40px;
}
@media (min-width: 800px) {
  .hero { grid-template-columns: 1fr 0.9fr; gap: 56px; align-items: center; }
}
.hero-copy {
  text-align: center;
}
@media (min-width: 800px) {
  .hero-copy { text-align: left; }
}
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent-soft);
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(32px, 4.4vw, 52px);
  line-height: 1.1;
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.hero p.sub {
  font-size: 18px;
  color: var(--color-muted);
  margin: 0 auto 28px;
  max-width: 42ch;
}
@media (min-width: 800px) {
  .hero p.sub { margin-left: 0; margin-right: 0; }
}
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
@media (min-width: 800px) {
  .cta-row { justify-content: flex-start; }
}

.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 9px;
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary {
  background: var(--color-ink);
  color: var(--color-paper);
  box-shadow: 0 6px 16px rgba(26,26,26,0.18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(26,26,26,0.22); }
.btn-secondary {
  background: transparent;
  color: var(--color-ink);
  border-color: var(--color-line);
}
.btn-secondary:hover { border-color: var(--color-ink); }

.hero-visual {
  position: relative;
  max-width: 380px;
  margin: 0 auto;
}
@media (min-width: 800px) {
  .hero-visual { margin: 0; max-width: 100%; }
}
.hero-illustration {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow-card-hover);
}
.hero-demo {
  margin: 20px auto 0;
  text-align: center;
  background: var(--color-paper);
  border-radius: 12px;
  padding: 14px 18px 12px;
  width: 86%;
  box-shadow: var(--shadow-card);
}
@media (min-width: 800px) {
  .hero-demo {
    position: absolute;
    left: -14%;
    bottom: -22px;
    margin: 0;
    width: 62%;
    box-shadow: 0 14px 32px rgba(26,19,10,0.18);
  }
}
.hero-demo-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  margin-bottom: 8px;
}
.hero-demo #hero-demo-svg {
  display: inline-block;
  width: 100%;
  max-width: 240px;
}
.hero-demo #hero-demo-svg svg {
  display: block;
  width: 100%;
  height: auto;
}
.hero-demo figcaption {
  text-align: center;
  color: var(--color-muted);
  font-size: 12px;
  margin-top: 8px;
}

/* ---- How it works ---- */
.section { padding: 64px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-kicker {
  text-align: center;
  color: var(--color-accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}
.section h2 {
  font-size: 30px;
  margin: 0 0 32px;
  text-align: center;
  letter-spacing: -0.01em;
}
.how-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .how-grid { grid-template-columns: repeat(3, 1fr); }
}
.how-step {
  background: var(--color-paper);
  border-radius: 14px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, transform 0.15s;
}
.how-step:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }
.how-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.how-icon svg { width: 22px; height: 22px; }
.how-step h3 { margin: 0 0 8px; font-size: 18px; }
.how-step p { margin: 0; color: var(--color-muted); }

/* ---- Templates ---- */
.template-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px) {
  .template-grid { grid-template-columns: repeat(4, 1fr); }
}
.template-card {
  display: block;
  background: var(--color-paper);
  border-radius: 12px;
  padding: 0 0 16px;
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s, transform 0.15s;
  overflow: hidden;
}
.template-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.template-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: var(--color-bg-alt);
  margin-bottom: 12px;
}
.template-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: scale(1.32);
}
.template-card-img--custom {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 300;
  color: var(--color-muted);
  background: transparent;
  border: 1px dashed var(--color-line);
  border-radius: 8px;
  margin: 12px 12px 12px;
  width: calc(100% - 24px);
  aspect-ratio: auto;
  height: auto;
  padding: 40px 0;
}
.template-card-media--swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}
.template-card-media--swatch span {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.3;
}
.template-card-label { display: block; padding: 0 14px; }
.template-card-hint {
  display: block;
  font-weight: 600;
  font-size: 12px;
  color: var(--color-accent);
  margin-top: 6px;
  padding: 0 14px;
}
/* Category hub pages (scripts/build-category-pages.mjs) — a short, real
   description under each card's title instead of a colored CTA hint, since
   these cards are the primary SEO body copy for that card, not just a nudge
   to click. Clamped to 3 lines so uneven description lengths don't break the
   grid's row alignment. */
.template-card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-weight: 400;
  font-size: 12.5px;
  line-height: 1.4;
  color: var(--color-muted);
  margin-top: 6px;
  padding: 0 14px 14px;
  text-align: left;
}

/* ---- SEO landing pages (P10-02/03: /goals/*.html, generated by
   scripts/build-landing-pages.js) — reuses .section/.template-grid/.btn/
   .designer-preview/.board-preview from elsewhere on the site; only the
   hero split, numbered steps and FAQ accordion are new here. ---- */
.landing-hero-grid {
  display: grid;
  gap: 32px;
}
@media (min-width: 800px) {
  /* Even narrower than before (user feedback 2026-09-16, round 2: "预览太小
     了...右边那张纸放大，至少放大一倍...左边标题区可以稍微窄一点") — the copy
     column only needs a title + one line + a button, so it gives almost
     everything to the preview. Combined with renderBoardSVG's cropToContent
     (svg-renderer.js) — which frames just the printed strip instead of the
     whole blank A4 page — the strip itself now reads as the actual subject
     of the page, not a small detail inside a mostly-empty rectangle. */
  .landing-hero-grid { grid-template-columns: 22fr 78fr; align-items: center; gap: 28px; }
  .landing-hero-copy { max-width: 320px; }
}
.landing-hero-copy h1 {
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.15;
  margin: 0 0 12px;
  letter-spacing: -0.01em;
}
/* A more prominent CTA (user feedback: "按钮更突出一点") — bigger, full-width
   on its own column so it reads as THE action on the page, not one of
   several equal-weight buttons. */
.landing-hero-copy .btn-primary {
  display: block;
  width: 100%;
  text-align: center;
  padding: 16px 20px;
  font-size: 17px;
}
/* The numbered "how it works" steps moved OUT of the hero entirely (user
   feedback 2026-09-16, round 2: "步骤说明不要放在首屏，挪到下面做成 How it
   works" — every page's single job is making someone want to print, and
   three lines of usage instructions above the fold competed with that,
   not supported it). See the dedicated .how-it-works section below;
   .landing-steps is now only used there. */
.landing-steps {
  margin: 18px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
  color: var(--color-muted);
  font-size: 15px;
  max-width: 640px;
}
.landing-steps li::marker { color: var(--color-accent); font-weight: 700; }
.how-it-works .section-kicker { text-align: center; }
.how-it-works h2 { text-align: center; margin: 0 0 18px; }
.how-it-works .landing-steps { margin: 0 auto; }

/* The preview itself IS the product shot (user feedback 2026-09-16, round 2:
   "更真实的打印预览区...浅灰背景、纸张阴影，整体像一张放在桌上的成品纸，而
   不是一个网页控件") — a deeper desk-like background, a real drop shadow
   under the paper, and a very slight rotation read as "a printed strip
   someone just set down", not a flat UI rectangle. Kept subtle (1.2deg) so
   it still looks intentional, not crooked; straightens on hover. */
.landing-hero-preview {
  padding: 40px 28px;
  background: linear-gradient(180deg, #efe7d8, #f3ede3);
}
.landing-hero-preview .board-preview svg {
  width: 66%;
  max-width: 320px;
  box-shadow: 0 14px 26px rgba(26,19,10,0.14), 0 32px 60px rgba(26,19,10,0.2);
  transform: rotate(-1.2deg);
  transition: transform 0.25s ease;
}
.landing-hero-preview .board-preview svg:hover { transform: rotate(0deg) scale(1.02); }
@media (max-width: 640px) {
  .landing-hero-preview .board-preview svg { width: 80%; }
}

.landing-faq { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--color-line);
  padding: 14px 0;
}
.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 15.5px;
}
.faq-item p {
  margin: 10px 0 0;
  color: var(--color-muted);
}

/* ---- Homepage photo banner (4 real-life shots teaching what CutDone is:
   print it, stick it up, cut a step off, any-order variant) — one row of 4
   on desktop, 2x2 on mobile. Photos, not UI screenshots, so they're framed
   like real objects (rounded corners, soft shadow) rather than app chrome. ---- */
.banner-strip-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (min-width: 800px) {
  .banner-strip-grid { grid-template-columns: repeat(4, 1fr); }
}
.banner-strip-item {
  margin: 0;
  text-align: center;
}
.banner-strip-zoom {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: zoom-in;
  border-radius: 12px;
  position: relative;
}
.banner-strip-zoom img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: var(--shadow-card-hover);
  transition: transform 0.15s ease;
}
.banner-strip-zoom:hover img { transform: scale(1.02); }
/* A small zoom-in glyph on hover/focus so "click to enlarge" is discoverable
   without extra caption text (user feedback: "上面的字没看清...点击可以看大
   图" — the photos have small in-photo text that's illegible at thumbnail
   size). */
.banner-strip-zoom::after {
  content: "⤢";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(26,19,10,0.55);
  color: #fff;
  font-size: 14px;
  line-height: 26px;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.banner-strip-zoom:hover::after,
.banner-strip-zoom:focus-visible::after { opacity: 1; }
.banner-strip-item figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-muted);
}

/* ---- Lightbox (click a banner photo to see it full-size, since the
   in-photo text is illegible at thumbnail size) ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20,16,10,0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: min(1100px, 100%);
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  cursor: default;
}
.lightbox-close {
  position: fixed;
  top: 18px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255,255,255,0.22); }

/* ---- Why paper ---- */
.why-list {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 420px;
  display: grid;
  gap: 12px;
  font-size: 18px;
}
.why-list li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.why-check {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fdece6;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- Footer ---- */
.site-footer {
  padding: 32px 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 14px;
}
/* Trust-signal footer (user 2026-09-16: full-site E-E-A-T pass, then
   "这些页面要在栏目里体现" — About/Method/Contact/Privacy/Terms need a real
   navigational home, not just small text links, so both users and crawlers
   treat them as real site sections rather than an afterthought). */
.site-footer { text-align: left; }
.footer-grid {
  display: grid;
  gap: 24px;
  text-align: left;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-ink);
  margin: 0 0 10px;
}
.footer-col a {
  display: block;
  color: var(--color-muted);
  text-decoration: none;
  padding: 3px 0;
}
.footer-col a:hover { color: var(--color-ink); text-decoration: underline; }
.footer-brand { font-weight: 700; color: var(--color-ink); margin-bottom: 6px; }
.footer-bottom {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--color-line);
  font-size: 13px;
}

/* ---- Simple content pages: About / How We Write / Privacy / Terms /
   Contact (user 2026-09-16: "先做全站的eeat") ---- */
.content-page { max-width: 720px; margin: 0 auto; }
.content-page h1 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; margin-bottom: 8px; }
.content-page .page-kicker { color: var(--color-accent); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; }
.content-page .page-lede { font-size: 18px; color: var(--color-muted); margin: 14px 0 32px; line-height: 1.6; }
.content-page h2 { font-size: 22px; margin: 36px 0 12px; }
.content-page p { line-height: 1.7; margin: 0 0 16px; }
.content-page ul { line-height: 1.7; }
.content-page .updated-note { color: var(--color-muted); font-size: 13px; margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--color-line); }

/* Article byline (user 2026-09-16: E-E-A-T — every /goals/*.html article
   needs a visible author/review credit + last-updated date, not just body
   text with no attribution). */
.article-byline {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: var(--color-muted);
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-line);
}
.article-byline a { color: var(--color-ink); font-weight: 600; text-decoration: none; }
.article-byline a:hover { text-decoration: underline; }

@media print {
  .site-header, .cta-row, .section, .site-footer { display: none !important; }
}

/* ==================================================================
   Designer — real Board editor. ONE BOARD = ONE PRINTED PAGE with
   1-6 goal strips side by side. Layout: 35% editor / 65% paper preview
   on desktop, stacked Editor -> Preview -> Print on mobile.
   ================================================================== */

.designer-topbar { padding: 14px 0; }
.designer-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand-small { font-weight: 600; font-size: 14px; color: var(--color-ink); }
.designer-topbar-calib {
  font-size: 13px;
  color: var(--color-muted);
  text-decoration: underline;
}
.designer-topbar-calib:hover { color: var(--color-accent); }
.designer-topbar-paper {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
  background: var(--color-bg-alt);
  padding: 5px 12px;
  border-radius: 999px;
}

.designer-main { padding-bottom: 8px; }

/* ---- Quick-start ---- */
.designer-quickstart { padding: 22px 20px 6px; }
.quickstart-label {
  margin: 0 0 12px;
  font-weight: 700;
  font-size: 15px;
}
.quickstart-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: var(--color-paper);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--color-ink);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.quick-chip:hover { border-color: var(--color-accent); box-shadow: var(--shadow-card); }
.quick-chip-icon { font-size: 15px; line-height: 1; }

/* ---- Grid: editor (35%) + preview (65%) ---- */
.designer-grid {
  display: grid;
  gap: 24px;
  padding: 18px 20px 0;
  align-items: start;
}
@media (min-width: 900px) {
  .designer-grid { grid-template-columns: 35fr 65fr; gap: 32px; }
}

.designer-editor h2.editor-heading {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin: 4px 0 12px;
}

.field-inline {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 13px;
}
.field-inline span { display: block; margin-bottom: 5px; color: var(--color-muted); }
.field-inline input,
.field-inline select,
.field-inline textarea {
  width: 100%;
  padding: 10px 12px;
  font-size: 14.5px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  font-family: inherit;
  background: var(--color-paper);
  color: var(--color-ink);
}
.field-inline textarea { resize: vertical; }
.field-quarter { display: inline-block; width: calc(50% - 5px); vertical-align: top; margin-right: 10px; }
.field-quarter:nth-child(2n) { margin-right: 0; }
.field-hint { margin: 6px 0 0; font-size: 12px; color: var(--color-muted); font-weight: 400; }

.header-color-control { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.header-color-swatches { display: flex; gap: 6px; }
.header-color-swatch {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  padding: 0;
  cursor: pointer;
}
.header-color-swatch.is-selected { border-color: var(--color-ink); box-shadow: 0 0 0 1px var(--color-paper); }
.header-color-control .goal-header-color-input {
  width: 40px;
  height: 34px;
  padding: 2px;
  flex: none;
  cursor: pointer;
}
.header-color-control .link-btn { font-weight: 600; }

.hint {
  background: #fff4ec;
  border: 1px solid #f0c9ab;
  color: #8a4a1f;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}
.hint[hidden] { display: none; }

/* ---- Your Goals list ---- */
.goal-list { display: grid; gap: 12px; margin-bottom: 14px; }
.goal-card {
  border: 1px solid var(--color-line);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--color-paper);
}
.goal-card.is-editing { border-color: var(--color-accent); box-shadow: var(--shadow-card); }
.goal-card-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.goal-order-btns {
  flex: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.goal-move-btn {
  width: 22px;
  height: 15px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 4px;
  background: transparent;
  color: var(--color-muted);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}
.goal-move-btn:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.goal-move-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.goal-summary { flex: 1; min-width: 0; }
.goal-summary-title {
  font-weight: 700;
  font-size: 14.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.goal-summary-subtitle { font-size: 12.5px; color: var(--color-muted); margin-top: 2px; }
.goal-card-actions { flex: none; display: flex; gap: 6px; }
.goal-edit-btn, .goal-remove-btn {
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  color: var(--color-muted);
  font-family: inherit;
  font-size: 13px;
  padding: 7px 10px;
}
.goal-remove-btn { width: 34px; padding: 7px 0; }
.goal-edit-btn:hover, .goal-remove-btn:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.goal-remove-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.goal-hint { margin: 8px 0 0; font-size: 12px; }
.goal-hint[hidden] { display: none; }
.link-btn {
  background: none;
  border: none;
  padding: 0;
  margin-left: 4px;
  color: var(--color-accent);
  font-weight: 700;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  font-family: inherit;
}

.goal-edit-panel {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--color-line);
}
.type-fields[hidden] { display: none; }
.goal-done-btn { margin-top: 4px; }

/* ---- Any Order mode toggle + item rows ---- */
.mode-toggle-field { margin-bottom: 14px; }
.mode-toggle-label { display: block; margin-bottom: 6px; font-weight: 600; font-size: 13px; color: var(--color-muted); }
.mode-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mode-toggle-btn {
  text-align: left;
  padding: 9px 11px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: var(--color-paper);
  cursor: pointer;
  font-family: inherit;
}
.mode-toggle-btn.is-selected { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }
.mode-toggle-title { display: block; font-weight: 700; font-size: 13.5px; color: var(--color-ink); }
.mode-toggle-desc { display: block; font-size: 11.5px; color: var(--color-muted); margin-top: 2px; }

.field-inline-label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; color: var(--color-muted); }
.anyorder-items { display: grid; gap: 8px; margin: 8px 0; }
.anyorder-item-row { display: flex; align-items: center; gap: 6px; }
.anyorder-item-move { flex: none; display: flex; flex-direction: column; gap: 2px; }
.anyorder-item-move button {
  width: 22px;
  height: 15px;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 4px;
  background: transparent;
  color: var(--color-muted);
  font-size: 9px;
  line-height: 1;
  cursor: pointer;
}
.anyorder-item-move button:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.anyorder-item-move button:disabled { opacity: 0.3; cursor: not-allowed; }
.anyorder-text-input, .anyorder-shortlabel-input {
  padding: 8px 10px;
  font-size: 13.5px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  font-family: inherit;
  background: var(--color-paper);
  color: var(--color-ink);
}
.anyorder-text-input { flex: 3; min-width: 0; }
.anyorder-shortlabel-input { flex: 2; min-width: 0; }
.anyorder-remove-btn {
  flex: none;
  width: 30px;
  height: 30px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  background: transparent;
  color: var(--color-muted);
  cursor: pointer;
}
.anyorder-remove-btn:hover:not(:disabled) { border-color: var(--color-accent); color: var(--color-accent); }
.anyorder-remove-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.editor-settings {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--color-line);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

/* ---- Paper preview ---- */
.designer-preview {
  background: var(--color-bg-alt);
  border-radius: 12px;
  padding: 20px;
}
.preview-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-muted);
  margin-bottom: 12px;
  text-align: center;
}
.board-preview { display: flex; justify-content: center; }
.board-preview svg {
  width: 100%;
  height: auto;
  display: block;
  background: #ffffff;
  box-shadow: var(--shadow-card-hover);
}

/* Inline row-label editor (double-click a Count strip's number in the
   preview) — positioned via JS (fixed, matched to the SVG row's on-screen
   rect), this just makes it read as "editing that row" instead of a random
   floating input. */
.row-label-editor {
  border: 2px solid var(--color-accent);
  border-radius: 2px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  text-align: center;
  padding: 0;
  box-sizing: border-box;
}

/* ---- Bottom action bar ---- */
.designer-footer {
  margin-top: 28px;
  padding: 18px 20px;
  border-top: 1px solid var(--color-line);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
@media (max-width: 640px) {
  .designer-footer { flex-direction: column-reverse; }
  .designer-footer .btn { width: 100%; text-align: center; }
}

@media print {
  body * { visibility: hidden; }
  .board-preview, .board-preview * { visibility: visible; }
  .board-preview {
    position: fixed;
    inset: 0;
    padding: 0;
    margin: 0;
    background: none;
    display: block;
  }
  .board-preview svg {
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
    background: none !important;
  }
}

/* ---- Print Calibration Page (P7-05) — reuses the Designer's own 35/65
   grid + board-preview classes so it inherits the exact same print-isolation
   rule above; nothing calibration-specific needed there. ---- */
.calibration-layout {
  display: grid;
  gap: 24px;
  padding: 18px 20px 0;
  align-items: start;
}
@media (min-width: 900px) {
  .calibration-layout { grid-template-columns: 35fr 65fr; gap: 32px; }
}
.calibration-checklist {
  margin: 16px 0 0;
  padding-left: 18px;
  font-size: 13.5px;
  color: var(--color-muted);
  display: grid;
  gap: 8px;
}
.calibration-checklist strong { color: var(--color-ink); }
