[hidden] { display: none !important; }
:root {
  color-scheme: light;
  --bg: oklch(1 0 0);
  --surface: oklch(0.965 0.004 270);
  --ink: oklch(0.205 0.022 270);
  --muted: oklch(0.49 0.025 270);
  --line: oklch(0.885 0.008 270);
  --primary: oklch(0.45 0.18 270);
  --primary-hover: oklch(0.39 0.17 270);
  --accent: oklch(0.69 0.135 205);
  --danger: oklch(0.53 0.19 28);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 66% 56% at 6% 8%, oklch(.93 .034 278 / .72), transparent 72%),
    radial-gradient(ellipse 68% 64% at 96% 70%, oklch(.93 .029 208 / .62), transparent 74%),
    linear-gradient(138deg, oklch(.995 .004 275), oklch(.975 .013 258) 52%, oklch(.962 .018 265));
}
button, input, select { font: inherit; }
button, summary, .file-row { -webkit-tap-highlight-color: transparent; }

.site-header {
  height: 64px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand { color: var(--ink); text-decoration: none; font-weight: 720; letter-spacing: -.02em; }
.brand-mark { color: var(--primary); margin-right: 8px; }
.header-link { color: var(--muted); font-size: 13px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.header-link:hover { color: var(--primary); }
.header-link span { margin-left: 3px; }

main { max-width: 1120px; margin: 0 auto; padding: 64px 24px 64px; }
.intro { max-width: 760px; margin-bottom: 44px; }
h1 { margin: 0; max-width: 720px; font-size: 2.625rem; line-height: 1.12; letter-spacing: -.035em; text-wrap: balance; }
.intro > p:last-child { max-width: 650px; margin: 18px 0 0; color: var(--muted); font-size: 17px; line-height: 1.65; }

.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); gap: 32px; align-items: start; }
.converter { min-width: 0; }
.file-list { border: 1px solid oklch(.84 .014 270 / .8); border-radius: 14px; overflow: hidden; background: oklch(1 0 0 / .73); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.file-row { min-height: 94px; padding: 18px; display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: center; cursor: pointer; background: transparent; transition: background-color 180ms ease-out, box-shadow 180ms ease-out; }
.file-row + .file-row { border-top: 1px solid var(--line); }
.file-row:hover { background: var(--surface); }
.template-row { cursor: default; }
.file-row[data-dragover="true"] { position: relative; z-index: 1; background: color-mix(in oklch, var(--primary) 8%, var(--bg)); box-shadow: inset 0 0 0 2px var(--primary); }
.file-row[data-dragover="true"] .file-copy small { color: var(--primary); }
.file-row[data-ready="true"] .step { border-color: var(--accent); background: color-mix(in oklch, var(--accent) 14%, var(--bg)); color: var(--ink); }
.file-row:focus-within { outline: 3px solid color-mix(in oklch, var(--primary) 28%, transparent); outline-offset: -3px; }
.step { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 13px; font-weight: 700; }
.file-copy { min-width: 0; display: grid; gap: 4px; }
.file-copy strong { font-size: 15px; }
.file-copy small { color: var(--muted); line-height: 1.35; }
.file-action { position: relative; max-width: 180px; min-height: 40px; padding: 0 14px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--primary); font-size: 14px; font-weight: 680; overflow: hidden; }
.file-action span { width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-action input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.template-controls { min-width: 210px; display: grid; gap: 8px; }
.template-controls .file-action { width: 100%; max-width: none; }
.template-controls[data-enhanced="true"] .select-control { display: none; }
.template-trigger {
  position: relative;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid oklch(.78 .035 270 / .72);
  border-radius: 12px;
  background: linear-gradient(135deg, oklch(1 0 0 / .72), oklch(.91 .036 260 / .47));
  backdrop-filter: blur(22px) saturate(1.7);
  -webkit-backdrop-filter: blur(22px) saturate(1.7);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / .9), inset 0 -1px 0 oklch(.81 .025 260 / .3), 0 4px 12px oklch(.31 .04 270 / .09);
  color: var(--ink);
  text-align: left;
  font-size: 13px;
  font-weight: 680;
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}
.template-trigger:hover, .template-trigger[aria-expanded="true"] { border-color: oklch(.64 .09 270 / .8); box-shadow: inset 0 1px 0 white, 0 5px 16px oklch(.31 .04 270 / .14); }
.template-trigger > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-chevron { flex: 0 0 8px; width: 8px; height: 8px; margin-right: 2px; border-right: 1.8px solid var(--primary); border-bottom: 1.8px solid var(--primary); transform: translateY(-2px) rotate(45deg); transition: transform 180ms ease; }
.template-trigger[aria-expanded="true"] .template-chevron { transform: translateY(2px) rotate(225deg); }
.template-menu {
  position: fixed;
  z-index: 70;
  max-height: min(380px, calc(100dvh - 24px));
  overflow: auto;
  padding: 7px;
  border: 1px solid oklch(1 0 0 / .88);
  border-radius: 18px;
  background: linear-gradient(155deg, oklch(1 0 0 / .79), oklch(.92 .03 260 / .7));
  backdrop-filter: blur(34px) saturate(1.8);
  -webkit-backdrop-filter: blur(34px) saturate(1.8);
  box-shadow: inset 0 1px 0 white, 0 16px 38px oklch(.25 .035 270 / .19), 0 3px 10px oklch(.28 .025 270 / .1);
  overscroll-behavior: contain;
  animation: menu-in 150ms cubic-bezier(.22,1,.36,1);
}
.template-menu::before { content: ""; position: sticky; top: -7px; display: block; height: 1px; margin-bottom: -1px; background: linear-gradient(90deg, transparent, oklch(1 0 0 / .98), transparent); pointer-events: none; }
.template-option { position: relative; width: 100%; min-height: 42px; padding: 10px 34px 10px 12px; display: flex; align-items: center; border: 0; border-radius: 11px; background: transparent; color: var(--ink); text-align: left; font-size: 13px; font-weight: 570; line-height: 1.3; cursor: pointer; }
.template-option:hover, .template-option:focus-visible { background: oklch(1 0 0 / .58); outline: none; }
.template-option[aria-selected="true"] { background: linear-gradient(110deg, oklch(.82 .07 265 / .72), oklch(.84 .05 240 / .54)); color: oklch(.28 .09 268); font-weight: 730; box-shadow: inset 0 1px 0 oklch(1 0 0 / .48); }
.template-option[aria-selected="true"]::after { content: "✓"; position: absolute; right: 13px; font-weight: 800; }
.template-option:focus-visible { box-shadow: inset 0 0 0 2px oklch(.56 .15 270 / .56); }
.secondary { min-height: 42px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: var(--primary); font-weight: 680; cursor: pointer; }
.secondary:hover { background: var(--surface); border-color: color-mix(in oklch, var(--primary) 42%, var(--line)); }
.secondary:disabled { opacity: .55; cursor: wait; }
.select-control select { min-width: 210px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.advanced { position: relative; margin: 20px 0; padding: 0 18px; border: 1px solid oklch(0.89 0.012 270 / .8); border-radius: 14px; background: linear-gradient(135deg, oklch(1 0 0 / .86), oklch(.955 .018 270 / .63)); backdrop-filter: blur(22px) saturate(1.35); -webkit-backdrop-filter: blur(22px) saturate(1.35); }
.advanced::before { content: ""; position: absolute; inset: 1px 1px auto; height: 1px; background: oklch(1 0 0 / .9); pointer-events: none; }
.advanced summary { padding: 16px 2px; cursor: pointer; color: var(--ink); font-weight: 690; }
.advanced summary:hover { color: var(--ink); }
.option-grid { padding: 4px 0 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.option-grid label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }
.option-grid .checkbox-option { min-height: 60px; padding: 10px 12px; grid-template-columns: 42px 1fr; gap: 11px; align-items: center; align-self: end; color: var(--ink); border: 1px solid oklch(1 0 0 / .92); border-radius: 11px; background: oklch(1 0 0 / .48); box-shadow: inset 0 1px 0 oklch(1 0 0 / .9), 0 3px 8px oklch(.34 .03 270 / .06); cursor: pointer; }
.checkbox-option input { appearance: none; position: relative; width: 42px; height: 25px; margin: 0; border: 1px solid oklch(.72 .02 270 / .8); border-radius: 99px; background: oklch(.88 .012 270 / .75); transition: background-color 180ms ease-out, border-color 180ms ease-out; cursor: pointer; }
.checkbox-option input::before { content: ""; position: absolute; left: 2px; top: 2px; width: 19px; height: 19px; border-radius: 50%; background: white; box-shadow: 0 1px 3px oklch(.25 .02 270 / .25); transition: transform 180ms cubic-bezier(.22,1,.36,1); }
.checkbox-option input:checked { border-color: var(--primary); background: var(--primary); }
.checkbox-option input:checked::before { transform: translateX(17px); }
.checkbox-option input:focus-visible { outline: 3px solid color-mix(in oklch, var(--primary) 35%, transparent); outline-offset: 2px; }
.checkbox-option span { display: grid; gap: 2px; }
.checkbox-option strong { font-size: 13px; }
.checkbox-option small { color: var(--muted); font-size: 12px; }
input[type="number"], select { width: 100%; height: 42px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: oklch(1 0 0 / .72); color: var(--ink); }
.option-grid input[type="number"], .option-grid select { border-color: oklch(1 0 0 / .9); box-shadow: inset 0 1px 0 oklch(1 0 0 / .9), 0 2px 7px oklch(.34 .03 270 / .06); }
input:focus-visible, select:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in oklch, var(--primary) 28%, transparent); outline-offset: 2px; }

.primary { width: 100%; min-height: 52px; border: 0; border-radius: 9px; background: var(--primary); color: white; font-weight: 750; cursor: pointer; }
.primary:hover { background: var(--primary-hover); }
.primary:disabled { opacity: .55; cursor: wait; }

.side-panel { border-left: 1px solid var(--line); padding-left: 28px; }
.status { display: grid; grid-template-columns: 12px 1fr; gap: 12px; align-items: start; }
.status-dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: var(--muted); }
.status[data-state="ready"] .status-dot, .status[data-state="success"] .status-dot { background: var(--accent); }
.status[data-state="working"] .status-dot { background: var(--primary); animation: pulse 1.1s ease-in-out infinite; }
.status[data-state="error"] .status-dot { background: var(--danger); }
.status strong { font-size: 15px; }
.status p { margin: 5px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.template-info { margin: 24px 0 0; }
.template-info div { padding: 11px 0; display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); font-size: 13px; }
.template-info dt { color: var(--muted); }
.template-info dd { margin: 0; text-align: right; }
.transfer-note { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }
.transfer-note strong { font-size: 14px; }
.transfer-note p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.guide-reopen { width: 100%; margin-top: 28px; padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; border: 1px solid color-mix(in oklch, var(--primary) 28%, var(--line)); border-radius: 9px; background: color-mix(in oklch, var(--primary) 5%, white); color: var(--primary); font-weight: 690; text-align: left; cursor: pointer; }
.guide-reopen:hover { background: color-mix(in oklch, var(--primary) 10%, white); }
.apple-guide { position: fixed; z-index: 40; right: max(20px, env(safe-area-inset-right)); bottom: max(20px, env(safe-area-inset-bottom)); width: min(390px, calc(100vw - 32px)); max-height: min(570px, calc(100dvh - 32px)); overflow: auto; padding: 20px; border: 1px solid oklch(1 0 0 / .86); border-radius: 16px; background: linear-gradient(145deg, oklch(1 0 0 / .94), oklch(.94 .02 270 / .86)); backdrop-filter: blur(32px) saturate(1.5); -webkit-backdrop-filter: blur(32px) saturate(1.5); color: var(--ink); box-shadow: 0 8px 8px oklch(.22 .03 270 / .12), inset 0 1px 0 white; animation: guide-in 220ms cubic-bezier(.22,1,.36,1); }
.guide-topline { display: flex; align-items: center; gap: 10px; color: var(--primary); font-size: 11px; font-weight: 760; letter-spacing: .09em; }
.guide-live { position: relative; width: 25px; height: 25px; display: grid; place-items: center; }
.guide-live span { position: absolute; border: 1.5px solid currentColor; border-radius: 50%; }
.guide-live span:nth-child(1) { width: 8px; height: 8px; background: currentColor; }
.guide-live span:nth-child(2) { width: 17px; height: 17px; }
.guide-live span:nth-child(3) { width: 25px; height: 25px; opacity: .45; }
.guide-close { margin-left: auto; width: 34px; height: 34px; border: 0; border-radius: 50%; background: oklch(1 0 0 / .7); color: var(--ink); font-size: 22px; line-height: 1; cursor: pointer; }
.guide-close:hover { background: white; }
.apple-guide h2 { margin: 13px 0 0; font-size: 1.3rem; letter-spacing: -.02em; text-wrap: balance; }
.guide-lead { margin: 8px 0 17px; color: oklch(.38 .025 270); font-size: 14px; line-height: 1.5; }
.guide-steps { margin: 0; padding: 0; list-style: none; display: grid; }
.guide-steps li { display: flex; gap: 13px; padding: 12px 0; border-top: 1px solid oklch(.82 .018 270 / .65); }
.guide-steps li > span { flex: 0 0 27px; font-size: 12px; color: var(--primary); font-weight: 750; font-variant-numeric: tabular-nums; }
.guide-steps strong { font-size: 14px; }
.guide-steps p { margin: 4px 0 0; color: oklch(.38 .025 270); font-size: 13px; line-height: 1.5; }
.guide-foot { margin: 14px 0 0; padding: 11px 12px; border-radius: 8px; background: oklch(.90 .028 270 / .55); color: oklch(.30 .035 270); font-size: 12px; line-height: 1.55; }
code { padding: 2px 5px; border-radius: 4px; background: var(--surface); color: var(--ink); }
.site-footer { max-width: 1120px; margin: 0 auto; padding: 22px 24px 34px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.privacy-note { margin: 0 0 15px; line-height: 1.5; }
.project-links { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 22px; }
.project-links a { color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 650; }
.project-links a:not(.star-link):hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.project-links a:focus-visible, .header-link:focus-visible { outline: 3px solid color-mix(in oklch, var(--primary) 28%, transparent); outline-offset: 4px; border-radius: 3px; }
.star-link { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; transition: border-color 180ms ease-out, background-color 180ms ease-out; }
.star-link:hover, .star-link:focus-visible { border-color: var(--primary); background: color-mix(in oklch, var(--primary) 7%, var(--bg)); }
.star-icon { position: relative; color: var(--primary); font-size: 17px; line-height: 1; transform-origin: center; }
.star-icon::before, .star-icon::after { content: "✦"; position: absolute; color: var(--primary); font-size: 8px; opacity: 0; pointer-events: none; }
.star-icon::before { top: -8px; left: -8px; }
.star-icon::after { right: -9px; bottom: -7px; }
.star-link:hover .star-icon, .star-link:focus-visible .star-icon { animation: star-pop 420ms cubic-bezier(.22, 1, .36, 1); }
.star-link:hover .star-icon::before, .star-link:hover .star-icon::after, .star-link:focus-visible .star-icon::before, .star-link:focus-visible .star-icon::after { animation: star-spark 520ms ease-out both; }
.star-link:hover .star-icon::after, .star-link:focus-visible .star-icon::after { animation-delay: 70ms; }
.star-arrow { color: var(--muted); font-weight: 500; }

dialog { width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: 14px; background: var(--bg); color: var(--ink); box-shadow: 0 8px 24px oklch(0.18 0.02 270 / .2); overflow: auto; }
dialog::backdrop { background: oklch(0.18 0.02 270 / .58); }
dialog[open] { animation: dialog-in 180ms cubic-bezier(.22, 1, .36, 1); }
.dialog-card { padding: 28px; }
.dialog-heading { display: flex; align-items: flex-start; gap: 20px; }
.dialog-heading > div { min-width: 0; }
.dialog-heading h2 { margin: 0; font-size: 1.35rem; letter-spacing: -.02em; }
.dialog-heading p { max-width: 68ch; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; text-wrap: pretty; }
.icon-button { flex: 0 0 40px; width: 40px; height: 40px; border: 0; border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; }
.icon-button:hover { color: var(--ink); }
.upload-picker { position: relative; min-height: 112px; margin-top: 24px; padding: 20px; display: grid; place-content: center; gap: 7px; text-align: center; border: 1px dashed color-mix(in oklch, var(--primary) 48%, var(--line)); border-radius: 10px; background: var(--surface); cursor: pointer; overflow: hidden; }
.upload-picker:hover { border-color: var(--primary); }
.upload-picker strong { font-size: 15px; }
.upload-picker span { color: var(--muted); font-size: 13px; }
.upload-picker input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload-picker:focus-within { outline: 3px solid color-mix(in oklch, var(--primary) 28%, transparent); outline-offset: 2px; }
.dialog-status { min-height: 22px; margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.dialog-status[data-state="error"] { color: var(--danger); }
.dialog-status[data-state="success"] { color: oklch(0.43 0.12 190); }
.dialog-actions { margin-top: 18px; display: flex; justify-content: flex-end; gap: 10px; }
.dialog-actions .secondary { min-width: 84px; }
.dialog-primary { width: auto; min-width: 132px; min-height: 42px; padding: 0 18px; }

@keyframes pulse { 50% { opacity: .35; transform: scale(.75); } }
@keyframes star-pop { 45% { transform: scale(1.3) rotate(-12deg); } }
@keyframes star-spark { 35% { opacity: 1; transform: scale(1.2); } 100% { opacity: 0; transform: translateY(-5px) scale(.8); } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.985); } }
@keyframes guide-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes menu-in { from { opacity: 0; } }
@media (max-width: 980px) {
  main { padding-top: 48px; }
  .workspace { grid-template-columns: 1fr; }
  .side-panel { border-left: 0; border-top: 1px solid var(--line); padding: 24px 0 0; }
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .site-header { height: 58px; padding: 0 18px; }
  .header-link { font-size: 12px; }
  main { padding: 34px 18px 56px; }
  .intro { margin-bottom: 28px; }
  h1 { max-width: none; font-size: clamp(1.95rem, 7.8vw, 2.5rem); line-height: 1.2; }
  .intro > p:last-child { margin-top: 12px; font-size: 15px; line-height: 1.55; }
  .workspace { gap: 22px; }
  .file-list { display: grid; gap: 12px; border: 0; border-radius: 0; background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; overflow: visible; }
  .file-row, .file-row + .file-row { min-width: 0; min-height: 0; padding: 16px; grid-template-columns: 30px minmax(0, 1fr); gap: 10px 12px; border: 1px solid oklch(.84 .014 270 / .82); border-radius: 17px; background: oklch(1 0 0 / .73); backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); box-shadow: inset 0 1px 0 oklch(1 0 0 / .8), 0 5px 16px oklch(.31 .04 270 / .05); }
  .step { width: 28px; height: 28px; font-size: 12px; }
  .file-copy { align-self: center; }
  .file-copy strong { font-size: 15px; }
  .file-copy small { font-size: 12px; }
  .template-controls, .file-action { grid-column: 1 / -1; width: 100%; max-width: none; min-width: 0; margin-top: 5px; }
  .template-controls { gap: 9px; }
  .template-trigger { min-height: 52px; font-size: 16px; }
  .template-option { min-height: 46px; font-size: 15px; }
  .select-control select { min-width: 0; height: 52px; font-size: 16px; }
  .template-controls .secondary { min-height: 44px; background: oklch(1 0 0 / .55); }
  .file-action { min-height: 52px; border-radius: 11px; background: oklch(1 0 0 / .57); font-size: 16px; }
  .advanced { margin: 18px 0; }
  .advanced summary { min-height: 54px; display: flex; align-items: center; }
  .option-grid { grid-template-columns: 1fr; gap: 15px; }
  .option-grid input[type="number"], .option-grid select { min-height: 46px; font-size: 16px; }
  .primary { min-height: 56px; border-radius: 12px; font-size: 16px; }
  .side-panel { padding: 18px; border: 1px solid oklch(.84 .014 270 / .8); border-radius: 17px; background: oklch(1 0 0 / .65); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
  .status p, .transfer-note p { overflow-wrap: anywhere; }
  .template-info { margin-top: 18px; }
  .transfer-note { margin-top: 18px; padding-top: 18px; }
  .site-footer { margin: 0 18px; padding: 20px 0 max(30px, env(safe-area-inset-bottom)); }
  .project-links { display: grid; gap: 14px; }
  .star-link { width: 100%; justify-content: center; }
  .dialog-card { padding: 22px 18px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .secondary, .dialog-primary { width: 100%; }
  .apple-guide { left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); width: auto; max-height: min(72dvh, 590px); padding: 20px 18px max(20px, env(safe-area-inset-bottom)); border-radius: 22px; background: linear-gradient(145deg, oklch(1 0 0 / .97), oklch(.95 .015 270 / .94)); box-shadow: 0 12px 36px oklch(.2 .03 270 / .24), inset 0 1px 0 white; }
  .guide-lead { margin-bottom: 13px; }
  .guide-steps li { padding: 10px 0; }
}
@media (max-width: 640px) and (max-height: 650px) {
  .apple-guide { max-height: calc(100dvh - 16px); }
}
@media (min-width: 641px) and (max-height: 500px) {
  .apple-guide { max-height: calc(100dvh - 24px); bottom: 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* Deployment-only accents with reduced-motion and forced-colors support. */
.header-actions { display:flex; align-items:center; gap:18px; }
.language-link { color:var(--primary); text-decoration:none; font-size:13px; font-weight:650; padding:8px 0; }
.language-link:focus-visible { outline:2px solid var(--primary); outline-offset:4px; }
.prism-word { color:#6536b5; font-weight:750; }
@supports ((background-clip:text) or (-webkit-background-clip:text)) {
  .prism-word { background:linear-gradient(110deg,#b3246e,#6840bd,#1766a4,#087469,#b3246e); background-size:250% 100%; -webkit-background-clip:text; background-clip:text; -webkit-text-fill-color:transparent; animation:prism-flow 6s ease-in-out infinite alternate; }
  .prism-word--second { animation-delay:-3s; }
}
@keyframes prism-flow { from { background-position:0% 50%; } to { background-position:100% 50%; } }
html[lang="en"] h1 { font-size:clamp(2rem,4vw,2.625rem); }
html[lang="en"] .template-controls { max-width:300px; }
@media (max-width:640px) { .header-actions { gap:12px; } .header-actions .header-link { display:none; } html[lang="en"] .brand { font-size:15px; } html[lang="en"] h1 { font-size:2rem; line-height:1.14; } html[lang="en"] .template-controls { max-width:none; } }
@media (prefers-reduced-motion:reduce) { .prism-word { animation:none; background-position:50% 50%; } }
.trait-tags { margin:18px 0 0; padding:0; list-style:none; display:flex; flex-wrap:wrap; gap:8px; }
.trait-tags li { padding:5px 13px; border:1px solid oklch(.84 .03 270 / .8); border-radius:99px; background:oklch(1 0 0 / .62); color:var(--primary); font-size:13px; font-weight:700; letter-spacing:.02em; box-shadow:inset 0 1px 0 oklch(1 0 0 / .9); }
@media (max-width:640px) { .trait-tags { margin-top:14px; gap:6px; } .trait-tags li { padding:4px 11px; font-size:12px; } }
@media (forced-colors:active) { .prism-word { background:none; -webkit-text-fill-color:currentColor; color:LinkText; } }

/* Apple workflow pagination */
.guide-pager { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:16px; }
.guide-pager button { min-height:44px; padding:8px 12px; border:0; border-radius:10px; background:var(--primary); color:white; cursor:pointer; font-weight:650; }
.guide-pager button:disabled { background:var(--surface); color:var(--muted); cursor:default; }
.guide-pager button:focus-visible { outline:2px solid var(--primary); outline-offset:3px; }
#guide-page-count { white-space:nowrap; font-size:13px; font-variant-numeric:tabular-nums; }
.brand-en { margin-left:8px; font-size:12px; font-weight:500; color:var(--muted); }
.hero-main { display:block; font-weight:750; letter-spacing:-.02em; }
.hero-secondary { display:block; margin-top:.35em; color:var(--muted); font-size:.52em; font-weight:450; letter-spacing:.02em; line-height:1.4; }
@media (max-width:600px) { .brand-en { display:block; margin:2px 0 0 25px; font-size:10px; } .hero-secondary { font-size:.55em; } }
