/* Local Toolbox — kurokitools.com
   A print shop after dark: deep ink bands, the four process colours (C/M/Y/K) as the registration strip
   and as the colour of each tool, crop marks (トンボ) around the place where you work on a picture. */

:root {
  --paper: #f4f6f9;
  --sheet: #ffffff;
  --ink: #18202c;
  --ink-2: #0f1520;
  --ink-3: #222c3b;
  --muted: #5a6573;
  --line: #dde2ea;
  --cyan: #00799e;
  --cyan-ink: #005f7c;
  --cyan-soft: #e3f2f7;
  --c: #00a3d7;
  --m: #d6246e;
  --y: #f2b705;
  --k: #18202c;
  --r: #7b5cff;
  --magenta: #b5175a;
  --magenta-soft: #fbe9f0;
  --ok: #2e7d4f;
  --ok-soft: #e7f4ec;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(15, 21, 32, 0.06), 0 12px 32px -12px rgba(15, 21, 32, 0.18);
  --measure: 40rem;
  --wide: 72rem;
  --font: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12171f;
    --sheet: #1a212c;
    --ink: #e9edf2;
    --muted: #a3adba;
    --line: #2f3846;
    --cyan: #4fbfe0;
    --cyan-ink: #7fd3ec;
    --cyan-soft: #15333f;
    --k: #e9edf2;
    --magenta: #f06d9f;
    --magenta-soft: #3a1a28;
    --ok: #6fcf97;
    --ok-soft: #173326;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 12px 32px -12px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.9; letter-spacing: 0.02em; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-ink); text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--c); outline-offset: 2px; border-radius: 3px; }
.num { font-variant-numeric: tabular-nums; }
.wrap { width: 100%; max-width: var(--wide); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; background: var(--sheet); padding: 8px 12px; z-index: 10; }
.flush { margin-top: 0; }

/* ---------- header / footer (always deep ink) ---------- */
.site-head { background: var(--ink-2); color: #fff; }
.site-head .wrap { display: flex; align-items: center; gap: 0 24px; min-height: 64px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 1.08rem; letter-spacing: 0.05em; }
.brand__mark { width: 28px; height: 28px; flex: none; }
.site-nav { display: flex; gap: 4px 22px; flex-wrap: wrap; }
@media (min-width: 640px) { .site-nav { margin-left: auto; } }
.site-nav a { color: rgba(255, 255, 255, 0.82); text-decoration: none; font-size: 0.95rem; padding: 8px 0; border-bottom: 2px solid transparent; }
.site-nav a[aria-current="page"], .site-nav a:hover { color: #fff; border-bottom-color: var(--c); }
.cmyk { display: grid; grid-template-columns: repeat(4, 1fr); height: 4px; }
.cmyk span:nth-child(1) { background: var(--c); }
.cmyk span:nth-child(2) { background: var(--m); }
.cmyk span:nth-child(3) { background: var(--y); }
.cmyk span:nth-child(4) { background: #3a4456; }

.site-foot { margin-top: 112px; background: var(--ink-2); color: rgba(255, 255, 255, 0.7); font-size: 0.9rem; }
.site-foot .wrap { display: grid; gap: 28px; padding-top: 48px; padding-bottom: 48px; }
@media (min-width: 760px) { .site-foot .wrap { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-foot h2 { font-size: 0.95rem; color: #fff; margin: 0 0 10px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin: 4px 0; }
.site-foot a { color: rgba(255, 255, 255, 0.78); }
.site-foot a:hover { color: #fff; }
.site-foot p { margin: 0 0 8px; }

/* ---------- type ---------- */
h1, h2, h3 { line-height: 1.45; letter-spacing: 0.03em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 1.2rem + 2vw, 2.6rem); margin: 0 0 14px; }
h2 { font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.6rem); margin: 64px 0 16px; }
h3 { font-size: 1.12rem; margin: 32px 0 8px; }
p { margin: 0 0 1.1em; }
.lead { font-size: 1.08rem; max-width: var(--measure); }

.crumbs { font-size: 0.85rem; margin: 0 0 18px; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 10px; padding: 0; margin: 0; }
.crumbs li + li::before { content: "/"; margin-right: 10px; opacity: 0.4; }
.crumbs a { color: inherit; opacity: 0.8; }

/* ---------- page hero band (every page except home) ---------- */
.page-hero {
  background:
    radial-gradient(60rem 22rem at 100% 0%, rgba(0, 163, 215, 0.22), transparent 60%),
    radial-gradient(40rem 20rem at 0% 120%, rgba(214, 36, 110, 0.18), transparent 60%),
    var(--ink-3);
  color: #fff; padding: 28px 0 40px;
}
.page-hero h1 { max-width: 24em; }
.page-hero .lead { color: rgba(255, 255, 255, 0.82); margin-bottom: 0; }
.page-hero .article-meta { color: rgba(255, 255, 255, 0.65); margin: 0 0 12px; font-size: 0.85rem; }
.page-hero .crumbs { color: rgba(255, 255, 255, 0.75); }
.page-hero--tool { padding-bottom: 96px; }
.page-hero--tool + .main-body > .tool:first-child { margin-top: -72px; position: relative; }
.main-body { padding-top: 32px; }
.page-hero--tool + .main-body { padding-top: 0; }

/* ---------- home ---------- */
.home-hero {
  background:
    radial-gradient(48rem 28rem at 85% 30%, rgba(0, 163, 215, 0.28), transparent 60%),
    radial-gradient(36rem 24rem at 10% 110%, rgba(214, 36, 110, 0.22), transparent 60%),
    radial-gradient(26rem 18rem at 60% -10%, rgba(242, 183, 5, 0.14), transparent 60%),
    var(--ink-2);
  color: #fff; padding: 56px 0 72px; overflow: hidden;
}
.home-hero__grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .home-hero__grid { grid-template-columns: 1.05fr 1fr; } }
.home-hero__kicker { display: inline-block; font-size: 0.85rem; font-weight: 700; color: var(--y); margin: 0 0 14px; padding: 2px 12px; border: 1px solid rgba(242, 183, 5, 0.5); border-radius: 999px; }
.home-hero h1 { font-size: clamp(1.9rem, 1.1rem + 3.2vw, 3.3rem); line-height: 1.32; margin: 0 0 20px; }
.home-hero__lead { color: rgba(255, 255, 255, 0.82); font-size: 1.08rem; max-width: 34em; margin-bottom: 28px; }
.home-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* hero visual: a photo on the cutting mat */
.hv { position: relative; padding: 28px 18px 40px; }
.hv__frame { position: relative; border-radius: 12px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.08); transform: rotate(-2deg); }
.hv__img { display: block; width: 100%; height: auto; }
.hv__crop { position: absolute; inset: 9% 12% 14% 10%; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(10, 14, 22, 0.42); }
.hv__crop::before, .hv__crop::after { content: ""; position: absolute; width: 18px; height: 18px; border: 4px solid #fff; }
.hv__crop::before { left: -4px; top: -4px; border-width: 4px 0 0 4px; }
.hv__crop::after { right: -4px; bottom: -4px; border-width: 0 4px 4px 0; }
.hv__chip { position: absolute; font-size: 0.85rem; font-weight: 700; padding: 8px 14px; border-radius: 999px; background: #fff; color: #18202c; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.5); white-space: nowrap; }
.hv__chip em { font-style: normal; font-weight: 400; color: #5a6573; margin: 0 6px; }
.hv__chip--size { left: 0; top: 0; border-left: 6px solid var(--c); }
.hv__chip--gps { right: 0; top: 38%; border-left: 6px solid var(--m); }
.hv__chip--px { left: 14%; bottom: 0; border-left: 6px solid var(--y); }
@media (prefers-reduced-motion: no-preference) {
  .hv__chip { animation: chip-in 0.7s cubic-bezier(.2, .8, .2, 1) both; }
  .hv__chip--gps { animation-delay: 0.25s; }
  .hv__chip--px { animation-delay: 0.5s; }
  @keyframes chip-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } to { opacity: 1; transform: none; } }
}

.home-tools h2 { margin-top: 0; }
.main-body > .home-tools:first-child { margin-top: 56px; }

/* tool cards: each tool has its own process colour */
.tcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 640px) { .tcards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tcards { grid-template-columns: repeat(3, 1fr); } }
.tcard { --tc: var(--c); }
.tcard--m { --tc: var(--m); }
.tcard--y { --tc: var(--y); }
.tcard--r { --tc: var(--r); }
.tcard--k { --tc: #3a4456; }
.tcard a {
  position: relative; display: grid; gap: 8px; height: 100%; padding: 22px 22px 20px; border-radius: var(--radius);
  background: var(--sheet); color: var(--ink); text-decoration: none; box-shadow: var(--shadow);
  border-top: 4px solid var(--tc); transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.tcard a:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 21, 32, 0.06), 0 22px 40px -14px rgba(15, 21, 32, 0.3); }
.tcard__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--tc) 14%, transparent); color: var(--tc); }
.tcard--y .tcard__icon { color: #a87b00; }
@media (prefers-color-scheme: dark) { .tcard--y .tcard__icon { color: var(--y); } .tcard--k .tcard__icon { color: #c9d2de; } }
.tcard__icon svg { width: 26px; height: 26px; }
.tcard__title { font-size: 1.15rem; }
.tcard__text { color: var(--muted); font-size: 0.93rem; line-height: 1.75; }
.tcard__go { font-size: 0.88rem; font-weight: 700; color: var(--cyan-ink); margin-top: 4px; }

/* guide cards */
.gcards { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 760px) { .gcards { grid-template-columns: repeat(2, 1fr); } }
.gcard a { display: grid; gap: 6px; height: 100%; padding: 20px 22px; border-radius: var(--radius); background: var(--sheet); border: 1px solid var(--line); color: var(--ink); text-decoration: none; transition: border-color 0.2s ease; }
.gcard a:hover { border-color: var(--cyan); }
.gcard a:hover .gcard__title { color: var(--cyan-ink); }
.gcard__meta { display: flex; gap: 10px; align-items: center; font-size: 0.8rem; color: var(--muted); }
.gcard__topic { font-weight: 700; color: var(--cyan-ink); background: var(--cyan-soft); padding: 1px 10px; border-radius: 999px; }
.gcard__title { font-size: 1.05rem; line-height: 1.6; }
.gcard__text { color: var(--muted); font-size: 0.9rem; line-height: 1.75; }

.promise { display: grid; gap: 16px; margin: 0; }
@media (min-width: 760px) { .promise { grid-template-columns: repeat(3, 1fr); } }
.promise > div { background: var(--sheet); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.promise dt { font-weight: 700; line-height: 1.6; }
.promise dd { margin: 8px 0 0; color: var(--muted); font-size: 0.93rem; }

.band { margin-top: 64px; padding: 32px; border-radius: 16px; background: var(--ink-3); color: #fff; display: grid; gap: 8px 32px; }
@media (min-width: 860px) { .band { grid-template-columns: 1fr 1.6fr; align-items: center; } }
.band h2 { margin: 0; color: #fff; }
.band p { margin: 0; color: rgba(255, 255, 255, 0.82); }
.band a { color: #8fdcf5; }

/* ---------- crop marks (the place where you work) ---------- */
.marks { position: relative; padding: 28px; }
.marks::before, .marks::after, .marks > .marks__b::before, .marks > .marks__b::after {
  content: ""; position: absolute; width: 22px; height: 22px; pointer-events: none;
  border-color: var(--ink); border-style: solid; border-width: 0;
}
.marks::before { top: 8px; left: 8px; border-top-width: 1.5px; border-left-width: 1.5px; }
.marks::after { top: 8px; right: 8px; border-top-width: 1.5px; border-right-width: 1.5px; }
.marks > .marks__b::before { bottom: 8px; left: 8px; border-bottom-width: 1.5px; border-left-width: 1.5px; }
.marks > .marks__b::after { bottom: 8px; right: 8px; border-bottom-width: 1.5px; border-right-width: 1.5px; }

.btn--lg { min-height: 52px; padding: 10px 24px; font-size: 1.02rem; }
.home-hero .btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.home-hero .btn--ghost:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }

/* ---------- tool area ---------- */
.tool { background: var(--sheet); margin: 8px 0 0; border-radius: 14px; box-shadow: var(--shadow); padding: 36px; }
@media (max-width: 640px) { .tool { padding: 28px 18px; } }
.tool__grid { display: grid; gap: 24px; }
@media (min-width: 900px) { .tool__grid { grid-template-columns: 1.1fr 1fr; align-items: start; } }
.drop {
  display: grid; place-items: center; text-align: center; gap: 6px; min-height: 200px; padding: 28px 16px;
  border: 2px dashed color-mix(in srgb, var(--cyan) 45%, var(--line)); border-radius: var(--radius); background: linear-gradient(180deg, var(--cyan-soft), transparent 140%); cursor: pointer; transition: background 0.2s ease, border-color 0.2s ease;
}
.drop:hover, .drop.is-over { border-color: var(--cyan); background: var(--cyan-soft); }
.drop__title { font-weight: 700; font-size: 1.15rem; display: inline-flex; align-items: center; gap: 10px; }
.drop__title::before { content: "+"; display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--cyan); color: #fff; font-size: 1.3rem; line-height: 1; }
.drop__hint { font-size: 0.85rem; color: var(--muted); }
.chosen { font-size: 0.85rem; color: var(--muted); margin: 10px 0 0; word-break: break-all; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > span, .field legend { font-weight: 700; font-size: 0.95rem; }
fieldset.field { border: 0; padding: 0; margin: 0; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.input, select.input {
  font: inherit; color: var(--ink); background: var(--sheet); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 10px; min-height: 44px; min-width: 0;
}
.input:focus { border-color: var(--cyan); }
.input--num { width: 8.5em; }
input[type="range"] { width: 100%; accent-color: var(--cyan); }
.radio { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; min-height: 36px; }
.radio input, .check input { accent-color: var(--cyan); width: 18px; height: 18px; }
.check { display: inline-flex; align-items: center; gap: 8px; }
.help { font-size: 0.85rem; color: var(--muted); margin: 0; }

.btn {
  font: inherit; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 18px; border-radius: var(--radius); cursor: pointer;
  border: 1px solid var(--line); background: var(--sheet); color: var(--ink);
}
.btn:hover { border-color: var(--cyan); }
.btn--primary { background: var(--cyan); border-color: var(--cyan); color: #fff; }
.btn--primary:hover { background: var(--cyan-ink); }
@media (prefers-color-scheme: dark) { .btn--primary { color: #0d1a20; } }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.chip { font: inherit; font-size: 0.85rem; min-height: 36px; padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); cursor: pointer; }
.chip[aria-pressed="true"] { border-color: var(--cyan); background: var(--cyan-soft); color: var(--cyan-ink); font-weight: 700; }

.status { font-size: 0.92rem; min-height: 1.6em; margin: 12px 0 0; color: var(--muted); }
.status[data-kind="ok"] { color: var(--ok); }
.status[data-kind="error"] { color: var(--magenta); }

.results { display: grid; gap: 12px; margin-top: 16px; }
.result { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); align-items: center; }
.result__thumb img { width: 96px; height: 96px; object-fit: contain; background: repeating-conic-gradient(var(--line) 0 25%, transparent 0 50%) 0 0 / 16px 16px; border-radius: 4px; }
.result__size { font-weight: 700; margin: 0; }
.result__meta, .result__note { font-size: 0.85rem; color: var(--muted); margin: 0 0 8px; }
.result--error { display: block; color: var(--magenta); }

/* EXIF cards */
.exif { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--paper); }
.exif__head { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.exif__name { word-break: break-all; }
.tag { font-size: 0.8rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.tag--warn { background: var(--magenta-soft); color: var(--magenta); }
.tag--note { background: var(--cyan-soft); color: var(--cyan-ink); }
.tag--ok { background: var(--ok-soft); color: var(--ok); }
.kvs { margin: 12px 0 0; display: grid; gap: 4px; }
.kv { display: grid; grid-template-columns: 9em 1fr; gap: 12px; font-size: 0.92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
.kv--warn dd { color: var(--magenta); font-weight: 700; }
.exif__actions { margin-top: 12px; }

/* crop */
.cropper { margin-top: 20px; }
.cropper__tools { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ratios { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.cropper__stage { position: relative; margin: 0 auto; overflow: hidden; touch-action: none; user-select: none; max-width: 100%; }
.cropper__canvas { display: block; width: 100%; height: 100%; }
.cropper__box { position: absolute; border: 2px solid #fff; outline: 1px solid rgba(0, 0, 0, 0.5); box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); cursor: move; }
.cropper__box span { position: absolute; width: 20px; height: 20px; border: 3px solid #fff; }
.cropper__box [data-corner="nw"] { left: -3px; top: -3px; border-width: 3px 0 0 3px; cursor: nwse-resize; }
.cropper__box [data-corner="ne"] { right: -3px; top: -3px; border-width: 3px 3px 0 0; cursor: nesw-resize; }
.cropper__box [data-corner="sw"] { left: -3px; bottom: -3px; border-width: 0 0 3px 3px; cursor: nesw-resize; }
.cropper__box [data-corner="se"] { right: -3px; bottom: -3px; border-width: 0 3px 3px 0; cursor: nwse-resize; }
.cropper__size { text-align: center; font-size: 0.85rem; color: var(--muted); margin: 8px 0 12px; }


/* ---------- article ---------- */
.article { max-width: var(--measure); }
.article-meta { font-size: 0.85rem; color: var(--muted); margin: -4px 0 28px; }
.article > h2:first-of-type, .toc + h2 { margin-top: 40px; }
.article h2 { padding-left: 14px; border-left: 4px solid var(--c); }
.toc { background: var(--sheet); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin: 0 0 8px; font-size: 0.95rem; max-width: var(--measure); }
.toc p { font-weight: 700; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.4em; }
.article ul, .article ol { padding-left: 1.4em; margin: 0 0 1.2em; }
.article li { margin: 4px 0; }
.article table, .main-body table { width: 100%; border-collapse: collapse; margin: 8px 0 24px; font-size: 0.92rem; display: block; overflow-x: auto; background: var(--sheet); border-radius: var(--radius); }
.main-body th, .main-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; min-width: 6em; }
.main-body th { background: var(--ink-3); color: #fff; border-color: var(--ink-3); }
.main-body > h2 { padding-left: 14px; border-left: 4px solid var(--c); }
.main-body > .home-tools h2, .main-body > h2.plain { padding-left: 0; border-left: 0; }
.note { border: 1px solid var(--line); background: var(--sheet); border-radius: var(--radius); padding: 14px 16px; margin: 20px 0; font-size: 0.95rem; }
.note--warn { border-color: var(--magenta); background: var(--magenta-soft); }
.note p:last-child { margin-bottom: 0; }
.faq dt { font-weight: 700; margin-top: 22px; }
.faq dt::before { content: "Q"; display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: 8px; border-radius: 6px; background: var(--c); color: #fff; font-size: 0.85em; }
.faq dd { margin: 6px 0 0; padding-left: calc(1.6em + 8px); }
.related { margin-top: 56px; padding: 22px 24px; border-radius: var(--radius); background: var(--sheet); box-shadow: var(--shadow); max-width: var(--measure); }
.related h2 { margin: 0 0 8px; font-size: 1.05rem; padding: 0; border: 0; }
.related ul { padding-left: 1.2em; margin: 0; }
kbd { font-family: inherit; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; font-size: 0.9em; background: var(--sheet); }
code { font-size: 0.9em; background: var(--sheet); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.kvs { margin: 12px 0 0; display: grid; gap: 4px; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
.btn { text-decoration: none; }
.tool + .toc, .tool + p + .toc { margin-top: 48px; }

/* =====================================================================
   Windows 11 (Fluent) theme — sample. Overrides the print-shop theme above.
   Mica-like tinted background, acrylic title bar, 8px rounded cards with hairline
   strokes, accent blue, Segoe UI Variable / Yu Gothic UI.
   ===================================================================== */
:root {
  --paper: #f3f3f3;
  --sheet: rgba(255, 255, 255, 0.78);
  --sheet-solid: #fbfbfb;
  --ink: #1b1b1b;
  --muted: #5d5d5d;
  --line: rgba(0, 0, 0, 0.08);
  --stroke: rgba(0, 0, 0, 0.0578);
  --cyan: #0067c0;
  --cyan-ink: #005fb8;
  --cyan-soft: rgba(0, 103, 192, 0.09);
  --c: #0067c0;
  --m: #c239b3;
  --y: #ca5010;
  --r: #8764b8;
  --radius: 8px;
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --shadow-hi: 0 8px 16px rgba(0, 0, 0, 0.14), 0 0 0 1px rgba(0, 0, 0, 0.05);
  --font: "Segoe UI Variable Text", "Segoe UI", "Yu Gothic UI", "Meiryo UI", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", "Yu Gothic UI", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #202020;
    --sheet: rgba(45, 45, 45, 0.72);
    --sheet-solid: #2b2b2b;
    --ink: #ffffff;
    --muted: #c5c5c5;
    --line: rgba(255, 255, 255, 0.08);
    --stroke: rgba(255, 255, 255, 0.06);
    --cyan: #4cc2ff;
    --cyan-ink: #99ebff;
    --cyan-soft: rgba(76, 194, 255, 0.12);
    --c: #4cc2ff;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --shadow-hi: 0 8px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
  }
}
body {
  font-family: var(--font); letter-spacing: 0; line-height: 1.8;
  background:
    radial-gradient(70rem 40rem at 90% -10%, rgba(0, 120, 212, 0.16), transparent 60%),
    radial-gradient(60rem 40rem at -10% 20%, rgba(135, 100, 184, 0.10), transparent 60%),
    var(--paper);
  background-attachment: fixed;
}
h1, h2, h3, .brand { font-family: var(--display); letter-spacing: 0; font-weight: 600; }
.cmyk { display: none; }

/* acrylic title bar */
.site-head { position: sticky; top: 0; z-index: 20; background: rgba(243, 243, 243, 0.72); color: var(--ink); backdrop-filter: blur(30px) saturate(150%); -webkit-backdrop-filter: blur(30px) saturate(150%); border-bottom: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .site-head { background: rgba(32, 32, 32, 0.7); } }
.site-head .wrap { min-height: 52px; }
.brand { color: var(--ink); font-size: 0.95rem; font-weight: 600; }
.brand__mark { width: 22px; height: 22px; color: var(--cyan); }
.site-nav { gap: 4px; }
.site-nav a { color: var(--ink); font-size: 0.9rem; padding: 6px 12px; border-radius: 4px; border: 0; position: relative; }
.site-nav a:hover { background: rgba(0, 0, 0, 0.04); }
@media (prefers-color-scheme: dark) { .site-nav a:hover { background: rgba(255, 255, 255, 0.06); } }
.site-nav a[aria-current="page"] { background: rgba(0, 0, 0, 0.04); font-weight: 600; }
.site-nav a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 16px; height: 3px; margin-left: -8px; border-radius: 2px; background: var(--cyan); }

/* buttons & inputs */
.btn { border-radius: 4px; min-height: 34px; padding: 5px 14px; font-weight: 400; font-size: 0.92rem; background: var(--sheet-solid); border: 1px solid var(--line); border-bottom-color: rgba(0, 0, 0, 0.16); color: var(--ink); }
.btn:hover { background: #f6f6f6; border-color: var(--line); }
@media (prefers-color-scheme: dark) { .btn { border-bottom-color: rgba(255, 255, 255, 0.04); } .btn:hover { background: #323232; } }
.btn--primary { background: var(--cyan); color: #fff; border: 1px solid rgba(255, 255, 255, 0.08); border-bottom-color: rgba(0, 0, 0, 0.4); }
.btn--primary:hover { background: #1975c5; }
@media (prefers-color-scheme: dark) { .btn--primary { color: #000; } .btn--primary:hover { background: #47b1e8; } }
.btn--lg { min-height: 40px; padding: 8px 20px; font-size: 0.98rem; }
.input, select.input { border-radius: 4px; min-height: 34px; padding: 5px 10px; background: var(--sheet-solid); border: 1px solid var(--line); border-bottom: 1px solid rgba(0, 0, 0, 0.45); }
.input:focus { outline: none; border-bottom: 2px solid var(--cyan); padding-bottom: 4px; }
@media (prefers-color-scheme: dark) { .input, select.input { border-bottom-color: rgba(255, 255, 255, 0.55); } }
.chip { border-radius: 4px; }
.chip[aria-pressed="true"] { background: var(--cyan); color: #fff; border-color: var(--cyan); }

/* hero: Store-like banner card */
.home-hero { background: transparent; color: var(--ink); padding: 28px 0 8px; overflow: visible; }
.home-hero__grid {
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.55));
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  border-radius: 12px; box-shadow: var(--shadow-hi); padding: 36px; gap: 36px;
}
@media (prefers-color-scheme: dark) { .home-hero__grid { background: linear-gradient(120deg, rgba(44, 44, 44, 0.9), rgba(44, 44, 44, 0.6)); } }
@media (min-width: 960px) { .home-hero__grid { grid-template-columns: 1.2fr 1fr; padding: 48px 48px 48px 56px; } }
.home-hero__kicker { color: var(--cyan-ink); border: 0; background: var(--cyan-soft); border-radius: 4px; font-weight: 600; }
.home-hero h1 { font-size: clamp(1.8rem, 1.1rem + 2.6vw, 2.9rem); line-height: 1.3; }
.home-hero__lead { color: var(--muted); }
.home-hero .btn--ghost { background: var(--sheet-solid); color: var(--ink); border: 1px solid var(--line); border-bottom-color: rgba(0, 0, 0, 0.16); }
.hv { padding: 18px 14px 26px; }
.hv__frame { transform: none; border-radius: 8px; box-shadow: var(--shadow-hi); aspect-ratio: 4 / 5; }
.hv__img { width: 100%; height: 100%; object-fit: cover; object-position: 66% 30%; }
.hv__crop { inset: 7% 9% 9% 9%; border: 1px solid rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.28); }
.hv__crop::before, .hv__crop::after { border-color: #fff; }
.hv__chip { border-radius: 8px; font-weight: 600; padding: 10px 14px 10px 12px; background: rgba(252, 252, 252, 0.88); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-hi); border-left-width: 0 !important; display: inline-flex; align-items: center; gap: 8px; }
.hv__chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.hv__chip--gps::before { background: #0f7b0f; }
.hv__chip--px::before { background: var(--y); }
.hv__chip--size { left: -6px; top: 6%; }
.hv__chip--gps { right: -6px; top: 46%; }
.hv__chip--px { left: 6%; bottom: 0; }

/* page header: plain title like Settings */
.page-hero { background: transparent; color: var(--ink); padding: 28px 0 8px; }
.page-hero .lead { color: var(--muted); }
.page-hero .crumbs, .page-hero .article-meta { color: var(--muted); }
.page-hero h1 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.25rem); }
.page-hero--tool { padding-bottom: 8px; }
.page-hero--tool + .main-body > .tool:first-child { margin-top: 12px; }
.main-body { padding-top: 16px; }

/* Settings-style tiles */
.tcard a { border-top: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--sheet); backdrop-filter: blur(20px); grid-template-columns: auto 1fr; grid-template-rows: auto auto auto; column-gap: 16px; padding: 18px 18px 16px; }
.tcard a:hover { transform: none; background: var(--sheet-solid); box-shadow: var(--shadow-hi); }
.tcard__icon { grid-row: 1 / span 3; width: 44px; height: 44px; border-radius: 8px; background: linear-gradient(135deg, color-mix(in srgb, var(--tc) 85%, #fff), var(--tc)); color: #fff !important; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.tcard__title { font-size: 1.02rem; font-weight: 600; }
.tcard__text { font-size: 0.88rem; }
.tcard__go { color: var(--cyan-ink); font-weight: 600; font-size: 0.85rem; }
.tcard--k { --tc: #4a5361; }

.gcard a, .promise > div, .toc, .related, .tool { background: var(--sheet); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 0; box-shadow: var(--shadow); border-radius: var(--radius); }
.gcard a:hover { background: var(--sheet-solid); box-shadow: var(--shadow-hi); }
.gcard__topic { border-radius: 4px; }
.tool { border-radius: 10px; }
.marks::before, .marks::after, .marks > .marks__b::before, .marks > .marks__b::after { display: none; }
.drop { border: 1px dashed rgba(0, 0, 0, 0.25); background: rgba(0, 103, 192, 0.04); border-radius: 8px; }
@media (prefers-color-scheme: dark) { .drop { border-color: rgba(255, 255, 255, 0.25); } }
.drop:hover, .drop.is-over { background: var(--cyan-soft); border-color: var(--cyan); }
.drop__title::before { border-radius: 4px; width: 30px; height: 30px; font-size: 1.1rem; }
.result, .exif { background: var(--sheet-solid); border: 1px solid var(--line); border-radius: 8px; }

.band { background: linear-gradient(120deg, #0067c0, #3a8ad8 60%, #8764b8); border-radius: 12px; box-shadow: var(--shadow-hi); }
.band a { color: #fff; }

.main-body > h2, .article h2 { border-left: 0; padding-left: 0; }
.main-body th { background: rgba(0, 0, 0, 0.04); color: var(--ink); border-color: var(--line); }
@media (prefers-color-scheme: dark) { .main-body th { background: rgba(255, 255, 255, 0.06); } }
.faq dt::before { border-radius: 4px; background: var(--cyan); }

.site-foot { background: transparent; color: var(--muted); border-top: 1px solid var(--line); }
.site-foot h2 { color: var(--ink); }
.site-foot a { color: var(--muted); }
.site-foot a:hover { color: var(--ink); }
.site-nav a[aria-current="page"], .site-nav a:hover { color: var(--ink); }
@media (max-width: 1111px) { .home-hero__grid { width: auto; margin: 0 12px; } }
@media (max-width: 640px) { .home-hero__grid { padding: 28px 22px; } }

/* ---------- quick start (home) ---------- */
.quick { margin-top: 22px; padding: 14px 16px; border: 1px dashed rgba(0, 0, 0, 0.22); border-radius: 8px; background: rgba(255, 255, 255, 0.55); transition: background 0.2s ease, border-color 0.2s ease; }
@media (prefers-color-scheme: dark) { .quick { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.22); } }
.quick.is-over { border-color: var(--cyan); background: var(--cyan-soft); }
.quick.is-ready { border-style: solid; border-color: var(--cyan); }
.quick__label { margin: 0; font-size: 0.92rem; color: var(--muted); }
.quick__pick { font: inherit; color: var(--cyan-ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer; }
.quick__choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.quick__choices a { display: inline-flex; align-items: center; min-height: 34px; padding: 4px 14px; border-radius: 4px; background: var(--cyan); color: #fff; text-decoration: none; font-size: 0.9rem; }
.quick__choices a:hover { background: #1975c5; }
@media (prefers-color-scheme: dark) { .quick__choices a { color: #000; } }

/* hero entrance: one orchestrated moment */
@media (prefers-reduced-motion: no-preference) {
  .home-hero__copy > * { animation: rise 0.6s cubic-bezier(.2, .8, .2, 1) both; }
  .home-hero__copy > :nth-child(2) { animation-delay: 0.06s; }
  .home-hero__copy > :nth-child(3) { animation-delay: 0.12s; }
  .home-hero__copy > :nth-child(4) { animation-delay: 0.18s; }
  .home-hero__copy > :nth-child(5) { animation-delay: 0.24s; }
  .hv__frame { animation: settle 0.9s cubic-bezier(.2, .8, .2, 1) both; }
  .hv__crop { animation: crop-in 1.2s 0.3s cubic-bezier(.2, .8, .2, 1) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  @keyframes settle { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
  @keyframes crop-in { from { inset: 0 0 0 0; opacity: 0; } to { opacity: 1; } }
}
.hv__chip b { font-weight: 600; }

/* ---------- toast ---------- */
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 8px; background: rgba(252, 252, 252, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); box-shadow: var(--shadow-hi); color: #1b1b1b; font-size: 0.92rem; animation: toast-in 0.25s ease both; }
.toast.is-out { opacity: 0; transform: translateY(6px); transition: opacity 0.4s ease, transform 0.4s ease; }
.toast__dot { width: 10px; height: 10px; border-radius: 50%; background: #0f7b0f; }
@media (prefers-color-scheme: dark) { .toast { background: rgba(44, 44, 44, 0.92); color: #fff; } }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- processing progress, size meter, compare ---------- */
.progress { width: 100%; height: 4px; margin-top: 8px; appearance: none; border: 0; border-radius: 2px; background: rgba(0, 0, 0, 0.08); overflow: hidden; }
.progress::-webkit-progress-bar { background: rgba(0, 0, 0, 0.08); }
.progress::-webkit-progress-value { background: var(--cyan); transition: width 0.3s ease; }
.progress::-moz-progress-bar { background: var(--cyan); }
.meter { height: 6px; border-radius: 3px; background: rgba(0, 0, 0, 0.08); margin: 6px 0 8px; max-width: 260px; overflow: hidden; }
.meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), #3a8ad8); border-radius: 3px; }
.result { grid-template-columns: 96px 1fr; }
.result__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cmp-wrap { grid-column: 1 / -1; margin-top: 8px; }
.cmp { position: relative; width: 100%; max-height: 70vh; overflow: hidden; border-radius: 6px; background: repeating-conic-gradient(rgba(0, 0, 0, 0.06) 0 25%, transparent 0 50%) 0 0 / 16px 16px; }
.cmp__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cmp__line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3); pointer-events: none; }
.cmp__tag { position: absolute; top: 8px; font-size: 0.75rem; padding: 2px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); color: #fff; }
.cmp__tag--l { left: 8px; }
.cmp__tag--r { right: 8px; }
.cmp-wrap input[type="range"] { margin-top: 10px; }

/* ---------- hero demo: the tools at work on one photo ---------- */
.demo { display: grid; gap: 12px; max-width: 420px; justify-self: center; width: 100%; }
.demo__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.demo__steps li { display: flex; align-items: center; gap: 6px; font-size: 0.8rem; font-weight: 600; color: var(--muted); padding: 6px 8px; border-radius: 6px; background: rgba(0, 0, 0, 0.04); transition: background 0.3s ease, color 0.3s ease; cursor: default; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .demo__steps li { background: rgba(255, 255, 255, 0.06); } }
.demo__steps li span { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; font-size: 0.7rem; background: rgba(0, 0, 0, 0.12); color: #fff; flex: none; transition: background 0.3s ease; }
.demo__steps li.is-on { background: var(--cyan); color: #fff; }
.demo__steps li.is-on span { background: rgba(255, 255, 255, 0.3); }
.demo__steps li.is-done { color: var(--ok); }
.demo__steps li.is-done span { background: var(--ok); }

.demo__stage { position: relative; aspect-ratio: 4 / 5; max-width: 100%; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-hi); background: #111; clip-path: inset(0 0 0 0 round 10px); transition: clip-path 0.9s cubic-bezier(.6, 0, .2, 1); }
.demo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 66% 30%; transition: filter 0.8s ease; }
.demo__crop { position: absolute; inset: 3% 3% 3% 3%; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0); transition: inset 1s cubic-bezier(.6, 0, .2, 1), box-shadow 0.5s ease, opacity 0.4s ease; pointer-events: none; }
.demo__crop::before, .demo__crop::after { content: ""; position: absolute; width: 20px; height: 20px; border: 4px solid #fff; }
.demo__crop::before { left: -4px; top: -4px; border-width: 4px 0 0 4px; }
.demo__crop::after { right: -4px; bottom: -4px; border-width: 0 4px 4px 0; }
.demo[data-step="1"] .demo__crop { opacity: 0; }
.demo.is-crop-square .demo__crop { inset: 8% 0 12% 0; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); opacity: 1; }
.demo.is-cropped .demo__stage { clip-path: inset(8% 0 12% 0 round 10px); }
.demo.is-cropped .demo__crop { opacity: 0; }

.demo__meta { position: absolute; left: 10px; right: 10px; bottom: 10px; padding: 10px 12px; border-radius: 8px; background: rgba(252, 252, 252, 0.9); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: #1b1b1b; font-size: 0.8rem; transition: opacity 0.4s ease, transform 0.4s ease; }
.demo__meta-title { margin: 0 0 4px; font-weight: 700; font-size: 0.78rem; color: #5d5d5d; }
.demo__meta dl { margin: 0; display: grid; gap: 2px; }
.demo__row { display: grid; grid-template-columns: 5em 1fr; gap: 8px; transition: opacity 0.4s ease; position: relative; }
.demo__row dt { color: #5d5d5d; }
.demo__row dd { margin: 0; }
.demo__row--gps dd { color: #b5175a; font-weight: 700; }
.demo__row::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 2px; background: #b5175a; transform: scaleX(0); transform-origin: left; transition: transform 0.5s ease; }
.demo__clean { margin: 0; max-height: 0; overflow: hidden; color: #0f7b0f; font-weight: 700; transition: max-height 0.4s ease 0.6s; }
.demo.is-meta-gone .demo__row::after { transform: scaleX(1); }
.demo.is-meta-gone .demo__row:nth-child(2)::after { transition-delay: 0.15s; }
.demo.is-meta-gone .demo__row:nth-child(3)::after { transition-delay: 0.3s; }
.demo.is-meta-gone .demo__row { opacity: 0.45; }
.demo.is-meta-gone .demo__clean { max-height: 2em; }
.demo[data-step="2"] .demo__meta, .demo[data-step="3"] .demo__meta, .demo[data-step="4"] .demo__meta { opacity: 0; transform: translateY(8px); }

.demo__file { padding: 12px 14px; border-radius: 8px; background: var(--sheet-solid); box-shadow: var(--shadow); }
.demo__file-top { display: flex; justify-content: space-between; gap: 10px; font-size: 0.88rem; }
.demo__name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.demo__size { font-weight: 700; color: var(--cyan-ink); flex: none; }
.demo__bar { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.08); margin: 8px 0 6px; overflow: hidden; }
.demo__bar span { display: block; height: 100%; width: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--cyan), #3a8ad8); transition: width 1.3s cubic-bezier(.2, .8, .2, 1); }
.demo.is-cropped .demo__bar span { width: 80%; }
.demo.is-small .demo__bar span { width: 20%; }
.demo__px { margin: 0; font-size: 0.78rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .demo * { transition: none !important; } }
.demo.is-live .demo__crop { transition: inset 0s, box-shadow 0.5s ease, opacity 0.4s ease; }
.demo.is-live .demo__img { background: #111; }
.demo.is-live .demo__stage { max-height: none; }
.demo.is-over .demo__stage { outline: 3px dashed var(--cyan); outline-offset: 4px; }
.demo__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.demo__try { display: grid; gap: 6px; justify-items: start; }
.demo__note { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }
.demo.is-live .demo__bar span { transition: none; }
.ratios-label { font-size: 0.85rem; font-weight: 600; margin: 4px 0 6px; }
.cropper__guide { position: absolute; inset: 0; pointer-events: none; }
.cropper__guide-top, .cropper__guide-chin { position: absolute; left: 0; right: 0; border-top: 2px dashed rgba(255, 255, 255, 0.9); font-size: 0.7rem; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8); padding-left: 6px; }
.cropper__guide-top { top: var(--gt); }
.cropper__guide-chin { top: var(--gc); }
.cropper__box .cropper__guide span { width: auto; height: auto; border-width: 2px 0 0 0; border-style: dashed; border-color: rgba(255,255,255,.9); }
.demo__controls { display: grid; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.demo__hint { margin: 0; font-size: 0.85rem; color: var(--muted); }
.demo__chips, .demo__btns { display: flex; flex-wrap: wrap; gap: 6px; }
.demo.is-live .demo__img { object-fit: contain; object-position: center; animation: none; }
.demo.is-live .demo__meta { transition: opacity 0.4s ease; }
.demo.is-live .demo__crop { inset: auto; opacity: 0; transition: opacity 0.3s ease, box-shadow 0.3s ease; }
.demo.is-cropping .demo__crop { opacity: 1; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5); cursor: move; touch-action: none; pointer-events: auto; }
.demo.is-cropping .demo__stage { touch-action: none; }
.demo.is-live.is-cropped .demo__crop { opacity: 0; }
.demo.is-live .demo__stage { clip-path: none; }

/* ---------- framer (fixed frame, picture moves) ---------- */
.framer { display: grid; gap: 10px; justify-items: center; width: 100%; }
.framer__view { position: relative; max-width: 100%; border-radius: 8px; overflow: hidden; background: #111; cursor: grab; touch-action: none; user-select: none; box-shadow: var(--shadow-hi); }
.framer__view.is-dragging { cursor: grabbing; }
.framer__canvas { display: block; width: 100%; height: 100%; }
.framer__thirds { position: absolute; inset: 0; pointer-events: none; background:
  linear-gradient(90deg, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.35) calc(33.33% - 0.5px), rgba(255, 255, 255, 0.35) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.35) calc(66.66% - 0.5px), rgba(255, 255, 255, 0.35) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px)),
  linear-gradient(180deg, transparent calc(33.33% - 0.5px), rgba(255, 255, 255, 0.35) calc(33.33% - 0.5px), rgba(255, 255, 255, 0.35) calc(33.33% + 0.5px), transparent calc(33.33% + 0.5px), transparent calc(66.66% - 0.5px), rgba(255, 255, 255, 0.35) calc(66.66% - 0.5px), rgba(255, 255, 255, 0.35) calc(66.66% + 0.5px), transparent calc(66.66% + 0.5px));
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.9); border-radius: 8px; }
.framer__guide { position: absolute; inset: 0; pointer-events: none; }
.framer__g1, .framer__g2 { position: absolute; left: 0; right: 0; border-top: 2px dashed #fff; font-size: 0.72rem; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9); padding: 2px 6px; }
.framer__g1 { top: var(--g1); }
.framer__g2 { top: var(--g2); }
.framer__bar { display: flex; align-items: center; gap: 10px; width: min(100%, 420px); }
.framer__zoom { flex: 1; }
.framer__z { min-width: 40px; padding: 4px 0; font-size: 1.1rem; }
.framer__help { text-align: center; }
.demo__framer { margin-top: 2px; }

/* selected pictures: thumbnails */
.drop__hint kbd { font: inherit; font-size: 0.85em; padding: 1px 6px; border: 1px solid currentColor; border-radius: 4px; opacity: 0.85; }
.chosen { margin: 14px 0 0; }
.chosen:empty { display: none; }
.chosen__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.chosen__count { font-weight: 600; margin-right: auto; }
.btn--sm { padding: 6px 12px; font-size: 0.85rem; min-height: 0; }
.chosen__grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.chosen__grid li { position: relative; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chosen__thumb { aspect-ratio: 1; border-radius: 8px; overflow: hidden; background: rgba(127, 127, 127, 0.15); display: grid; place-items: center; font-size: 0.8rem; color: var(--muted); }
.chosen__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.chosen__name { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.chosen__size { font-size: 0.72rem; color: var(--muted); }
.chosen__rm { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 16px; line-height: 26px; padding: 0; cursor: pointer; }
.chosen__rm:hover { background: rgba(196, 43, 28, 0.9); }
.exif__thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; flex: none; }
.exif__head .exif__name { flex: 1; min-width: 0; word-break: break-all; }
.demo__nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.demo__nav[hidden] { display: none; }
.demo__nav .demo__quit { margin-left: auto; }
.demo__nav .btn[hidden] { display: none; }
.demo__nav .btn { padding: 6px 10px; font-size: 0.8rem; }

/* upscale */
.up-chosen { display: flex; align-items: center; gap: 10px; }
.up-chosen:empty { display: none; }
.up-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; flex: none; }
.upcmp { margin-top: 16px; }
.upcmp__title { font-weight: 700; margin: 0 0 8px; }
.upcmp__row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.upcmp__fig { margin: 0; }
.upcmp__fig canvas { width: 100%; height: auto; display: block; border-radius: 6px; background: #000; }
.upcmp__fig figcaption { font-size: 0.85rem; margin-top: 4px; text-align: center; }
.upcmp__fig:last-child figcaption { font-weight: 700; }
.site-foot ul + h2 { margin-top: 20px; }
.home-upscale { margin-top: 40px; }
.home-upscale > p { color: var(--muted); margin: -4px 0 14px; }

/* ---------- home: upscale section with its own demo ---------- */
.up-hero { margin: 48px 0 8px; }
.up-hero__grid { color: var(--ink); }
.up-hero h2 { font-size: clamp(1.5rem, 1rem + 1.8vw, 2.2rem); line-height: 1.35; margin: 0 0 16px; border: 0; padding: 0; }
.up-hero h2::before, .up-hero h2::after { content: none; }
.up-hero .home-hero__lead { color: var(--muted); }
.up-hero .btn--ghost { background: var(--sheet-solid); color: var(--ink); border: 1px solid var(--line); }
.updemo { display: grid; gap: 12px; max-width: 420px; justify-self: center; width: 100%; }
.updemo__stage { aspect-ratio: 386 / 420; background: #1b1b1b; }
.updemo__pic { position: absolute; inset: 0; transform-origin: 64% 30%; transition: transform 1.4s cubic-bezier(.6, 0, .2, 1); }
.updemo__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.9s ease; }
.updemo__after { opacity: 0; }
.updemo[data-step="1"] .updemo__pic { transform: scale(0.5); }
.updemo.is-zoom .updemo__pic { transform: scale(2.6); }
.updemo.is-after .updemo__after { opacity: 1; }
.updemo__badge { position: absolute; left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 6px; font-size: 0.8rem; font-weight: 700; background: rgba(0, 0, 0, 0.62); color: #fff; opacity: 0; transition: opacity 0.4s ease; }
.updemo__badge:not(:empty) { opacity: 1; }
.updemo.is-after .updemo__badge { background: var(--cyan); color: #fff; }
.updemo__caption { margin: 6px 0 0; font-size: 0.85rem; color: var(--muted); }
.updemo__view { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.updemo__view[hidden], .updemo__nav[hidden], .updemo__controls[hidden] { display: none; }
.updemo__view .chip[data-view="zoom"] { margin-left: auto; }
.updemo__controls { display: grid; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.updemo__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.updemo__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.updemo progress { width: 100%; }
.updemo.is-live .updemo__pic { transform-origin: 50% 50%; }
@media (prefers-reduced-motion: reduce) { .updemo__pic, .updemo__img { transition: none; } }
.up-hero__grid { grid-template-columns: minmax(0, 1fr); margin: 0; }
.up-hero__grid > * { min-width: 0; }
@media (min-width: 960px) { .up-hero__grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.updemo .demo__steps li { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

/* ---------- before / after viewer ---------- */
.ba { display: grid; gap: 10px; }
.ba__title { margin: 22px 0 8px; font-size: 1.05rem; }
.ba__view { position: relative; margin: 0 auto; overflow: hidden; border-radius: 10px; background: #111; touch-action: none; user-select: none; -webkit-user-select: none; cursor: ew-resize; box-shadow: var(--shadow); }
.ba__layer { position: absolute; inset: 0; overflow: hidden; }
.ba__pan { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.ba__img { width: 100%; height: 100%; object-fit: fill; display: block; pointer-events: none; }
.ba__line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35); pointer-events: none; }
.ba__line[hidden], .ba__tag[hidden] { display: none; }
.ba__handle { position: absolute; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35); }
.ba__handle::before, .ba__handle::after { content: ""; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent; }
.ba__handle::before { left: 4px; border-right-color: #333; }
.ba__handle::after { right: 4px; border-left-color: #333; }
.ba__tag { position: absolute; top: 10px; padding: 3px 9px; border-radius: 6px; font-size: 0.78rem; font-weight: 700; color: #fff; background: rgba(0, 0, 0, 0.62); pointer-events: none; }
.ba__tag--l { left: 10px; }
.ba__tag--r { right: 10px; background: var(--cyan); }
.ba__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.ba__group { display: flex; flex-wrap: wrap; gap: 6px; }
.ba__help { margin: 0; }
.updemo__cmp { min-height: 120px; }
.updemo__orig { width: 100%; max-height: 60vh; object-fit: contain; border-radius: 10px; background: #111; display: block; }
.up-fine summary { cursor: pointer; font-weight: 600; }
.up-fine[hidden] { display: none; }
.up-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 18px; }
.up-tab { display: block; cursor: pointer; }
.up-tab input { position: absolute; opacity: 0; pointer-events: none; }
.up-tab span { display: grid; gap: 2px; height: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet-solid); }
.up-tab small { color: var(--muted); font-size: 0.78rem; line-height: 1.5; }
.up-tab input:checked + span { border-color: var(--cyan); box-shadow: inset 0 0 0 1px var(--cyan); background: var(--cyan-soft); }
.up-tab input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.up-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.up-chosen { flex-wrap: wrap; }
[data-only][hidden], .up-fine label[hidden] { display: none; }
@media (max-width: 520px) { .up-tabs { grid-template-columns: 1fr; } }

/* ---------- global menu with drop-downs ---------- */
.site-nav { align-items: center; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-item__open { display: inline-grid; place-items: center; width: 26px; height: 30px; margin-left: -6px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: inherit; cursor: pointer; }
.nav-item__open svg { width: 12px; height: 12px; transition: transform 0.2s ease; }
.nav-item__open:hover { background: rgba(0, 0, 0, 0.05); }
.nav-item.is-open .nav-item__open svg { transform: rotate(180deg); }
.nav-menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; min-width: 260px; padding: 10px; border-radius: 10px; background: var(--sheet-solid); box-shadow: var(--shadow-hi); border: 1px solid var(--line); display: none; }
.nav-item:last-child .nav-menu, .nav-item:nth-last-child(2) .nav-menu { left: auto; right: 0; }
@media (hover: hover) and (min-width: 761px) { .nav-item:hover .nav-menu { display: block; } }
.nav-item.is-open .nav-menu, .nav-item:focus-within .nav-menu { display: block; }
.nav-item:hover::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; } /* keeps the menu open while the pointer moves down */
.nav-menu__group + .nav-menu__group { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.nav-menu__title { margin: 2px 8px 4px; font-size: 0.75rem; font-weight: 700; color: var(--muted); }
.nav-menu ul { list-style: none; margin: 0; padding: 0; }
.site-nav .nav-menu a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 6px; font-size: 0.9rem; white-space: nowrap; }
.site-nav .nav-menu a::after { display: none; }
.nav-menu a span { color: var(--muted); font-size: 0.78rem; }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { background: var(--cyan-soft); }
.nav-menu__all { margin: 8px 0 0; padding-top: 8px; border-top: 1px solid var(--line); }
.site-nav .nav-menu__all a { color: var(--cyan-ink); font-weight: 600; }
.nav-toggle { display: none; margin-left: auto; align-items: center; gap: 8px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet-solid); color: var(--ink); font: inherit; font-size: 0.88rem; cursor: pointer; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { display: block; width: 16px; height: 2px; border-radius: 1px; background: currentColor; position: relative; content: ""; }
.nav-toggle__bars::before { position: absolute; top: -5px; }
.nav-toggle__bars::after { position: absolute; top: 5px; }
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .site-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 2px; margin: 6px 0 4px; }
  .site-head.is-menu .site-nav { display: flex; }
  .nav-item { flex-wrap: wrap; }
  .nav-item__link { flex: 1; }
  .nav-item__open { width: 40px; height: 40px; margin: 0; }
  .nav-menu { position: static; width: 100%; min-width: 0; box-shadow: none; margin: 2px 0 6px; }
  .nav-item:focus-within .nav-menu { display: none; }
  .nav-item.is-open .nav-menu { display: block; }
}

/* ---------- content + sidebar ---------- */
.layout--side { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
@media (min-width: 1100px) { .layout--side { grid-template-columns: minmax(0, 1fr) 280px; gap: 48px; } }
.layout__main { min-width: 0; }
.page-hero--tool + .main-body .layout__main > .tool:first-child { margin-top: 12px; position: relative; }
.sidebar { display: grid; gap: 18px; align-content: start; padding-bottom: 24px; }
@media (min-width: 1100px) { .sidebar { position: sticky; top: 72px; max-height: calc(100vh - 88px); overflow: auto; padding-top: 8px; } }
.side-box { padding: 16px 18px; border-radius: 10px; background: var(--sheet); box-shadow: var(--shadow); font-size: 0.9rem; }
.side-box h2 { margin: 0 0 8px; font-size: 1rem; padding: 0; border: 0; }
.side-box h3 { margin: 12px 0 4px; font-size: 0.8rem; color: var(--muted); }
.side-box h3 a { color: inherit; text-decoration: none; }
.side-box ul { list-style: none; margin: 0; padding: 0; }
.side-box li a { display: block; padding: 5px 8px; margin: 0 -8px; border-radius: 6px; color: var(--ink); text-decoration: none; line-height: 1.5; }
.side-box li a:hover { background: var(--cyan-soft); }
.side-box li a[aria-current="page"] { background: var(--cyan-soft); font-weight: 700; }
.side-box--about p { margin: 0 0 8px; color: var(--muted); font-size: 0.85rem; line-height: 1.7; }

/* ---------- guides by category ---------- */
.catnav { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 8px; }
.catnav a { padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--sheet-solid); color: var(--ink); text-decoration: none; font-size: 0.88rem; }
.catnav a:hover { border-color: var(--cyan); }
.gcat { margin-top: 32px; scroll-margin-top: 72px; }
.gcat__title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 4px; font-size: 1.15rem; }
.gcat__count { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.gcat__lead { margin: 0 0 12px; color: var(--muted); }
.updemo__switch { display: flex; flex-wrap: wrap; gap: 6px; }
.updemo__switch[hidden] { display: none; }
@media (max-width: 720px) { .up-tabs { grid-template-columns: 1fr; } }

/* ---------- face & photo editing ---------- */
@media (min-width: 900px) { .tool__grid.fx { grid-template-columns: 1.25fr 1fr; } .fx-left { position: sticky; top: 12px; } }
.fx-view { background: repeating-conic-gradient(var(--line) 0 25%, var(--sheet) 0 50%) 0 0 / 16px 16px; border-radius: 8px; overflow: hidden; }
.fx-view canvas { display: block; width: 100%; height: auto; max-height: 72vh; object-fit: contain; }
.fx-bar, .fx-quick { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fx-quick { margin: 0 0 4px; }
#fx-hold { touch-action: none; user-select: none; -webkit-user-select: none; }
.fx-set { border-top: 1px solid var(--line); padding-top: 10px; }
.fx-set.is-off { opacity: 0.45; pointer-events: none; }
.fx-range { display: grid; grid-template-columns: 11em 1fr 2.6em; align-items: center; gap: 10px; margin: 6px 0; font-size: 0.92rem; }
.fx-range output { text-align: right; color: var(--muted); }
@media (max-width: 480px) { .fx-range { grid-template-columns: 1fr 2.6em; } .fx-range span { grid-column: 1 / -1; margin-bottom: -6px; } }
.fx-presets { flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.fx-stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; margin-bottom: 6px; }
.fx-stamp { font: inherit; font-size: 0.78rem; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); color: var(--ink); cursor: pointer; min-height: 72px; justify-content: center; }
.fx-stamp img { width: 60px; height: 34px; object-fit: contain; }
.fx-stamp[aria-pressed="true"] { border-color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan); font-weight: 700; }
@media (max-width: 899px) {
  .fx-left:has(.fx-stage:not([hidden])) { position: sticky; top: 56px; z-index: 5; background: var(--paper); padding-bottom: 6px; box-shadow: 0 8px 12px -10px rgba(0, 0, 0, 0.35); }
  .fx-view canvas { max-height: 34vh; }
  .fx-view #fx-cmp .ba__view { max-height: 34vh; }
  .fx-bar { margin-top: 6px; gap: 6px; }
  .fx-bar .btn { flex: 1 1 0; font-size: 0.74rem; padding: 6px 4px; white-space: nowrap; min-width: 0; }
  .fx-left .ba__bar { margin-top: 4px; }
  .fx-left .ba__help, .fx-left .ba__group:last-child { display: none; }
}
.fx-faces:empty { display: none; }
.fx-faces { margin: 0 0 8px; padding: 8px 10px; border-radius: 6px; background: var(--cyan-soft); color: var(--ink); }
.fx-part > summary { cursor: pointer; font-weight: 700; padding: 4px 0; list-style-position: inside; }
.fx-part[open] > summary { margin-bottom: 4px; }
.fx-lips { flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.fx-lip::before { content: ""; display: inline-block; width: 0.8em; height: 0.8em; border-radius: 50%; background: var(--lip); margin-right: 5px; vertical-align: -0.05em; }

.home-hero h1 .nb { display: inline-block; }
.home-hero h1 { font-size: clamp(1.5rem, 1rem + 1.9vw, 2.3rem); line-height: 1.4; }
#bg-canvas.is-brush { cursor: crosshair; touch-action: none; }
.fx-range input[type=color] { width: 56px; height: 32px; padding: 0; border: 1px solid var(--line); border-radius: 6px; background: none; }
.fb-canvas { cursor: crosshair; touch-action: none; }
.sns-safe { position: absolute; border: 2px dashed rgba(255,255,255,0.95); box-shadow: 0 0 0 9999px rgba(0,0,0,0.28); pointer-events: none; }
.sns-round { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 9999px rgba(0,0,0,0.35); outline: 2px dashed rgba(255,255,255,0.9); outline-offset: -2px; pointer-events: none; }
.framer__view { overflow: hidden; }
.sns-fitview:has(canvas[hidden]) { display: none; }
.sns-fitview canvas { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: contain; }
.sns-custom { display: flex; gap: 12px; flex-wrap: wrap; margin: 6px 0; }
.sns-custom .input { width: 7em; display: inline-block; }
.pdf-list { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; max-height: 60vh; overflow: auto; }
.pdf-item { display: grid; grid-template-columns: 2em 56px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); }
.pdf-item__no { text-align: center; color: var(--muted); font-weight: 700; }
.pdf-item__img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; }
.pdf-item__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.85rem; min-width: 0; }
.pdf-item__btns { display: flex; gap: 4px; }
@media (max-width: 480px) { .pdf-item { grid-template-columns: 1.6em 44px 1fr; } .pdf-item__img { width: 44px; height: 44px; } .pdf-item__btns { grid-column: 1 / -1; justify-content: flex-end; } }
.cl-list { list-style: none; padding: 0; margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; }
.cl-list li { display: grid; gap: 4px; justify-items: center; }
.cl-list img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.cl-view { display: flex; justify-content: center; }
.cl-view canvas { display: block; max-width: 100%; border-radius: 6px; box-shadow: var(--shadow-hi); touch-action: none; cursor: grab; }
.cl-layouts { display: grid; grid-template-columns: repeat(auto-fill, 56px); gap: 8px; }
.cl-layout { width: 56px; height: 56px; padding: 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--sheet); cursor: pointer; }
.cl-layout svg { width: 100%; height: 100%; display: block; }
.cl-layout rect { fill: var(--muted); opacity: 0.45; }
.cl-layout[aria-pressed="true"] { border-color: var(--cyan); box-shadow: inset 0 0 0 2px var(--cyan); }
.cl-layout[aria-pressed="true"] rect { fill: var(--cyan); opacity: 0.8; }
.fv-tab { display: flex; align-items: center; gap: 8px; margin: 12px 0 8px; padding: 8px 12px; border-radius: 8px 8px 0 0; background: var(--sheet); border: 1px solid var(--line); border-bottom: 0; max-width: 260px; font-size: 0.85rem; }
.fv-tab canvas { width: 16px; height: 16px; display: block; }
.fv-previews { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: repeating-conic-gradient(var(--line) 0 25%, var(--sheet) 0 50%) 0 0 / 12px 12px; }
.fv-fig { margin: 0; display: grid; justify-items: center; gap: 4px; font-size: 0.75rem; color: var(--muted); }
.fv-prev { image-rendering: pixelated; }
.fv-each { display: flex; flex-wrap: wrap; gap: 6px; }
.fv-code { background: var(--sheet); border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow-x: auto; font-size: 0.8rem; white-space: pre; }
.wm-canvas { cursor: move; touch-action: none; }
.wm-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.wm-thumb { padding: 0; border: 2px solid transparent; border-radius: 6px; background: none; cursor: pointer; }
.wm-thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; display: block; }
.wm-thumb[aria-pressed="true"] { border-color: var(--cyan); }
.wm-grid { display: grid; grid-template-columns: repeat(3, 44px); gap: 4px; margin-bottom: 8px; }
.wm-grid .chip { min-height: 36px; padding: 0; }
.wm-all { margin-bottom: 10px; }
textarea.input { resize: vertical; font: inherit; }
.rt-scroll { max-height: 72vh; overflow: auto; border-radius: 8px; background: #111; }
.rt-layer { position: relative; width: max-content; }
.rt-layer canvas { display: block; }
.rt-over { position: absolute; left: 0; top: 0; cursor: none; touch-action: none; }
.rt-over.is-pan { cursor: grab; touch-action: pan-x pan-y; }
.tool__grid.fx > * { min-width: 0; }
.rt-scroll { max-width: 100%; }
.updates { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 0; }
.updates__item { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.updates__item:last-child { border-bottom: 1px solid var(--line); }
.updates__date { color: var(--muted); font-size: 0.9rem; padding-top: 2px; }
.updates__title { margin: 0 0 4px; font-size: 1rem; border: 0; padding: 0; }
.updates__title::before, .updates__title::after { content: none; }
.updates__item p { margin: 0; }
.updates__more { margin-top: 8px; }
@media (max-width: 560px) { .updates__item { grid-template-columns: 1fr; gap: 2px; } }

/* photo motion */
.mo-view { position: relative; width: fit-content; max-width: 100%; margin: 0 auto; }
.mo-view canvas#mo-view { display: block; width: auto; height: auto; max-width: 100%; max-height: 72vh; }
@media (max-width: 899px) { .mo-view canvas#mo-view { max-height: 34vh; } }
.fx-view canvas.mo-over { max-height: none; object-fit: fill; }
.mo-over { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.mo-over.is-paint { touch-action: none; }
.mo-result video, .mo-result img { display: block; width: 100%; height: auto; max-height: 60vh; object-fit: contain; background: #000; border-radius: 6px; }
.mo-result { display: block; }
.mo-result .result__thumb { margin-bottom: 10px; }
.mo-result .result__thumb video, .mo-result .result__thumb img { width: 100%; height: auto; }
.mo-demos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 18px 0 6px; }
.mo-demo { margin: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; }
.mo-demo canvas { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 30%; background: var(--soft, #eef1f5); }
.mo-demo figcaption { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.mo-demo figcaption span { font-size: 0.85rem; color: var(--muted); flex: 1; }
.mo-demo figcaption .btn { align-self: flex-start; margin-top: 6px; }
.mo-demos__note { margin-bottom: 18px; }
@media (max-width: 900px) { .mo-demos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 720px) { .mo-demos { grid-template-columns: 1fr; } .mo-demo { flex-direction: row; } .mo-demo canvas { width: 42%; flex: none; aspect-ratio: 1; } }
.mo-demos--one { grid-template-columns: 1fr; margin: 10px 0 0; }
.mo-demos--one .mo-demo[hidden] { display: none; }
@media (max-width: 720px) { .mo-demos--one .mo-demo { flex-direction: column; } .mo-demos--one .mo-demo canvas { width: 100%; aspect-ratio: 4 / 3; } }
.pro-gpu { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--sheet); font-size: 0.92rem; }
.pro-gpu[data-kind="ok"] { border-color: var(--cyan); }
.pro-gpu[data-kind="error"] { border-color: #d9534f; }
.drop.is-off { opacity: 0.45; pointer-events: none; }

/* AI高画質化Pro: a darker, gold-accented look that stays readable in light and dark mode */
.pro-hero { --gold: #e3b955; --gold-2: #f5dc9a; position: relative; overflow: hidden; margin: 6px 0 22px; padding: clamp(22px, 4vw, 40px); border-radius: 18px; color: #eef1f6;
  background: radial-gradient(120% 140% at 100% 0%, rgba(227, 185, 85, 0.22), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(79, 191, 224, 0.16), transparent 60%), linear-gradient(160deg, #0d1220 0%, #151c2e 55%, #0b0f1a 100%);
  border: 1px solid rgba(227, 185, 85, 0.35); box-shadow: 0 18px 40px -22px rgba(8, 12, 24, 0.75); }
.pro-hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(180deg, rgba(0,0,0,0.6), transparent 80%); pointer-events: none; }
.pro-hero > * { position: relative; z-index: 1; }
.pro-badge { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 0.82rem; letter-spacing: 0.08em; color: var(--gold-2); }
.pro-badge span { padding: 3px 10px; border-radius: 999px; font-weight: 800; letter-spacing: 0.18em; color: #1a1406; background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, #b98a2c); box-shadow: 0 0 0 1px rgba(255,230,160,0.4) inset; }
.pro-hero h1 { color: #fff; margin: 0 0 12px; font-size: clamp(1.9rem, 1.3rem + 2.6vw, 3rem); letter-spacing: 0.04em; }
.pro-h-sub { display: block; margin-top: 6px; font-size: 0.42em; font-weight: 500; letter-spacing: 0.08em; color: #b9c2d0; }
.pro-lead { max-width: 46em; margin: 0 0 22px; color: #cfd6e2; line-height: 1.9; }
.pro-specs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.pro-specs li { padding: 12px 14px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.09); }
.pro-specs strong { display: block; font-size: 1.7rem; line-height: 1.1; font-weight: 800; background: linear-gradient(135deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pro-specs small { font-size: 0.55em; margin-left: 2px; }
.pro-specs span { display: block; margin-top: 4px; font-size: 0.78rem; color: #aab4c3; }
@media (max-width: 720px) { .pro-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pro-demo { margin: 0 0 26px; padding: 18px; border-radius: 16px; background: var(--sheet); border: 1px solid var(--line); }
.pro-demo__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.pro-demo__head h2 { margin: 0; font-size: 1.15rem; }
.pro-demo__switch { display: flex; flex-wrap: wrap; gap: 6px; }
.pro-demo__switch .chip[aria-pressed="true"] { background: #151c2e; border-color: #e3b955; color: #f5dc9a; }
.pro-demo__view { border-radius: 10px; overflow: hidden; min-height: 200px; background: #0d1220; }
.pro-demo__cap { margin: 10px 0 0; font-size: 0.85rem; color: var(--muted); }
.tool--pro { border: 1px solid rgba(227, 185, 85, 0.55); box-shadow: 0 0 0 4px rgba(227, 185, 85, 0.08); }
.tool--pro [data-run] { background: linear-gradient(135deg, #f0cf7a, #d9a53c 60%, #b98a2c); border-color: #b98a2c; color: #1a1406; font-weight: 800; }
.tool--pro [data-run]:disabled { filter: grayscale(0.6); opacity: 0.6; }
.tool--pro .chip[aria-pressed="true"] { background: #151c2e; border-color: #e3b955; color: #f5dc9a; }
.pro-gpu { margin: 0 0 14px; }
.pro-demo__src { margin: 12px 0 0; display: flex; align-items: center; gap: 12px; font-size: 0.85rem; color: var(--muted); }
.pro-demo__src img { image-rendering: auto; border-radius: 6px; border: 1px solid var(--line); }
.pro-demo__view { max-width: 560px; margin: 0 auto; }
.pro-demo .ba__tag--r { background: linear-gradient(135deg, #f0cf7a, #d9a53c); color: #1a1406; }
.pro-hero--home { margin: 28px 0; }
.pro-hero--home h2 { color: #fff; font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.3rem); margin: 0 0 12px; }
.pro-demo--home { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.12); }
.pro-demo--home .pro-demo__switch { margin-bottom: 10px; }
.pro-demo--home .chip { background: rgba(255,255,255,0.06); color: #dfe5ee; border-color: rgba(255,255,255,0.18); }
.pro-demo--home .pro-demo__cap { color: #aab4c3; }
.pro-btn { background: linear-gradient(135deg, #f0cf7a, #d9a53c 60%, #b98a2c); border: 1px solid #b98a2c; color: #1a1406; font-weight: 800; }
.pro-hero--home .home-hero__grid { background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; color: #eef1f6; width: auto; margin: 0; padding: 0; }
@media (min-width: 960px) { .pro-hero--home .home-hero__grid { grid-template-columns: 1fr 1fr; padding: 0; } }
.pro-hero--home .ba__hint, .pro-hero--home .ba p { color: #aab4c3; }
.mo-layers { display: grid; gap: 6px; margin: 4px 0 6px; }
.mo-layer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); }
.mo-layer label { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; }
.mo-layer input { width: 18px; height: 18px; accent-color: var(--cyan); }
.mo-layer.is-on { border-color: var(--cyan); background: var(--cyan-soft, rgba(0,121,158,0.06)); }
.mo-panel { margin-top: 10px; padding: 10px 12px; border-radius: 8px; border: 1px dashed var(--line); }
.mo-panel__title { margin: 0 0 8px; font-weight: 700; font-size: 0.92rem; }
.mo-panel__sub { margin: 10px 0 4px; font-size: 0.85rem; font-weight: 600; color: var(--muted, #667); }
.mo-jsel { font-weight: 700; color: var(--ink); }
.mo-job { margin-top: 10px; }

/* the painting palette: our own shades per motion */
.mo-pal { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.mo-pal__b { min-width: 42px; height: 38px; padding: 0 10px; border: 1px solid rgba(0,0,0,0.12); border-radius: 999px; font: inherit; font-size: 0.85rem; font-weight: 700; cursor: pointer; background: #fff; color: #222; }
.mo-pal__b[aria-pressed="true"] { outline: 3px solid var(--accent, #1a66d6); outline-offset: 1px; }
.mo-pal--jelly .mo-pal__b--l1 { background: #e1f3ff; } .mo-pal--jelly .mo-pal__b--l2 { background: #b5e0ff; } .mo-pal--jelly .mo-pal__b--l3 { background: #7cc4fb; }
.mo-pal--jelly .mo-pal__b--l4 { background: #3b99ea; color: #fff; } .mo-pal--jelly .mo-pal__b--l5 { background: #1765c4; color: #fff; }
.mo-pal--flow .mo-pal__b--l1 { background: #e1f3ff; } .mo-pal--flow .mo-pal__b--l2 { background: #b5e0ff; } .mo-pal--flow .mo-pal__b--l3 { background: #7cc4fb; }
.mo-pal--flow .mo-pal__b--l4 { background: #3b99ea; color: #fff; } .mo-pal--flow .mo-pal__b--l5 { background: #1765c4; color: #fff; }
.mo-pal--fxarea .mo-pal__b--l4 { background: #b48cf0; color: #fff; }
.mo-pal__b--fix { background: #4a5568; color: #fff; } .mo-pal__b--poke { background: #fffbe8; }
.mo-pal__note { margin: 0 0 8px; font-size: 0.8rem; color: var(--muted, #667); }
.mo-gridset { margin-top: 6px; }

/* the AI buttons: two per row, labels may wrap (never spill out) */
.fx-bar.mo-aibar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.fx-bar.mo-aibar .btn { white-space: normal; line-height: 1.3; padding: 8px 6px; font-size: 0.82rem; min-width: 0; }
.mo-pal__b--grab { background: #eef6ff; }
#mo-shake[aria-pressed="true"] { background: var(--accent, #1a66d6); color: #fff; }
/* which effect the sliders are adjusting: tabs, not the on/off chips */
#mo-fxtabs { padding: 6px; border-radius: 8px; background: var(--cyan-soft, rgba(0,121,158,0.06)); }
#mo-fxtabs .chip { background: var(--sheet); }
#mo-fxtabs .chip[aria-pressed="true"] { background: var(--sheet); color: var(--cyan-ink, #0a5a8a); border: 2px solid var(--cyan); box-shadow: inset 0 -3px 0 var(--cyan); }

/* ---------- AI高画質化Pro: the workspace (big side-by-side view, settings on the right, pictures below) ---------- */
@media (min-width: 1100px) { .layout--app { grid-template-columns: minmax(0, 1fr); } }
.pro-ws { --p-bg: #0d1120; --p-panel: #181d30; --p-panel2: #1f2540; --p-line: rgba(255, 255, 255, 0.09); --p-ink: #e8ecf4; --p-muted: #9aa4b8; --p-gold: #e3b955; --p-gold2: #f5dc9a; padding: 14px; }
.pro-app { display: grid; grid-template-columns: minmax(0, 1fr) 320px; border-radius: 14px; overflow: hidden; background: var(--p-bg); color: var(--p-ink); border: 1px solid var(--p-line); }
.pro-app[data-state="empty"] { grid-template-columns: minmax(0, 1fr); }
.pro-app[data-state="empty"] .pro-side { display: none; }
.pro-app[data-state="work"] .pro-empty { display: none; }
.pro-left { display: flex; flex-direction: column; min-width: 0; }
.pro-empty { min-height: 460px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 40px 20px; background: radial-gradient(ellipse at 50% 40%, #232a45, var(--p-bg) 70%); }
.pro-drop { width: min(460px, 100%); padding: 34px 20px; border: 2px dashed rgba(255, 255, 255, 0.45); border-radius: 16px; background: rgba(255, 255, 255, 0.06); color: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; }
.pro-drop:hover, .pro-drop.is-over { background: rgba(255, 255, 255, 0.1); border-color: var(--p-gold2); }
.pro-drop .drop__title { color: #fff; }
.pro-drop .drop__title::before { display: none; }
.pro-drop .drop__hint { color: var(--p-muted); }
.pro-plus { width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #1a1f33; display: grid; place-items: center; font-size: 1.6rem; font-weight: 700; }
.pro-samples { text-align: center; }
.pro-samples p { margin: 0 0 10px; color: var(--p-muted); font-size: 0.88rem; }
.pro-samples div { display: flex; gap: 12px; justify-content: center; }
.pro-sample { width: 76px; height: 76px; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.25); cursor: pointer; background: #000; }
.pro-sample:hover { border-color: var(--p-gold2); }
.pro-sample img { width: 100%; height: 100%; object-fit: cover; }
.pro-stage { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; height: clamp(380px, 62vh, 680px); background: #000; }
.pro-pane { position: relative; overflow: hidden; background: #0a0d18 repeating-conic-gradient(#0e1222 0 25%, #0a0d18 0 50%) 0 0 / 22px 22px; cursor: grab; touch-action: none; user-select: none; }
.pro-pane.is-drag { cursor: grabbing; }
.pro-pane canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.pro-tag { position: absolute; top: 10px; left: 10px; padding: 4px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.8rem; font-weight: 700; pointer-events: none; }
.pro-tag--r { left: auto; right: 10px; background: linear-gradient(135deg, #f0cf7a, #d9a53c); color: #1a1406; }
.pro-pv { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 10px 22px; border-radius: 999px; border: 0; background: linear-gradient(135deg, #f0cf7a, #d9a53c 60%, #b98a2c); color: #1a1406; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45); }
.pro-pv.is-corner { left: auto; top: auto; right: 12px; bottom: 12px; transform: none; padding: 7px 14px; font-size: 0.82rem; }
.pro-pv:disabled { opacity: 0.5; cursor: default; }
.pro-busy { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(8, 10, 20, 0.85); font-size: 0.85rem; display: grid; gap: 6px; }
.pro-busy[hidden] { display: none; }
.pro-busy progress { width: 100%; height: 6px; accent-color: var(--p-gold); }
.pro-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; background: #121729; border-top: 1px solid var(--p-line); font-size: 0.82rem; color: var(--p-muted); }
.pro-info { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.pro-zoom { display: flex; align-items: center; gap: 6px; flex: none; }
.pro-zoom button { min-width: 32px; height: 30px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--p-line); background: var(--p-panel2); color: var(--p-ink); font: inherit; cursor: pointer; }
.pro-zoom input { width: 140px; accent-color: var(--p-gold); }
.pro-strip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #0b0f1c; border-top: 1px solid var(--p-line); overflow-x: auto; }
.pro-thumbs { display: flex; gap: 8px; }
.pro-thumb { position: relative; flex: none; width: 74px; height: 74px; padding: 0; border-radius: 9px; overflow: hidden; border: 2px solid transparent; background: #000; cursor: pointer; }
.pro-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pro-thumb[aria-current="true"] { border-color: var(--p-gold); box-shadow: 0 0 0 2px rgba(227, 185, 85, 0.3); }
.pro-thumb__ok { position: absolute; left: 4px; bottom: 4px; width: 20px; height: 20px; border-radius: 50%; background: #2fb36d; color: #fff; font-size: 0.75rem; display: grid; place-items: center; }
.pro-thumb__x { position: absolute; right: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0, 0, 0, 0.7); color: #fff; font-size: 0.8rem; line-height: 20px; display: none; }
.pro-thumb:hover .pro-thumb__x, .pro-thumb:focus-visible .pro-thumb__x { display: block; }
.pro-add { flex: none; width: 74px; height: 74px; border-radius: 9px; border: 2px dashed rgba(255, 255, 255, 0.3); background: transparent; color: var(--p-ink); font: inherit; font-size: 1.3rem; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; }
.pro-add span { font-size: 0.62rem; color: var(--p-muted); }
.pro-side { display: flex; flex-direction: column; background: var(--p-panel); border-left: 1px solid var(--p-line); max-height: calc(clamp(380px, 62vh, 680px) + 150px); overflow-y: auto; }
.pro-sec { padding: 14px 16px; border-bottom: 1px solid var(--p-line); }
.pro-sec header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pro-sec h3 { margin: 0; font-size: 1rem; color: #fff; }
.pro-sec__body.is-off { opacity: 0.4; pointer-events: none; }
.pro-sub { margin: 10px 0 6px; font-size: 0.82rem; color: var(--p-muted); }
.pro-help { margin: 8px 0 0; font-size: 0.76rem; line-height: 1.6; color: var(--p-muted); }
.pro-sw { position: relative; display: inline-block; width: 44px; height: 24px; flex: none; cursor: pointer; }
.pro-sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pro-sw span { position: absolute; inset: 0; border-radius: 999px; background: #3a4160; transition: background 0.15s; pointer-events: none; }
.pro-sw span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.pro-sw input:checked + span { background: linear-gradient(135deg, #f0cf7a, #d9a53c); }
.pro-sw input:checked + span::after { transform: translateX(20px); }
.pro-sw input:focus-visible + span { outline: 2px solid var(--p-gold2); outline-offset: 2px; }
.pro-seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 3px; gap: 3px; border-radius: 9px; background: #0f1324; }
.pro-seg button { padding: 7px 0; border: 0; border-radius: 7px; background: transparent; color: var(--p-ink); font: inherit; font-weight: 700; cursor: pointer; }
.pro-seg button[aria-pressed="true"] { background: #49517a; color: #fff; }
.pro-list { display: grid; gap: 4px; padding: 4px; border-radius: 10px; background: #0f1324; }
.pro-list button { display: grid; gap: 1px; text-align: left; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--p-ink); font: inherit; cursor: pointer; }
.pro-list button small { color: var(--p-muted); font-size: 0.74rem; }
.pro-list button[aria-pressed="true"] { background: #49517a; }
.pro-list button[aria-pressed="true"] strong::after { content: " ✓"; color: var(--p-gold2); }
.pro-range { display: grid; grid-template-columns: 1fr 2.4em; align-items: center; gap: 2px 8px; margin: 8px 0; font-size: 0.85rem; }
.pro-range span { grid-column: 1 / -1; }
.pro-range input { width: 100%; accent-color: var(--p-gold); }
.pro-range output { text-align: right; color: var(--p-muted); }
.pro-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0 0; font-size: 0.85rem; }
.pro-reset { padding: 4px 10px; border-radius: 6px; border: 1px solid var(--p-line); background: transparent; color: var(--p-muted); font: inherit; font-size: 0.76rem; cursor: pointer; }
.pro-foot { position: sticky; bottom: 0; margin-top: auto; padding: 14px 16px; display: grid; gap: 10px; background: var(--p-panel2); border-top: 1px solid var(--p-line); }
.pro-out { margin: 0; display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--p-muted); }
.pro-out strong { color: #fff; }
.pro-fmt { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 0.85rem; color: var(--p-muted); }
.pro-fmt select { width: auto; min-width: 9em; background: #0f1324; color: var(--p-ink); border-color: var(--p-line); }
.pro-go { width: 100%; background: linear-gradient(135deg, #f0cf7a, #d9a53c 60%, #b98a2c); border: 1px solid #b98a2c; color: #1a1406; font-weight: 800; }
.pro-go2 { width: 100%; background: transparent; border: 1px solid var(--p-gold); color: var(--p-gold2); font-weight: 700; }
.pro-go:disabled, .pro-go2:disabled { opacity: 0.5; }
.pro-ws .status:empty { display: none; }
@media (max-width: 900px) { .pro-app { grid-template-columns: minmax(0, 1fr); } .pro-side { max-height: none; border-left: 0; border-top: 1px solid var(--p-line); } .pro-stage { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; height: 80vh; } }

/* ---------- 画像編集ツール: 12 functions on one screen ---------- */
.ed-app { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 16px; padding: 16px; }
.ed-rail { display: flex; flex-direction: column; gap: 2px; }
.ed-rail button { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--ink); font: inherit; font-size: 0.86rem; text-align: left; cursor: pointer; line-height: 1.3; }
.ed-rail button:hover { background: var(--cyan-soft); }
.ed-rail button[aria-pressed="true"] { background: var(--cyan-soft); border-color: var(--c); font-weight: 700; color: var(--cyan-ink); }
.ed-rail svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ed-main { display: grid; gap: 12px; min-width: 0; }
.ed-work { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; min-height: min(68vh, 640px); }
.ed-app[data-mode="full"] .ed-work { display: none; }
.ed-app[data-mode="work"] .ed-full { display: none; }
.ed-stage { position: relative; display: grid; place-items: center; min-height: 360px; border-radius: 12px; background: #1c2129; overflow: hidden; }
.ed-view { display: block; }
.ed-info { position: absolute; left: 12px; bottom: 12px; margin: 0; padding: 5px 11px; border-radius: 7px; background: rgba(0, 0, 0, 0.66); color: #fff; font-size: 0.8rem; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ed-drop { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; margin: 0; border: 2px dashed #6f9cc4; border-radius: 12px; background: #2b3a4f; color: #e9edf3; cursor: pointer; text-align: center; padding: 20px; }
.ed-drop.is-over { background: #34506f; }
.ed-app[data-state="work"] .ed-drop { display: none; }
.ed-drop__pic { width: 76px; height: 76px; fill: none; stroke: #9fd0f4; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.ed-drop__title { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 800; }
.ed-drop__hint { font-size: 0.9rem; color: #c3cfdd; }
.ed-plus { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: var(--c); color: #fff; font-weight: 700; font-size: 1.3rem; line-height: 1; }
.ed-panel { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); }
.ed-panel__title { margin: 0; font-size: 1.1rem; }
.ed-panel__body { display: grid; gap: 12px; align-content: start; }
.ed-panel__body .ed-sub { display: block; }
.ed-panel__body .ed-sub[hidden], .ed-full .ed-sub[hidden] { display: none; }
.ed-panel__body .ed-sub .drop, .ed-panel__body .ed-sub .chosen, .ed-panel__body .ed-sub .results, .ed-panel__body .ed-sub [data-run],
.ed-panel__body .ed-sub > .status, .ed-panel__body .ed-sub #pdf-list, .ed-panel__body .ed-sub #pdf-count, .ed-panel__body .ed-sub #pdf-tools { display: none !important; }
.ed-panel__body .ed-sub .tool__grid { display: block; }
.ed-panel__body .ed-sub .form { display: grid; gap: 12px; }
.ed-panel__foot { display: grid; gap: 8px; margin-top: auto; }
.ed-panel__foot .btn { width: 100%; justify-content: center; }
.ed-exif .exif { margin: 0; box-shadow: none; }
.ed-full .ed-sub { display: block; }
.ed-full .ed-sub .drop { display: none !important; }
.ed-strip { display: flex; align-items: center; gap: 10px; overflow-x: auto; padding: 2px 2px 6px; }
.ed-add { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 92px; height: 92px; border: 2px dashed #8a95a6; border-radius: 12px; background: var(--paper); color: var(--ink); font: inherit; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.ed-add .ed-plus { width: 28px; height: 28px; font-size: 1.1rem; }
.ed-thumbs { display: flex; gap: 10px; }
.ed-thumb { position: relative; flex: none; width: 92px; height: 92px; padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: #000; cursor: pointer; }
.ed-thumb[aria-current="true"] { border-color: var(--c); }
.ed-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ed-thumb__no { position: absolute; left: 4px; top: 4px; padding: 0 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.6); color: #fff; font-size: 0.7rem; }
.ed-thumb__x { position: absolute; right: 3px; top: 3px; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; background: rgba(0, 0, 0, 0.65); color: #fff; font-size: 0.85rem; opacity: 0; transition: opacity 0.15s; }
.ed-thumb:hover .ed-thumb__x, .ed-thumb:focus-visible .ed-thumb__x { opacity: 1; }
@media (hover: none) { .ed-thumb__x { opacity: 1; } }
@media (max-width: 900px) {
  .ed-app { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .ed-rail { flex-direction: row; overflow-x: auto; padding-bottom: 4px; }
  .ed-rail button { flex: none; flex-direction: column; gap: 4px; padding: 8px 10px; font-size: 0.75rem; text-align: center; }
  .ed-work { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .ed-stage { min-height: 300px; height: 52vh; }
  .ed-add, .ed-thumb { width: 72px; height: 72px; }
}

/* home: the five tools as buttons */
.home-btns { display: grid; gap: 10px; margin: 22px 0 6px; }
.hb-main { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: linear-gradient(135deg, #3ba3e8, #2f6fd6); color: #fff; text-decoration: none; box-shadow: 0 6px 16px rgba(20, 60, 120, 0.3); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.hb-main:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(20, 60, 120, 0.35); color: #fff; }
.hb-main strong { display: block; font-size: 1.15rem; }
.hb-main small { display: block; font-size: 0.8rem; opacity: 0.9; }
.hb-main__go { margin-left: auto; font-size: 1.6rem; line-height: 1; }
.hb__icon { flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: rgba(255, 255, 255, 0.2); }
.hb__icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.home-btns__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.hb { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 8px; border-radius: 12px; color: #fff; text-decoration: none; text-align: center; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18); transition: transform 0.15s ease; }
.hb:hover { transform: translateY(-1px); color: #fff; }
.hb .hb__icon { width: 42px; height: 42px; }
.hb strong { font-size: 0.9rem; }
.hb small { font-size: 0.72rem; opacity: 0.9; }
.hb--face { background: linear-gradient(135deg, #e8628f, #c2407a); }
.hb--up { background: linear-gradient(135deg, #2fb38a, #1f8f72); }
.hb--pro { background: linear-gradient(135deg, #8b62e8, #6a45c9); }
.hb--mo { background: linear-gradient(135deg, #f0973a, #d9732a); }
@media (max-width: 560px) { .home-btns__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* home: the tool list (five tools, with what each can do) */
.tlist { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 14px; }
.tlist__col { display: grid; gap: 14px; }
.tl { display: block; padding: 16px 18px; border-radius: var(--radius); background: var(--sheet); color: var(--ink); text-decoration: none; box-shadow: var(--shadow); border-left: 5px solid var(--tlc, var(--c)); transition: transform 0.15s ease; }
.tl:hover { transform: translateY(-1px); color: var(--ink); }
.tl strong { display: block; font-size: 1.05rem; margin-bottom: 8px; }
.tl__chips { display: flex; flex-wrap: wrap; gap: 5px; }
.tl__chips span { padding: 2px 8px; border-radius: 6px; background: var(--paper); border: 1px solid var(--line); font-size: 0.75rem; color: var(--muted); }
.tl--edit { --tlc: #2f6fd6; }
.tl--face { --tlc: #d14b80; }
.tl--up { --tlc: #23a07e; }
.tl--pro { --tlc: #7a54d9; }
.tl--mo { --tlc: #e0832f; }
@media (max-width: 900px) { .tlist { grid-template-columns: minmax(0, 1fr); } }

/* 加工ツール: tabs → items (icon + name) → one slider for the chosen item */
.fx-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.fx-tab { flex: none; padding: 7px 12px; border: 0; border-radius: 999px; background: none; color: var(--ink); font: inherit; font-size: 0.9rem; font-weight: 700; cursor: pointer; }
.fx-tab[aria-selected="true"] { background: var(--ink); color: var(--sheet); }
.fx-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; margin: 10px 0 4px; }
.fx-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--ink); font: inherit; font-size: 0.76rem; cursor: pointer; line-height: 1.25; }
.fx-item:hover { background: var(--cyan-soft); }
.fx-item[aria-pressed="true"] { border-color: var(--c); background: var(--cyan-soft); color: var(--cyan-ink); font-weight: 700; }
.fx-item svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.fx-item__dot { position: absolute; top: 6px; right: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--m); }
.fx-one { padding: 10px 12px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line); }
.fx-one__head { display: flex; align-items: center; gap: 10px; }
.fx-one__head output { margin-left: auto; color: var(--muted); }
.fx-one__range { width: 100%; margin-top: 8px; }
.fx-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.fx-chips .fx-stamp { min-width: 84px; }
.fx-chips .fx-quick { width: 100%; }
.fx-tabhelp:empty { display: none; }
.tool.fx-needface .fx-items, .tool.fx-needface .fx-one { opacity: 0.45; pointer-events: none; }
