:root {
  --primary: #087a61;
  --primary-dark: #075443;
  --primary-soft: #e8f7f2;
  --accent: #ff8a3d;
  --accent-soft: #fff0e6;
  --ink: #102722;
  --muted: #62736f;
  --line: #dce8e4;
  --surface: #ffffff;
  --surface-alt: #f5faf8;
  --shadow-sm: 0 10px 28px rgba(9, 72, 58, 0.08);
  --shadow-lg: 0 28px 70px rgba(9, 72, 58, 0.14);
  --radius-sm: 14px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --header-height: 88px;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: #f8fbfa;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 18px); }
body { margin: 0; min-width: 320px; background: #f8fbfa; color: var(--ink); overflow-x: hidden; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.noscript { padding: 16px; background: #b42318; color: white; text-align: center; font-weight: 700; }

.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-height);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 78px);
  background: rgba(248, 251, 250, 0.86); border-bottom: 1px solid rgba(220, 232, 228, 0.85);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 14px; min-width: 0; }
.brand-logo {
  flex: 0 0 auto; display: block; width: clamp(150px, 14vw, 174px); height: 70px;
  object-fit: contain; object-position: left center;
}
.brand-mark {
  flex: 0 0 auto; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: linear-gradient(145deg, var(--primary), var(--primary-dark)); color: white; font-weight: 900;
  letter-spacing: -0.05em; box-shadow: 0 8px 20px rgba(8, 122, 97, 0.25);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; padding-left: 14px; border-left: 1px solid var(--line); }
.brand-copy strong { font-size: 0.98rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-copy small { color: var(--muted); margin-top: 4px; font-size: 0.74rem; }
.header-action {
  display: inline-flex; align-items: center; gap: 5px; padding: 10px 14px; border-radius: 999px;
  background: var(--ink); color: white; font-size: 0.88rem; font-weight: 750; transition: transform .2s ease, background .2s ease;
}
.header-action:hover { transform: translateY(-2px); background: var(--primary); }

.hero {
  position: relative; isolation: isolate; min-height: calc(100svh - var(--header-height));
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); align-items: center;
  gap: clamp(40px, 7vw, 110px); padding: clamp(64px, 8vw, 112px) clamp(20px, 7vw, 110px);
  overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background: radial-gradient(circle at 12% 20%, rgba(183,222,87,.24), transparent 29%),
              radial-gradient(circle at 87% 33%, rgba(255,138,61,.17), transparent 26%),
              linear-gradient(145deg, #f7fbf9 0%, #f0faf6 52%, #fffaf6 100%);
}
.hero::after {
  content: ""; position: absolute; width: 560px; height: 560px; right: -220px; bottom: -280px; z-index: -2;
  border-radius: 50%; border: 80px solid rgba(8,122,97,.06);
}
.hero-orb { position: absolute; border-radius: 50%; filter: blur(1px); z-index: -1; }
.orb-one { width: 120px; height: 120px; background: rgba(255,138,61,.13); left: 45%; top: 13%; }
.orb-two { width: 64px; height: 64px; background: rgba(8,122,97,.14); left: 53%; bottom: 16%; }
.hero-content { max-width: 720px; }
.eyebrow, .section-kicker {
  display: inline-flex; align-items: center; gap: 9px; color: var(--primary); font-size: .78rem; font-weight: 850;
  letter-spacing: .13em; text-transform: uppercase;
}
.eyebrow > span:first-child { width: 28px; height: 3px; border-radius: 99px; background: var(--accent); }
.hero h1 { margin: 18px 0 20px; max-width: 700px; font-size: clamp(2.45rem, 5.6vw, 5.2rem); line-height: .98; letter-spacing: -.055em; }
.hero-content > p { max-width: 620px; margin: 0; color: var(--muted); font-size: clamp(1rem, 1.4vw, 1.18rem); line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.button {
  border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border-radius: 15px;
  padding: 14px 19px; font-weight: 800; cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background .2s ease, opacity .2s ease;
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: white; box-shadow: 0 12px 30px rgba(8,122,97,.24); }
.button-primary:hover:not(:disabled) { box-shadow: 0 18px 36px rgba(8,122,97,.29); }
.button-secondary { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid rgba(8,122,97,.16); }
.button-ghost { color: var(--ink); border: 1px solid var(--line); background: rgba(255,255,255,.64); }
.button-large { min-height: 54px; padding-inline: 22px; }
.trust-row { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 34px; color: #48615b; font-size: .82rem; font-weight: 720; }
.trust-row span { display: inline-flex; align-items: center; gap: 6px; }
.trust-row svg { color: var(--primary); }

.hero-visual { position: relative; width: min(100%, 560px); aspect-ratio: 1; justify-self: center; }
.visual-card { position: absolute; border-radius: 34px; }
.visual-card-back { inset: 14% 0 3% 13%; transform: rotate(8deg); background: linear-gradient(145deg, var(--accent), #ffc06d); opacity: .25; }
.visual-card-main {
  inset: 4% 8% 10% 2%; padding: 20px; transform: rotate(-3deg); background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow-lg); backdrop-filter: blur(14px);
}
.visual-topbar { display: flex; gap: 7px; padding: 1px 0 17px; }
.visual-topbar span { width: 9px; height: 9px; border-radius: 50%; background: #dce8e4; }
.visual-topbar span:first-child { background: #ff8a3d; }
.visual-frame {
  position: relative; overflow: hidden; height: calc(100% - 72px); border-radius: 25px;
  display: grid; place-items: center; background: linear-gradient(145deg, #d9efe8, #eef8f4);
  border: 28px solid var(--primary); box-shadow: inset 0 0 0 10px #b7de57;
}
.visual-frame::before, .visual-frame::after { content: ""; position: absolute; width: 220px; height: 80px; background: var(--accent); transform: rotate(-16deg); }
.visual-frame::before { left: -110px; top: 6px; }
.visual-frame::after { right: -120px; bottom: 4px; background: #b7de57; }
.visual-avatar { width: 62%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; background: white; color: #8fb7ad; }
.visual-avatar svg { width: 65%; height: 65%; fill: currentColor; stroke: none; }
.visual-ribbon { position: absolute; bottom: 4%; left: 10%; right: 10%; padding: 12px; border-radius: 12px; background: var(--primary-dark); color: white; text-align: center; font-weight: 900; letter-spacing: .1em; }
.visual-controls { display: flex; justify-content: center; gap: 9px; margin-top: 14px; }
.visual-controls span { width: 54px; height: 8px; border-radius: 999px; background: #dfeae7; }
.visual-controls span:nth-child(2) { width: 100px; background: var(--primary); }
.floating-pill { position: absolute; z-index: 3; border-radius: 999px; padding: 10px 15px; background: white; box-shadow: var(--shadow-sm); font-size: .78rem; font-weight: 850; }
.pill-one { left: -5%; bottom: 16%; transform: rotate(3deg); }
.pill-two { right: -2%; top: 15%; color: var(--primary); transform: rotate(5deg); }

.steps-section, .editor-section, .caption-section { padding: clamp(72px, 8vw, 120px) clamp(20px, 7vw, 110px); }
.steps-section { background: white; }
.section-heading h2, .caption-copy h2 { margin: 10px 0 12px; font-size: clamp(2rem, 3.7vw, 3.25rem); line-height: 1.08; letter-spacing: -.04em; }
.section-heading p, .caption-copy p { margin: 0; color: var(--muted); line-height: 1.7; }
.centered-heading { max-width: 660px; margin: 0 auto 42px; text-align: center; }
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; max-width: 1160px; margin: auto; }
.step-card { position: relative; overflow: hidden; min-height: 250px; padding: 27px; border: 1px solid var(--line); border-radius: var(--radius-md); background: linear-gradient(160deg,#fff,#f7fbfa); transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
.step-card:hover { transform: translateY(-7px); box-shadow: var(--shadow-sm); border-color: rgba(8,122,97,.28); }
.step-number { position: absolute; right: 21px; top: 16px; color: rgba(8,122,97,.11); font-size: 3.9rem; line-height: 1; font-weight: 950; letter-spacing: -.08em; }
.step-icon { width: 53px; height: 53px; display: grid; place-items: center; border-radius: 17px; background: var(--primary-soft); color: var(--primary); }
.step-icon svg { width: 26px; height: 26px; }
.step-card h3 { margin: 24px 0 9px; font-size: 1.2rem; }
.step-card p { margin: 0; color: var(--muted); line-height: 1.65; font-size: .94rem; }

.editor-section { background: linear-gradient(180deg, #f4faf7 0%, #f8fbfa 100%); }
.editor-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; max-width: 1300px; margin: 0 auto 34px; }
.privacy-badge { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 999px; background: white; color: var(--primary-dark); border: 1px solid var(--line); font-size: .8rem; font-weight: 750; box-shadow: var(--shadow-sm); }
.editor-layout { max-width: 1300px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(340px, .72fr); gap: 22px; align-items: start; }
.preview-panel, .controls-panel { min-width: 0; }
.preview-panel { position: sticky; top: calc(var(--header-height) + 18px); padding: 22px; border-radius: var(--radius-lg); background: white; border: 1px solid var(--line); box-shadow: var(--shadow-lg); }
.panel-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 17px; }
.panel-label { display: block; color: var(--primary); font-size: .72rem; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.panel-topline h3 { margin: 3px 0 0; font-size: 1rem; }
.icon-button { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-alt); cursor: pointer; }
.canvas-stage { position: relative; width: 100%; aspect-ratio: 1; overflow: hidden; border-radius: 22px; background-color: #e7efec; background-image: linear-gradient(45deg,#dfe9e5 25%,transparent 25%),linear-gradient(-45deg,#dfe9e5 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dfe9e5 75%),linear-gradient(-45deg,transparent 75%,#dfe9e5 75%); background-size: 24px 24px; background-position: 0 0,0 12px,12px -12px,-12px 0; touch-action: none; user-select: none; }
#twibbonCanvas { display: block; width: 100%; height: 100%; cursor: grab; }
#twibbonCanvas:active { cursor: grabbing; }
.canvas-hint { pointer-events: none; position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 25%; text-align: center; color: white; text-shadow: 0 2px 12px rgba(0,0,0,.34); transition: opacity .2s ease; }
.canvas-hint.hidden { opacity: 0; }
.canvas-hint svg { width: 42px; height: 42px; margin-bottom: 12px; }
.canvas-hint strong { font-size: 1rem; }
.canvas-hint span { margin-top: 7px; font-size: .75rem; line-height: 1.5; }
.gesture-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 14px 0 0; color: var(--muted); font-size: .78rem; }
.controls-panel { display: flex; flex-direction: column; gap: 14px; }
.control-card { padding: 20px; border-radius: var(--radius-md); background: white; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.control-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 17px; }
.control-number { flex: 0 0 auto; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; background: var(--primary); color: white; font-size: .82rem; font-weight: 900; }
.control-heading h3 { margin: 0; font-size: 1rem; }
.control-heading p { margin: 4px 0 0; color: var(--muted); font-size: .77rem; line-height: 1.45; }
.compact-heading { margin-bottom: 15px; }
.upload-dropzone { width: 100%; min-height: 92px; display: flex; align-items: center; gap: 14px; padding: 16px; text-align: left; border: 1.5px dashed rgba(8,122,97,.35); border-radius: 16px; background: var(--primary-soft); color: var(--primary-dark); cursor: pointer; transition: border .2s ease, background .2s ease, transform .2s ease; }
.upload-dropzone:hover, .upload-dropzone.dragover { border-color: var(--primary); background: #dcf3eb; transform: translateY(-2px); }
.upload-icon { flex: 0 0 auto; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: white; box-shadow: 0 8px 18px rgba(8,122,97,.12); }
.upload-dropzone span:last-child { display: flex; flex-direction: column; }
.upload-dropzone strong { font-size: .9rem; }
.upload-dropzone small { margin-top: 4px; color: #5b7770; font-size: .73rem; }
.file-status { min-height: 0; margin-top: 0; color: var(--primary); font-size: .75rem; line-height: 1.45; }
.file-status:not(:empty) { margin-top: 10px; }
.template-list { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 9px; }
.template-button { position: relative; padding: 5px; overflow: hidden; border-radius: 14px; border: 2px solid transparent; background: #edf4f1; cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.template-button:hover { transform: translateY(-2px); }
.template-button.active { border-color: var(--primary); box-shadow: 0 8px 20px rgba(8,122,97,.14); }
.template-button img { display: block; width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: 9px; background-color: #dfeae7; background-image: linear-gradient(45deg,#d5e3de 25%,transparent 25%),linear-gradient(-45deg,#d5e3de 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#d5e3de 75%),linear-gradient(-45deg,transparent 75%,#d5e3de 75%); background-size: 12px 12px; background-position: 0 0,0 6px,6px -6px,-6px 0; }
.template-button span { position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px); padding: 4px 6px; border-radius: 7px; background: rgba(8,39,34,.78); color: white; font-size: .56rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; backdrop-filter: blur(5px); }
.range-group + .range-group { margin-top: 18px; }
.range-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: .79rem; font-weight: 750; }
.range-label output { color: var(--primary); font-variant-numeric: tabular-nums; }
.range-row { display: grid; grid-template-columns: 22px 1fr 22px; align-items: center; gap: 8px; color: var(--muted); }
.range-row svg { width: 18px; }
input[type="range"] { width: 100%; accent-color: var(--primary); cursor: pointer; }
.range-help { margin: 7px 0 0 30px; color: var(--muted); font-size: .66rem; line-height: 1.45; }
.quick-controls { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 18px; }
.quick-controls button { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 10px 5px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-alt); color: #3e5b54; cursor: pointer; font-size: .65rem; font-weight: 750; }
.quick-controls button:hover { background: var(--primary-soft); color: var(--primary); }
.quick-controls svg { width: 17px; height: 17px; }
.download-button, .share-button { width: 100%; min-height: 54px; }
.download-note { margin: -3px 0 0; color: var(--muted); text-align: center; font-size: .72rem; line-height: 1.45; }
.download-note strong { color: var(--ink); }

.caption-section { display: grid; grid-template-columns: minmax(0,.8fr) minmax(380px,1.2fr); gap: clamp(36px,7vw,100px); align-items: center; background: white; }
.caption-copy { max-width: 520px; }
.caption-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-md); background: #f8fbfa; box-shadow: var(--shadow-lg); }
.caption-topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--line); background: white; }
.caption-topbar > div { display: flex; align-items: center; gap: 8px; font-size: .82rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #31b276; box-shadow: 0 0 0 4px rgba(49,178,118,.12); }
.caption-topbar button { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-alt); color: var(--primary-dark); cursor: pointer; font-size: .76rem; font-weight: 800; }
.caption-personalization { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; padding: 18px 19px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg,#fbfdfc,#f4f9f7); }
.caption-input-field { display: grid; gap: 7px; color: var(--ink); font-size: .75rem; font-weight: 800; }
.caption-input-field input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid #cdded8; border-radius: 12px; outline: none; background: white; color: var(--ink); font: inherit; font-weight: 650; transition: border-color .2s ease, box-shadow .2s ease; }
.caption-input-field input::placeholder { color: #9aaba6; font-weight: 550; }
.caption-input-field input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(8,122,97,.1); }
.caption-personalization-note { grid-column: 1 / -1; margin: -1px 0 0; color: var(--muted); font-size: .67rem; line-height: 1.45; }
#captionText { display: block; width: 100%; resize: vertical; min-height: 230px; padding: 19px; border: 0; outline: none; background: transparent; color: #405a54; line-height: 1.7; font-size: .88rem; }
.privacy-section { display: flex; align-items: center; gap: 20px; max-width: 1180px; margin: 0 auto clamp(72px,8vw,120px); padding: 26px clamp(22px,4vw,42px); border-radius: var(--radius-md); background: linear-gradient(135deg,var(--primary-dark),var(--primary)); color: white; box-shadow: var(--shadow-lg); }
.privacy-icon { flex: 0 0 auto; width: 60px; height: 60px; display: grid; place-items: center; border-radius: 19px; background: rgba(255,255,255,.13); }
.privacy-icon svg { width: 29px; height: 29px; }
.privacy-section h2 { margin: 0 0 6px; font-size: 1.3rem; }
.privacy-section p { margin: 0; color: rgba(255,255,255,.78); line-height: 1.6; font-size: .88rem; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 30px clamp(20px,7vw,110px); border-top: 1px solid var(--line); background: white; color: var(--muted); }
.footer-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.footer-brand .brand-mark { width: 38px; height: 38px; border-radius: 12px; font-size: .87rem; }
.footer-brand div { display: flex; flex-direction: column; }
.footer-brand small { color: var(--muted); margin-top: 4px; font-size: .7rem; }
.site-footer > p { margin: 0; font-size: .75rem; text-align: right; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 30px); opacity: 0; pointer-events: none; padding: 12px 17px; border-radius: 12px; background: #102722; color: white; box-shadow: var(--shadow-lg); font-size: .82rem; font-weight: 750; transition: opacity .25s ease, transform .25s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.preview-dialog { width: min(92vw,760px); max-width: 760px; padding: 10px; border: 0; border-radius: 24px; background: white; box-shadow: 0 35px 100px rgba(0,0,0,.35); }
.preview-dialog::backdrop { background: rgba(4,25,21,.78); backdrop-filter: blur(6px); }
.preview-dialog canvas { display: block; width: 100%; border-radius: 17px; }
.dialog-close { position: absolute; z-index: 2; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(5,26,22,.72); color: white; cursor: pointer; font-size: 1.55rem; line-height: 1; }

@media (max-width: 980px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 72px; }
  .hero-content { margin: 0 auto; }
  .hero h1, .hero-content > p { margin-left: auto; margin-right: auto; }
  .eyebrow, .hero-actions, .trust-row { justify-content: center; }
  .hero-visual { width: min(86vw, 540px); }
  .editor-layout { grid-template-columns: 1fr; max-width: 760px; }
  .preview-panel { position: relative; top: auto; }
  .editor-heading { max-width: 760px; }
  .caption-section { grid-template-columns: 1fr; }
  .caption-copy { max-width: 650px; }
}

@media (max-width: 720px) {
  :root { --header-height: 74px; }
  .site-header { padding-inline: 16px; }
  .brand-logo { width: 132px; height: 58px; }
  .brand-copy { display: none; }
  .brand-mark { width: 39px; height: 39px; border-radius: 12px; }
  .brand-copy strong { font-size: .87rem; }
  .brand-copy small { display: none; }
  .header-action { padding: 9px 12px; font-size: .77rem; }
  .hero { min-height: auto; padding: 56px 20px 74px; gap: 52px; }
  .hero h1 { font-size: clamp(2.45rem, 12vw, 4.2rem); }
  .hero-content > p { font-size: .98rem; }
  .hero-actions { flex-direction: column; }
  .button-large { width: 100%; }
  .trust-row { gap: 10px 14px; font-size: .72rem; }
  .hero-visual { width: min(92vw, 460px); }
  .floating-pill { font-size: .68rem; }
  .pill-one { left: 0; }
  .pill-two { right: 0; }
  .steps-section, .editor-section, .caption-section { padding: 72px 16px; }
  .steps-grid { grid-template-columns: 1fr; }
  .step-card { min-height: 205px; }
  .editor-heading { align-items: flex-start; flex-direction: column; }
  .privacy-badge { font-size: .72rem; }
  .preview-panel { padding: 13px; border-radius: 23px; }
  .canvas-stage { border-radius: 16px; }
  .canvas-hint { padding: 19%; }
  .gesture-note { font-size: .68rem; }
  .control-card { padding: 17px; }
  .template-button span { display: none; }
  .caption-section { gap: 28px; }
  .caption-personalization { grid-template-columns: 1fr; }
  .privacy-section { margin: 0 16px 72px; align-items: flex-start; padding: 23px; }
  .privacy-icon { width: 48px; height: 48px; border-radius: 15px; }
  .privacy-section h2 { font-size: 1.05rem; }
  .site-footer { align-items: flex-start; flex-direction: column; padding: 26px 20px; }
  .site-footer > p { text-align: left; }
}

@media (max-width: 390px) {
  .header-action svg { display: none; }
  .header-action { padding-inline: 10px; }
  .hero { padding-inline: 15px; }
  .trust-row { flex-direction: column; align-items: center; }
  .controls-panel { gap: 11px; }
  .quick-controls button { font-size: .59rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* Read-only official caption and admin access */
#captionText[readonly] {
  resize: none;
  cursor: default;
  user-select: text;
}
#captionText[readonly]:focus { box-shadow: inset 0 0 0 2px rgba(8,122,97,.12); }
.template-empty { grid-column: 1 / -1; margin: 0; padding: 18px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; font-size: .8rem; line-height: 1.55; }
.footer-meta { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.footer-meta p { margin: 0; font-size: .75rem; text-align: right; }
.admin-link { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--primary-dark); background: var(--primary-soft); border-color: rgba(8,122,97,.28); font-size: .72rem; font-weight: 850; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.admin-link svg { width: 14px; height: 14px; }
.admin-link:hover { color: white; border-color: var(--primary); background: var(--primary); transform: translateY(-1px); }

@media (max-width: 720px) {
  .brand { max-width: calc(100% - 108px); }
  .brand-logo { width: 124px; height: 54px; }
  .brand-copy strong { font-size: .8rem; }
  .footer-meta { width: 100%; align-items: flex-start; justify-content: space-between; }
  .footer-meta p { text-align: left; }
}
