/* レイアウト：工房の作業台。左に道具の引き出し（レール）、中央に道具（パネル）、右にカッティングマットの上の作品。
   スマホでは作品が上、引き出しは横スクロールの帯になる。 */
:root {
  --paper: #eceee9;          /* 白鼠寄りの台紙 */
  --paper-deep: #e3e6e0;
  --surface: #f8f9f5;
  --ink: #1d2225;
  --ink-soft: #5a6367;
  --ink-faint: #8b9396;
  --line: #d2d8d1;
  --line-strong: #b9c2b9;
  --mat: #dde4db;
  --mat-line: #c9d2c7;
  --mat-line-strong: #b1bdae;
  --accent: #b3243f;         /* 紅花（山形の県花） */
  --accent-ink: #ffffff;
  --accent-soft: #f4dfe3;
  --ok: #2f6b45;
  --warn: #8a5a00;
  --ng: #a32424;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.6) inset, 0 10px 30px -12px rgb(29 34 37 / 0.28);
  --grain-opacity: 0.35;

  --font-display: "Dela Gothic One", "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-head: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --font-body: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", "Meiryo", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --radius: 7px;
  --gutter: clamp(16px, 3vw, 32px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #131618;
    --paper-deep: #0f1113;
    --surface: #1b1f22;
    --ink: #e6eae5;
    --ink-soft: #9ca59f;
    --ink-faint: #6f7875;
    --line: #2c3336;
    --line-strong: #3d464a;
    --mat: #182022;
    --mat-line: #20292b;
    --mat-line-strong: #2c3739;
    --accent: #e2607a;
    --accent-ink: #1a0a0e;
    --accent-soft: #3a1c23;
    --ok: #7cc49a;
    --warn: #e0b35a;
    --ng: #f08a8a;
    --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 30px -12px rgb(0 0 0 / 0.6);
    --grain-opacity: 0.18;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #131618;
  --paper-deep: #0f1113;
  --surface: #1b1f22;
  --ink: #e6eae5;
  --ink-soft: #9ca59f;
  --ink-faint: #6f7875;
  --line: #2c3336;
  --line-strong: #3d464a;
  --mat: #182022;
  --mat-line: #20292b;
  --mat-line-strong: #2c3739;
  --accent: #e2607a;
  --accent-ink: #1a0a0e;
  --accent-soft: #3a1c23;
  --ok: #7cc49a;
  --warn: #e0b35a;
  --ng: #f08a8a;
  --shadow: 0 1px 0 rgb(255 255 255 / 0.04) inset, 0 12px 30px -12px rgb(0 0 0 / 0.6);
  --grain-opacity: 0.18;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  padding-inline: var(--gutter);
  padding-block: 0 28px;
  position: relative;
}
/* 紙の粒子 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: var(--grain-opacity);
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .47 0 0 0 0 .44 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
body > * { position: relative; z-index: 1; }
img { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ 上の帯 */
.topbar {
  max-width: 1480px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  gap: 12px 24px;
  padding-block: 16px 14px;
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; flex: none; }
.seal {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1;
  border-radius: 4px;
  transform: rotate(-4deg);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent-ink) 25%, transparent);
  transition: transform .25s;
}
.brand:hover .seal { transform: rotate(3deg) scale(1.04); }
.wordmark { font-family: var(--font-display); font-size: 26px; line-height: 1; letter-spacing: .02em; white-space: nowrap; }
/* 名前の★だけ紅で、少しだけ上に浮かせる */
.wordmark-star { color: var(--accent); font-size: .78em; margin: 0 .06em; vertical-align: .12em; }
.edition {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .28em;
  padding: 3px 6px 2px;
  border: 1px solid var(--ink);
  border-radius: 2px;
  align-self: center;
}
.topbar-note { margin: 0; font-size: 12.5px; color: var(--ink-soft); flex: 1; min-width: 0; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
@media (max-width: 720px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; }
  .topbar-actions { gap: 2px; }
  .icon-btn { width: 34px; height: 34px; }
  .wordmark { font-size: 23px; }
  .seal { width: 36px; height: 36px; font-size: 21px; }
  .topbar-note { order: 3; flex-basis: 100%; }
  .topbar-actions { margin-left: auto; }
  .edition { display: none; }
}

/* ------------------------------------------------------------------ 全体の配置 */
.app {
  max-width: 1480px;
  margin-inline: auto;
  padding-block: 22px 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 430px) minmax(0, 1fr);
  grid-template-areas: "rail panels stage";
  gap: 26px;
  align-items: start;
}
.rail-wrap { grid-area: rail; }
.panels { grid-area: panels; }
.stage { grid-area: stage; }

@media (max-width: 1080px) {
  .app { grid-template-columns: 70px minmax(0, 1fr); grid-template-areas: "rail stage" "rail panels"; gap: 20px; }
}
@media (max-width: 760px) {
  .app { grid-template-columns: minmax(0, 1fr); grid-template-areas: "stage" "rail" "panels"; gap: 16px; }
}

/* ------------------------------------------------------------------ 引き出し（レール） */
.rail-wrap {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  min-width: 0;
}
.rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.rail-more { display: none; }
.rail button {
  appearance: none;
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 8px 2px 7px;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.2;
  border-radius: var(--radius);
  cursor: pointer;
}
.rail button > span:first-child {
  display: grid; place-items: center;
  width: 38px; height: 34px;
  border-radius: 9px;
  transition: background-color .15s, color .15s, transform .15s;
}
.rail button:hover { color: var(--ink); }
.rail button:hover > span:first-child { background: color-mix(in srgb, var(--ink) 7%, transparent); }
.rail button[aria-selected="true"] { color: var(--ink); font-weight: 700; }
.rail button[aria-selected="true"] > span:first-child {
  background: var(--ink);
  color: var(--paper);
  transform: rotate(-3deg);
}
.rail svg { width: 21px; height: 21px; }
@media (max-width: 760px) {
  .rail-wrap {
    top: env(safe-area-inset-top, 0px);
    z-index: 4;
    margin-inline: calc(var(--gutter) * -1);
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(8px);
    border-block: 1px solid var(--line);
  }
  .rail {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
    padding: 6px var(--gutter);
    scroll-padding-inline: 52px;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail button { flex: none; min-width: 60px; }

  /* 帯の続きがある側だけ、端をぼかして矢印を出す */
  .rail-more {
    display: grid;
    align-items: center;
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    width: 56px;
    padding: 0 8px;
    border: 0;
    color: var(--ink);
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
  }
  .rail-more.next { right: 0; justify-items: end; background: linear-gradient(to left, var(--paper) 42%, transparent); }
  .rail-more.prev { left: 0; justify-items: start; background: linear-gradient(to right, var(--paper) 42%, transparent); }
  .rail-more > span {
    display: grid; place-items: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.14);
  }
  .rail-more svg { width: 16px; height: 16px; }
  .rail-wrap[data-more-right="true"] .rail-more.next,
  .rail-wrap[data-more-left="true"] .rail-more.prev { opacity: 1; pointer-events: auto; }
  .rail-wrap[data-more-right="true"] .rail-more.next > span { animation: rail-nudge 1.1s ease-in-out .8s 2; }
}
@keyframes rail-nudge { 0%, 100% { transform: none; } 50% { transform: translateX(4px); } }

/* ------------------------------------------------------------------ パネル */
.panels { min-width: 0; }
.panel { display: grid; gap: 18px; min-width: 0; animation: panel-in .18s ease-out; }
@keyframes panel-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.panel-head h2 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: .04em;
  text-wrap: balance;
}
.panel-head p { margin: 6px 0 0; color: var(--ink-soft); font-size: 13.5px; text-wrap: pretty; max-width: 36em; }
.group { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .12em; color: var(--ink-soft); }
.fields { display: grid; gap: 12px; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span:first-child { font-size: 12.5px; color: var(--ink-soft); }
.field output { font-family: var(--font-mono); font-size: 12px; color: var(--ink); margin-left: 4px; }
.note { margin: 0; font-size: 12.5px; color: var(--ink-soft); text-wrap: pretty; }
input[type="text"], input[type="url"], input[type="email"], input[type="tel"], input[type="password"],
input[type="number"], input[type="datetime-local"], input[type="date"], select, textarea {
  width: 100%;
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ink) 10%, transparent); }
textarea { resize: vertical; line-height: 1.6; }
.with-button { display: flex; gap: 6px; }
.with-button input { flex: 1; }
.prefixed { display: flex; align-items: stretch; }
.prefixed .prefix {
  display: grid; place-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  background: var(--paper-deep);
  font-family: var(--font-mono);
  color: var(--ink-soft);
}
.prefixed input { border-radius: 0 var(--radius) var(--radius) 0; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }
.check.small { font-size: 12.5px; color: var(--ink-soft); gap: 6px; }
.check.small input { width: 16px; height: 16px; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

.fold summary {
  cursor: pointer;
  font-size: 13.5px;
  width: fit-content;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}
.fold summary::-webkit-details-marker { display: none; }
.fold summary::before { content: "+"; font-family: var(--font-mono); width: 1em; color: var(--accent); }
.fold[open] summary::before { content: "−"; }
.fold-body { display: grid; gap: 10px; padding: 12px 0 0 18px; border-left: 1px dashed var(--line-strong); margin-left: 5px; margin-top: 8px; }
.url-out {
  display: block;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
  padding: 8px 10px;
  background: var(--paper-deep);
  border-radius: var(--radius);
  overflow-wrap: anywhere;
}
.url-out:empty { display: none; }

/* ボタン */
.btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: color-mix(in srgb, var(--ink) 7%, var(--surface)); }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.22), 0 6px 14px -8px var(--accent);
}
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn.ghost { border-color: var(--line-strong); background: transparent; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; }
.button-row { display: flex; flex-wrap: wrap; gap: 8px; }
.icon-btn {
  appearance: none;
  display: grid; place-items: center;
  width: 38px; height: 38px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
  color: var(--ink);
}
.lang-btn { width: auto; min-width: 38px; padding: 0 8px; white-space: nowrap; font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: .04em; }
.icon-btn:hover { border-color: var(--line); background: var(--surface); }
.icon-btn:disabled { opacity: .35; cursor: default; background: transparent; border-color: transparent; }
.icon-btn svg { width: 20px; height: 20px; }
.dice { min-height: 38px; border-color: var(--line-strong); background: transparent; }
.dice svg { transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.dice:hover svg { transform: rotate(90deg); }
@media (max-width: 480px) { .dice-label { display: none; } .dice { padding: 0 10px; } }

.chip {
  appearance: none;
  border: 1px dashed var(--line-strong);
  background: transparent;
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 12.5px;
  cursor: pointer;
}
.chip:hover { border-style: solid; border-color: var(--ink-soft); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }

/* 区切りボタン */
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  background: var(--surface);
}
.seg.wide { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; }
.seg label { position: relative; min-width: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: block; padding: 7px 13px; font-size: 13px; color: var(--ink-soft); text-align: center; white-space: nowrap; }
.seg label + label span { border-left: 1px solid var(--line); }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -3px; }

/* 中身の種類 */
.type-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 400px) { .type-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; } }
.type-grid label { position: relative; }
.type-grid input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.type-grid span {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 9px 2px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 11.5px;
  color: var(--ink-soft);
  line-height: 1.2;
  text-align: center;
}
.type-grid svg { width: 20px; height: 20px; }
.type-grid input:checked + span { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.type-grid input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.sns-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.sns-grid label { position: relative; }
.sns-grid input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.sns-grid span {
  display: block;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 12px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sns-grid input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sns-grid input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 形のタイル */
.tiles { display: grid; grid-template-columns: repeat(var(--cols, 5), minmax(0, 1fr)); gap: 6px; }
.tiles.cols-4 { --cols: 4; }
.tiles.cols-6 { --cols: 6; }
@media (max-width: 480px) { #dotTiles { --cols: 4; } }
.tile { position: relative; }
.tile input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.tile span {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 9px 2px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 11px;
  color: var(--ink-soft);
  text-align: center;
  line-height: 1.25;
  white-space: nowrap;
  transition: border-color .15s;
}
.tile svg { width: 32px; height: 32px; display: block; }
.tile svg .ink { fill: var(--ink); }
.tile svg .sub { fill: var(--ink-faint); }
.tile svg .frame { fill: var(--ink); }
.tile svg .card { fill: color-mix(in srgb, var(--ink) 9%, var(--surface)); }
.tile:hover span { border-color: var(--line-strong); }
.tile input:checked + span { border-color: var(--ink); color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: color-mix(in srgb, var(--ink) 4%, var(--surface)); }
.tile input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.font-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.font-tiles label { position: relative; }
.font-tiles input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.font-tiles span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.font-tiles b { font-size: 20px; line-height: 1.2; font-weight: inherit; }
.font-tiles small { font-size: 11px; color: var(--ink-soft); }
.font-tiles input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.font-tiles input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.icon-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.icon-grid label { position: relative; }
.icon-grid input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.icon-grid span {
  display: grid; place-items: center;
  aspect-ratio: 1;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.icon-grid svg { width: 60%; height: 60%; }
.icon-grid svg path { fill: var(--ink); }
.icon-grid input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.icon-grid input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 配色 */
.presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 420px) { .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.preset { position: relative; }
.preset input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.preset span {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
  line-height: 1.25;
}
.preset i { width: 28px; height: 28px; border-radius: 4px; display: block; box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.12); position: relative; overflow: hidden; }
.preset i::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 7px; height: 7px; border-radius: 50%; background: var(--dot); box-shadow: 0 0 0 1.5px var(--ring); }
.preset b { font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preset input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.preset input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.color-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.color { display: flex; gap: 8px; align-items: center; }
.color input[type="color"] {
  flex: none;
  width: 44px; height: 40px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}
.color .hex { font-family: var(--font-mono); text-transform: lowercase; font-size: 14px; }
.color input[type="color"]:disabled { opacity: .35; cursor: default; }
.contrast { margin: 0; font-size: 12.5px; color: var(--ink-soft); font-family: var(--font-mono); }
.contrast b { font-weight: 500; color: var(--ink); }
.grad-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; align-items: end; }
.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.file-name { font-size: 12.5px; color: var(--ink-soft); min-width: 0; flex: 1; overflow-wrap: anywhere; }

/* 見本帳 */
.book-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.book-cats label { position: relative; }
.book-cats input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.book-cats span {
  display: inline-flex; align-items: baseline; gap: 5px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 4px 12px; font-size: 12.5px; color: var(--ink-soft); background: var(--surface);
}
.book-cats small { font-family: var(--font-mono); font-size: 10.5px; opacity: .7; }
.book-cats input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.book-cats input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.style-card[hidden] { display: none; }
/* ご当地：地方の絞り込みは分類の下に一段下げて並べる */
.book-cats.is-sub { margin: -4px 0 12px; padding-left: 10px; border-left: 2px solid var(--line-strong); gap: 4px; }
.book-cats.is-sub[hidden] { display: none; }
.book-cats.is-sub span { padding: 3px 10px; font-size: 12px; }
/* ご当地の札：県名を小さな朱の判で押したように */
.style-card.is-local small {
  justify-self: start; margin-top: 3px; padding: 0 5px 1px;
  border: 1px solid var(--accent); border-radius: 3px; color: var(--accent);
  font-family: var(--font-head); font-size: 10.5px; letter-spacing: .08em;
  transform: rotate(-3deg); transform-origin: left center;
}
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 761px) and (max-width: 1080px) { .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.style-card {
  appearance: none;
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.style-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.style-card .thumb {
  display: grid; place-items: center;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  aspect-ratio: 1;
  max-width: 100%;
  overflow: hidden;
  padding: 14px;
  background-color: var(--mat);
  background-image: linear-gradient(var(--mat-line) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 16px 16px;
}
.style-card img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgb(0 0 0 / 0.14)); }
.style-card .meta { display: grid; gap: 1px; padding: 9px 11px 10px; border-top: 1px solid var(--line); }
.style-card b { font-family: var(--font-head); font-size: 15px; font-weight: 700; }
.style-card small { font-size: 11px; color: var(--ink-soft); }

.video-canvas { width: min(100%, 240px); height: auto; border-radius: 8px; border: 1px solid var(--line); background: #000; }

/* 印刷物 */
#prKinds span { padding-inline: 4px; }
.print-preview { margin: 0; display: grid; gap: 6px; }
.print-preview img {
  width: 100%; max-height: 460px; object-fit: contain;
  padding: 14px; border-radius: 10px; border: 1px solid var(--line);
  background-color: var(--mat);
  background-image: linear-gradient(var(--mat-line) 1px, transparent 1px), linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 16px 16px;
}
.print-preview img:not([src]) { visibility: hidden; height: 200px; }

/* 読み取り */
.drop {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 28px 16px;
  border: 1.5px dashed var(--line-strong);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); background: var(--accent-soft); }
.drop svg { width: 28px; height: 28px; color: var(--accent); }
.drop strong { font-size: 14px; }
.drop span:last-child { font-size: 12px; color: var(--ink-soft); }
#cameraView { width: 100%; max-width: 100%; border-radius: 12px; background: #000; aspect-ratio: 4 / 3; object-fit: cover; }
.scan-result { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.scan-result pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 12.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-height: 220px;
  overflow: auto;
}

/* 保存庫 */
.designs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.design {
  position: relative;
  display: grid;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface);
  overflow: hidden;
}
.design button.apply { appearance: none; border: 0; background: transparent; padding: 0; cursor: pointer; display: grid; text-align: left; }
.design img { width: 100%; aspect-ratio: 1; object-fit: contain; background: var(--mat); padding: 8px; }
.design b { font-size: 12.5px; font-weight: 500; padding: 6px 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.design .remove {
  position: absolute; top: 4px; right: 4px;
  width: 24px; height: 24px;
  border: 0; border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 70%, transparent);
  color: var(--paper);
  font-size: 14px; line-height: 1;
  cursor: pointer;
  opacity: 0;
  transition: opacity .15s;
}
.design:hover .remove, .design .remove:focus-visible { opacity: 1; }
@media (hover: none) { .design .remove { opacity: 1; } }
.history-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.history-list button {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: 4.2em minmax(0, 1fr) auto;
  gap: 10px;
  align-items: baseline;
  text-align: left;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}
.history-list button:hover { background: var(--surface); border-color: var(--line); }
.history-list .kind { font-size: 11px; letter-spacing: .06em; color: var(--accent); }
.history-list .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.history-list time { font-family: var(--font-mono); font-size: 11px; color: var(--ink-soft); }

progress { width: 100%; height: 6px; accent-color: var(--accent); }

/* ------------------------------------------------------------------ 作品（ステージ） */
.stage {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}
@media (min-width: 1081px) {
  /* 画面より高くなったら、プレビュー側だけでスクロールできるように */
  .stage {
    max-height: calc(100vh - 28px);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    padding: 2px 8px 18px;
    margin-inline: -8px;
  }
}
@media (max-width: 1080px) { .stage { position: static; } }
.scene-bar { justify-self: start; display: grid; grid-auto-flow: column; grid-auto-columns: auto; }
.scene-bar span { padding: 6px 12px; font-size: 12.5px; }
@media (max-width: 480px) {
  .scene-bar { justify-self: stretch; grid-auto-columns: minmax(0, 1fr); width: 100%; }
  .scene-bar span { padding: 6px 2px; font-size: 12px; }
}

.mat {
  position: relative;
  aspect-ratio: 5 / 4;
  width: 100%;
  max-width: 100%;
  max-height: 68vh;
  min-width: 0;
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  padding: clamp(26px, 6%, 54px);
  border-radius: 10px;
  background-color: var(--mat);
  background-image:
    repeating-linear-gradient(90deg, var(--mat-line-strong) 0 1px, transparent 1px 10px),
    repeating-linear-gradient(90deg, var(--mat-line-strong) 0 1px, transparent 1px 50px),
    repeating-linear-gradient(0deg, var(--mat-line-strong) 0 1px, transparent 1px 10px),
    linear-gradient(var(--mat-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line-strong) 1px, transparent 1px),
    linear-gradient(var(--mat-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--mat-line) 1px, transparent 1px);
  background-size: 100% 7px, 100% 12px, 7px 100%, 100px 100px, 100px 100px, 20px 20px, 20px 20px;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, repeat, repeat, repeat;
  background-position: 0 0, 0 0, 0 0, -1px -1px, -1px -1px, -1px -1px, -1px -1px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.mat.scene { padding: 0; }
.mat img { width: 100%; height: 100%; object-fit: contain; grid-area: 1 / 1; -webkit-touch-callout: default; }
#preview { filter: drop-shadow(0 1px 1px rgb(0 0 0 / 0.08)) drop-shadow(0 12px 22px rgb(0 0 0 / 0.14)); }
#sceneImg { object-fit: cover; }
.mat img.stamp { animation: stamp .32s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes stamp { 0% { transform: scale(1.025); opacity: .7; } 60% { transform: scale(.995); opacity: 1; } 100% { transform: none; } }
.empty { margin: 0; color: var(--ink-soft); text-align: center; max-width: 18em; grid-area: 1 / 1; }
.scene-title { max-width: 340px; }

.sticker-box {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  min-width: 0;
}
.sticker-head { display: grid; gap: 4px; }
.sticker-title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 18px; letter-spacing: .04em; }
.sticker-head .note b { font-family: var(--font-mono); font-weight: 500; color: var(--ink); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; align-items: end; }
.sticker-notes { margin: 0; padding-left: 1.1em; display: grid; gap: 4px; font-size: 12px; color: var(--ink-soft); }
.sticker-notes b { color: var(--ink); font-weight: 500; }

.cricut {
  display: grid;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
}
.cricut-head { display: grid; gap: 2px; }
.cricut-size { margin: 0; font-size: 14px; }
.cricut-size b { font-family: var(--font-mono); font-weight: 500; font-size: 16px; }
.steps { margin: 0; padding-left: 2.2em; display: grid; gap: 5px; font-size: 13px; }
.steps li::marker { font-family: var(--font-mono); color: var(--accent); }
.steps b { font-weight: 700; }
.steps b.mm { font-family: var(--font-mono); background: var(--accent-soft); padding: 0 4px; border-radius: 3px; }
.cricut-methods { display: grid; gap: 12px; }
.cricut-method {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  min-width: 0;
}
.method-title { margin: 0; font-weight: 700; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.method-title small {
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 1px 7px;
  border-radius: 999px;
}
.cricut-map { margin: 0; display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 12px; align-items: center; }
.cricut-map img { width: 100%; max-width: 100%; height: auto; border-radius: 3px; box-shadow: 0 1px 4px rgb(0 0 0 / 0.18); background: #fff; }
.cricut-map figcaption { font-size: 12.5px; color: var(--ink-soft); }
.cricut-map figcaption b { color: var(--ink); font-family: var(--font-mono); font-weight: 500; }
@media (max-width: 420px) { .cricut-map { grid-template-columns: minmax(0, 120px) minmax(0, 1fr); } }

.readout { display: flex; align-items: center; gap: 14px; }
.score { position: relative; width: 56px; height: 56px; flex: none; }
.score svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score circle { fill: none; stroke-width: 4; }
.score .track { stroke: var(--line); }
.score .meter { stroke: var(--ink-faint); stroke-linecap: round; stroke-dasharray: 113.1; stroke-dashoffset: 113.1; transition: stroke-dashoffset .5s ease, stroke .3s; }
.score strong { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 17px; font-weight: 500; font-variant-numeric: tabular-nums; }
.score[data-level="great"] .meter, .score[data-level="good"] .meter { stroke: var(--ok); }
.score[data-level="caution"] .meter { stroke: var(--warn); }
.score[data-level="poor"] .meter { stroke: var(--ng); }
.score-text { min-width: 0; }
.score-label { margin: 0; font-weight: 700; font-size: 14px; }
.scan { margin: 0; font-size: 13px; color: var(--ink-soft); text-wrap: pretty; }
.score[data-level="great"] + .score-text .score-label, .score[data-level="good"] + .score-text .score-label { color: var(--ok); }
.score[data-level="caution"] + .score-text .score-label { color: var(--warn); }
.score[data-level="poor"] + .score-text .score-label { color: var(--ng); }

.stress { border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }
.stress summary { cursor: pointer; list-style: none; padding: 10px 14px; font-weight: 700; font-size: 14px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.stress summary::-webkit-details-marker { display: none; }
.stress summary::before { content: "+"; font-family: var(--font-mono); color: var(--accent); width: 1em; }
.stress[open] summary::before { content: "−"; }
.stress summary small { font-weight: 400; font-size: 12px; color: var(--ink-soft); }
.stress-body { display: grid; gap: 10px; padding: 0 14px 14px; justify-items: start; }
.stress-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; width: 100%; }
.stress-list li { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px 6px 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.stress-list img { width: 52px; height: 52px; object-fit: cover; border-radius: 3px; background: #fff; }
.stress-list b { display: block; font-size: 13px; }
.stress-list small { display: block; font-size: 11.5px; color: var(--ink-soft); line-height: 1.5; }
.stress-list .mark { font-family: var(--font-mono); font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.stress-list .mark[data-r="2"] { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.stress-list .mark[data-r="1"] { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.stress-list .mark[data-r="0"] { background: color-mix(in srgb, var(--ng) 14%, transparent); color: var(--ng); }
.spec { margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-block: 1px solid var(--line); }
.spec > div { padding: 7px 10px; min-width: 0; }
.spec > div + div { border-left: 1px solid var(--line); }
.spec dt { font-size: 10.5px; color: var(--ink-soft); letter-spacing: .1em; }
.spec dd { margin: 0; font-family: var(--font-mono); font-size: 14.5px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) {
  .spec { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .spec > div:nth-child(3) { border-left: 0; }
  .spec > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
.print-note { margin: 0; font-size: 12.5px; color: var(--ink-soft); text-wrap: pretty; }
.print-note strong { color: var(--ink); font-family: var(--font-mono); font-weight: 500; }
.warnings { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.warnings li { font-size: 12.5px; padding: 7px 12px; border-left: 3px solid var(--warn); background: color-mix(in srgb, var(--warn) 10%, var(--surface)); border-radius: 0 4px 4px 0; }
.quick-export { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.quick-export select { width: auto; min-height: 42px; padding-block: 0; font-family: var(--font-mono); font-size: 14px; }
.hint { margin: 0; font-size: 12px; color: var(--ink-soft); }

.mini-preview {
  position: fixed;
  right: 16px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  width: 78px; height: 78px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.2);
  cursor: pointer;
  z-index: 6;
}
.mini-preview img { width: 100%; height: 100%; object-fit: contain; display: block; }

.foot { max-width: 1480px; margin: 40px auto 0; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--ink-soft); }
.foot p { margin: 0 0 4px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 24px);
  transform: translate(-50%, 12px);
  max-width: calc(100% - 32px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 10;
  text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* 全部入り（App Store 版だけ） */
.pro-open { min-height: 36px; padding: 0 12px; font-size: 13px; border-color: var(--accent); color: var(--accent); background: transparent; }
.pro-open-star { font-size: 12px; }
.pro-open.is-owned { border-color: var(--line-strong); color: var(--ink-soft); }
@media (max-width: 720px) { .pro-open .pro-open-label { font-size: 12px; } }
/* 鍵のかかった見本：札の右上に小さな★ */
.pro-gated .style-card.is-locked .thumb { position: relative; }
.pro-gated .style-card.is-locked .thumb::after {
  content: "★"; position: absolute; top: 6px; right: 6px;
  display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 11px;
}
.pro-gated .style-card.is-locked img { opacity: .78; }
.pro-gated .needs-pro::after { content: "★"; margin-left: 4px; color: var(--accent); font-size: .85em; }
.pro-gated .btn.primary.needs-pro::after { color: inherit; }
body.has-sheet { overflow: hidden; }
.pro-sheet {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  padding: 16px; padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  background: color-mix(in srgb, var(--ink) 42%, transparent);
}
.pro-sheet[hidden] { display: none; }
.pro-card {
  width: min(460px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: var(--shadow); padding: 22px 22px 18px;
}
.pro-card h2 { margin: 0 0 6px; font-family: var(--font-head); font-size: 22px; }
.pro-why { margin: 0 0 6px; color: var(--accent); font-weight: 600; font-size: 14px; }
.pro-lead { margin: 0 0 12px; font-size: 14px; }
.pro-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.pro-list li { position: relative; padding-left: 20px; }
.pro-list li::before { content: "★"; position: absolute; left: 0; top: .05em; color: var(--accent); font-size: 12px; }
.pro-free, .pro-note { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.6; }
.pro-note { margin: 12px 0 0; }
.pro-owned { margin: 0 0 12px; color: var(--ok); font-weight: 600; font-size: 14px; }
.pro-status { margin: 0 0 12px; font-size: 13px; padding: 8px 10px; border-radius: var(--radius); background: var(--paper-deep); }
.pro-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pro-actions #proBuy { flex: 1 1 100%; min-height: 48px; font-size: 15px; }
.pro-actions .btn.ghost { flex: 1 1 0; }
/* 全部入りの見本を試着しているときの札（QRに重ねず、台紙のすぐ下に） */
.tryon {
  display: flex; align-items: baseline; justify-content: center; gap: 6px; flex-wrap: wrap;
  width: 100%; margin-top: 10px; padding: 9px 14px; border: 0; border-radius: var(--radius);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-size: 13.5px; cursor: pointer;
}
.tryon[hidden] { display: none; }
.tryon small { font-size: 12px; opacity: .88; }
.tryon:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* 動くQR：お試しと見本の一覧 */
.motion-stage { display: flex; gap: 14px; align-items: flex-start; margin: 10px 0 12px; }
.motion-preview { width: 132px; height: auto; flex: none; border-radius: 8px; border: 1px solid var(--line); background: var(--paper-deep); }
.motion-now { min-width: 0; display: grid; gap: 6px; justify-items: start; }
.motion-name { margin: 0; font-family: var(--font-head); font-size: 20px; font-weight: 700; }
.motion-now .note { margin: 0; }
.motion-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px; margin-bottom: 10px;
  max-height: 340px; overflow-y: auto; padding: 2px 4px 2px 2px; overscroll-behavior: contain;
}
#videoGroup > .button-row { margin: 8px 0 14px; }
.motion-card {
  appearance: none; display: grid; gap: 2px; text-align: left; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer;
}
.motion-card[hidden] { display: none; }
.motion-card b { font-size: 13.5px; }
.motion-card small { font-size: 10.5px; color: var(--ink-soft); line-height: 1.35; }
.motion-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.motion-card[aria-pressed="true"] b::before { content: "★ "; color: var(--accent); }
.motion-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.motion-mix { margin-bottom: 12px; }
.motion-mix summary { cursor: pointer; font-size: 13.5px; padding: 4px 0; }
.motion-mix-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
