/* card.css — page layer for /folding-card-maker/. The shell (header, controls,
   buttons, explainer, footer) is /assets/polyatic.css; this file adds the
   cutting-mat stage with the card standing on it, the front picker and the
   fold diagrams. The card is paper-white in both themes: it is an object on the mat. */
@font-face{font-family:"FCM Classic";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/classic.woff2) format("woff2")}
@font-face{font-family:"FCM Script";font-style:normal;font-weight:400;font-display:swap;src:url(fonts/handwritten.woff2) format("woff2")}

.fc-noscript{margin:1rem;padding:.875rem 1rem;border:1px solid var(--line);border-left:.25rem solid var(--accent);border-radius:.625rem;background:var(--surface)}
.fc-head h1{margin-bottom:.25rem}
.fc-head .sub{margin-bottom:.875rem}

/* ---------- the stage ---------- */
.duo.fc-duo>.pane-result{position:static}
.fc-stage{background:radial-gradient(120% 80% at 50% 0%,rgba(255,196,120,.16),transparent 60%),linear-gradient(180deg,var(--mat),var(--mat-2));
  color:var(--mat-ink);border-radius:var(--r);padding:.875rem .875rem 1rem;box-shadow:var(--shadow);min-width:0}
.fc-stage-h{font-family:var(--mono);font-size:.6875rem;font-weight:500;text-transform:uppercase;letter-spacing:.07em;color:var(--mat-muted);margin:0 0 .625rem;text-align:center}
.fc-view[hidden]{display:none}
.fc-card{width:min(64%,17rem);margin:0 auto;line-height:0;position:relative}
.fc-card::after{content:"";position:absolute;left:0;top:2%;bottom:-1.5%;width:3%;transform:translateX(-60%);background:linear-gradient(90deg,rgba(0,0,0,.28),rgba(0,0,0,0));border-radius:2px 0 0 2px;pointer-events:none}
.fc-card canvas{display:block;width:100%;height:auto;background:#fff;border-radius:1px 3px 3px 1px;
  box-shadow:-2px 0 0 #e8e4dc,0 1px 0 rgba(0,0,0,.1),14px 20px 34px -14px rgba(0,0,0,.65)}
.fc-card.is-photo canvas{touch-action:none;cursor:grab}
.fc-card.is-photo canvas:active{cursor:grabbing}
.fc-drag{margin:.5rem 0 0;text-align:center;font-size:.75rem;color:var(--mat-muted)}
.fc-drag[hidden]{display:none}
.fc-sheet{margin:0 auto .625rem;max-width:30rem}
.fc-sheet[hidden]{display:none}
.fc-sheet canvas{display:block;width:100%;height:auto;background:#fff;border-radius:2px;box-shadow:0 1px 0 rgba(0,0,0,.1),0 18px 40px -16px rgba(0,0,0,.6)}
.fc-sheet figcaption{margin:.375rem 0 0;text-align:center;font-size:.75rem;color:var(--mat-muted)}
.fc-toggle{margin:.75rem 0 .25rem;text-align:center}
.fc-stage .fc-linkbtn{color:var(--mat-ink);font-size:.875rem}
.fc-summary{margin:.25rem 0 .625rem;text-align:center;font-size:.875rem;color:var(--mat-ink)}
.fc-summary b{color:#fff}
.fc-dl{display:flex;flex-wrap:wrap;gap:.5rem;max-width:30rem;margin:0 auto}
.fc-dl .btn{flex:1 1 11rem}
.fc-dl .btn[hidden]{display:none}
.fc-dl .btn:disabled{opacity:.6;cursor:progress}
.fc-stage .btn.ghost{color:var(--mat-ink);border-color:rgba(255,255,255,.4);background:transparent}
.fc-msg{margin:.5rem 0 0;text-align:center;font-size:.8125rem;color:var(--mat-muted)}
.fc-msg:empty{display:none}

/* ---------- the form ---------- */
.fc-form-h{margin:0 0 .75rem;font-size:1.1875rem}
.fc-hint{margin:.375rem 0 0;font-size:.8125rem;color:var(--muted);line-height:1.45}
.fc-form textarea{min-height:8rem;resize:vertical;line-height:1.45}
.fc-form .modes button small{display:block;font-weight:500;font-size:.6875rem;opacity:.8}
.fc-linkbtn{border:0;background:none;padding:0;font:inherit;color:var(--accent);text-decoration:underline;cursor:pointer}
.fc-linkbtn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.fc-f-serif{font-family:"FCM Classic",Georgia,serif;font-weight:400;font-size:1rem}
.fc-f-script{font-family:"FCM Script",cursive;font-weight:400;font-size:1.125rem}
.fc-f-sans{font-family:Helvetica,Arial,sans-serif;font-weight:400}

.fc-fronts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.5rem}
.fc-front{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:.25rem;padding:.375rem .25rem .3125rem;border:1px solid var(--line);border-radius:.5rem;
  background:var(--surface-2);color:var(--ink);font:inherit;font-size:.75rem;font-weight:600;cursor:pointer;min-width:0}
.fc-front img{display:block;width:100%;max-width:4.5rem;aspect-ratio:.7;object-fit:cover;border-radius:2px;box-shadow:0 1px 3px rgba(0,0,0,.25)}
.fc-front span{line-height:1.2;text-align:center}
.fc-photo-ico{display:flex;align-items:center;justify-content:center;width:100%;max-width:4.5rem;aspect-ratio:.7;border:1.5px dashed var(--line-2);border-radius:2px;color:var(--muted)}
.fc-front[hidden]{display:none}
.fc-slot[hidden],.field[hidden]{display:none}
.fc-front:hover{border-color:var(--muted)}
.fc-front.active{border-color:var(--accent);box-shadow:0 0 0 2px var(--accent-soft)}
.fc-front:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.fc-group-h{grid-column:1/-1;margin:.5rem 0 0;padding-top:.625rem;border-top:1px solid var(--line);font-size:.8125rem;font-weight:600;color:var(--ink)}
.fc-group-h small{font-weight:500;color:var(--muted);margin-left:.375rem}
.fc-checks .check+.check{margin-top:.5rem}
.fc-checks .check input{flex:none}
.fc-checks .check[hidden]{display:none}
.fc-checks .check input:disabled+span{color:var(--muted)}
.fc-checks .fc-hint:empty{display:none}
.fc-photo-ctl{margin-top:.75rem}
.fc-photo-ctl[hidden]{display:none}
.fc-photo-ctl input[type=range]{width:100%}

/* ---------- how to fold ---------- */
.fc-howfold{border-top:1px solid var(--line);padding-top:.875rem}
.fc-howfold h3{margin:0 0 .5rem;font-size:1rem}
.fc-howfold figure{margin:0}
.fc-howfold figure[hidden]{display:none}
.fc-howfold svg{display:block;width:100%;height:auto;max-width:26rem}
.fc-howfold figcaption{font-size:.8125rem;color:var(--muted);line-height:1.5;margin-top:.375rem}
.fd-paper{fill:#fff;stroke:var(--line-2);stroke-width:1}
.fd-front{fill:#2f6b4f}
.fd-back{fill:#d9d3c4}
.fd-in{fill:#f1ebdd;stroke:#d9d3c4;stroke-width:.6}
.fd-fold{stroke:#8d8d88;stroke-width:1;stroke-dasharray:3 2.5}
.fd-arrow{fill:none;stroke:var(--accent);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.fd-ghost{fill:none;stroke:var(--muted);stroke-width:1;stroke-dasharray:2 2}
.fd-lab,.fd-up{font:600 8px var(--sans,system-ui);text-anchor:middle;fill:#3b3b38}
.fd-on{fill:#fff}
.fd-n{font:600 10px var(--sans,system-ui);text-anchor:middle;fill:var(--ink)}

@media(min-width:920px){
  .duo.fc-duo{grid-template-columns:minmax(0,1.05fr) minmax(0,.95fr);grid-template-areas:none}
  .duo.fc-duo>.pane-result,.duo.fc-duo>.pane-main{grid-area:auto}
  .fc-stage{position:sticky;top:1rem}
  .fc-card{width:min(62%,20rem)}
}
@media(max-width:360px){.fc-fronts{grid-template-columns:repeat(3,minmax(0,1fr))}}
