:root {
  --_brclio-ds: "brclio-v1";
  --blue: #2b7fd8;
  --blue-deep: #1e5ba8;
  --yellow: #f4d758;
  --red: #e84a5f;
  --red-deep: #b83248;
  --cream: #fefcf6;
  --cream-deep: #faf6eb;
  --paper: #fffdf8;
  --ink: #1a1a2e;
  --ink-light: #4a4a5a;
  --ink-faint: #6f6f7c;
  --line: rgba(26, 26, 46, 0.12);
  --line-strong: rgba(26, 26, 46, 0.28);
  --shadow-blue: rgba(43, 127, 216, 0.12);
  --shadow-ink: rgba(26, 26, 46, 0.1);
  --font-sans: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-serif: "Noto Serif SC", "Songti SC", serif;
  --font-display: "Fraunces", "Noto Serif SC", serif;
  --font-hand: "Caveat", "Noto Sans SC", cursive;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-sans);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background-color: var(--cream);
  background-image: radial-gradient(circle, rgba(43, 127, 216, 0.065) 1px, transparent 1px);
  background-size: 24px 24px;
  font-size: 15px;
  line-height: 1.7;
}

h1,
h2,
h3,
p {
  margin: 0;
}

button,
textarea,
select {
  font: inherit;
}

button,
a,
label,
select {
  -webkit-tap-highlight-color: transparent;
}

button,
select {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
textarea:focus-visible,
select:focus-visible,
video:focus-visible,
input:focus-visible + span {
  outline: 3px solid var(--blue-deep);
  outline-offset: 3px;
}

::selection {
  color: var(--ink);
  background: var(--yellow);
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}

.app-header-inner {
  width: min(1200px, calc(100% - 40px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  object-fit: cover;
  background: #fff800;
  box-shadow: 3px 3px 0 var(--blue);
  transform: rotate(-2deg);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border: 1.5px solid var(--ink);
  border-radius: 11px 11px 14px 10px;
  color: var(--cream);
  background: var(--blue);
  box-shadow: 4px 4px 0 var(--yellow);
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-2deg);
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  font-family: var(--font-serif);
  font-size: 15px;
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.brand-copy small {
  color: var(--ink-faint);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.13em;
  line-height: 1.4;
}

.brand:hover .brand-copy strong,
.design-credit:hover {
  background: linear-gradient(transparent 60%, var(--yellow) 60%);
}

.brand:hover .brand-logo {
  box-shadow: 4px 4px 0 var(--yellow);
  transform: translateY(-1px) rotate(0deg);
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
}

.app-navigation {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 11px;
  color: var(--ink-light);
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
}

.nav-link::after {
  content: "";
  position: absolute;
  right: 11px;
  bottom: 7px;
  left: 11px;
  height: 3px;
  border-radius: 999px;
  background: var(--yellow);
  opacity: 0;
  transform: scaleX(0.45);
  transition: opacity 160ms ease, transform 160ms ease;
}

.nav-link:hover,
.nav-link.is-current {
  color: var(--ink);
}

.nav-link:hover::after,
.nav-link.is-current::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-light);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(232, 74, 95, 0.11);
}

.page-shell {
  position: relative;
  width: min(1200px, calc(100% - 40px));
  margin: 0 auto;
}

.page-shell::before {
  content: "SAVE";
  position: absolute;
  z-index: -1;
  top: 50px;
  right: -12px;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(5rem, 14vw, 11rem);
  font-weight: 900;
  line-height: 1;
  opacity: 0.025;
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: minmax(310px, 0.84fr) minmax(0, 1.16fr);
  align-items: center;
  column-gap: clamp(40px, 6vw, 88px);
  row-gap: clamp(26px, 3vw, 42px);
  min-height: min(780px, calc(100vh - 64px));
  padding: clamp(72px, 9vw, 120px) 0;
}

.hero-copy {
  grid-column: 1;
  grid-row: 1;
  align-self: end;
}

.eyebrow,
.section-label,
.panel-kicker,
.empty-index {
  display: block;
  color: var(--blue-deep);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.hero-copy h1 {
  max-width: 620px;
  margin-top: 18px;
  font-family: var(--font-serif);
  font-size: clamp(2.65rem, 4vw, 3.75rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.16;
  white-space: nowrap;
}

.hl-yellow {
  padding: 0 4px;
  background: linear-gradient(transparent 64%, rgba(244, 215, 88, 0.82) 64%);
}

.hero-copy > p {
  max-width: 550px;
  margin-top: 26px;
  color: var(--ink-light);
  font-size: clamp(0.96rem, 1.3vw, 1.08rem);
  line-height: 1.95;
}

.hero-index {
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  max-width: 520px;
  margin-top: 0;
  border-top: 1px solid var(--line-strong);
}

.hero-index-item {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: center;
  min-height: 49px;
  border-bottom: 1px solid var(--line);
}

.hero-index-item span {
  color: var(--red-deep);
  font-family: var(--font-hand);
  font-size: 1.05rem;
  font-weight: 700;
}

.hero-index-item strong {
  font-size: 0.8rem;
  font-weight: 600;
}

.parse-card {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  min-width: 0;
  padding: clamp(26px, 3.5vw, 42px);
  border: 1.5px solid var(--ink);
  border-radius: 24px 24px 28px 22px;
  background: var(--paper);
  box-shadow: 9px 9px 0 var(--shadow-blue);
}

.parse-card::before {
  content: "paste · parse · save";
  position: absolute;
  top: -23px;
  right: clamp(20px, 4vw, 46px);
  min-height: 40px;
  padding: 5px 18px;
  display: flex;
  align-items: center;
  color: var(--ink);
  background: var(--yellow);
  font-family: var(--font-hand);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(1.5deg);
}

.panel-heading {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  min-height: 76px;
  margin-bottom: 26px;
  overflow: hidden;
}

.panel-heading h2 {
  margin-top: 5px;
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 900;
  line-height: 1.35;
}

.panel-step {
  position: absolute;
  top: -21px;
  right: 0;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 8vw, 6.8rem);
  font-style: italic;
  font-weight: 900;
  line-height: 1;
  opacity: 0.08;
  pointer-events: none;
}

.field-label,
.engine-picker legend {
  display: block;
  margin-bottom: 10px;
  padding: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
}

textarea {
  width: 100%;
  min-height: 156px;
  padding: 17px 18px;
  resize: vertical;
  border: 1.5px solid var(--line-strong);
  border-radius: 12px 12px 16px 11px;
  outline: none;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.75;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

textarea::placeholder {
  color: var(--ink-faint);
}

textarea:focus {
  border-color: var(--blue);
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(43, 127, 216, 0.1);
}

.engine-picker {
  min-width: 0;
  margin: 20px 0 0;
  padding: 0;
  border: 0;
}

.engine-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.engine-option {
  position: relative;
  display: block;
  min-width: 0;
  cursor: pointer;
}

.engine-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.engine-option span {
  position: relative;
  display: flex;
  min-height: 72px;
  flex-direction: column;
  justify-content: center;
  padding: 12px 14px 12px 39px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--cream-deep);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease, transform 180ms ease;
}

.engine-option span::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
  transform: translateY(-50%);
}

.engine-option strong {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.3;
}

.engine-option small {
  margin-top: 4px;
  color: var(--ink-faint);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
}

.engine-option:hover span {
  border-color: rgba(43, 127, 216, 0.45);
  transform: translateY(-1px);
}

.engine-option input:checked + span {
  border-color: var(--blue);
  color: var(--cream);
  background: var(--blue-deep);
}

.engine-option input:checked + span::before {
  border: 4px solid var(--paper);
  background: var(--yellow);
}

.engine-option input:checked + span small {
  color: var(--cream);
}

.engine-option input:disabled + span {
  cursor: not-allowed;
  opacity: 0.52;
  transform: none;
}

.engine-hint {
  margin: 10px 2px 0;
  color: var(--ink-faint);
  font-size: 0.78rem;
  line-height: 1.65;
}

.form-actions,
.result-actions,
.image-card-actions,
.video-actions {
  display: flex;
  gap: 11px;
}

.form-actions {
  margin-top: 18px;
}

.button,
.card-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1.5px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, opacity 180ms ease;
}

.button:hover,
.card-button:hover {
  transform: translateY(-2px);
}

.button:active,
.card-button:active {
  transform: translateY(0);
}

.button:disabled,
.card-button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  transform: none;
  box-shadow: none;
}

.button-primary {
  flex: 1;
  padding: 0 24px;
  border-color: var(--ink);
  color: var(--cream);
  background: var(--blue-deep);
  box-shadow: 4px 4px 0 var(--yellow);
}

.button-primary:hover {
  background: var(--blue-deep);
  box-shadow: 6px 6px 0 var(--yellow);
}

.button-secondary {
  padding: 0 18px;
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--cream-deep);
}

.button-secondary:hover {
  background: var(--yellow);
  box-shadow: 3px 3px 0 rgba(26, 26, 46, 0.12);
}

.button-copy-images {
  padding: 0 18px;
  border-color: var(--blue);
  color: var(--blue-deep);
  background: rgba(43, 127, 216, 0.07);
}

.button-copy-images:hover {
  color: var(--cream);
  background: var(--blue-deep);
  box-shadow: 3px 3px 0 var(--yellow);
}

.button-dark {
  padding: 0 20px;
  border-color: var(--ink);
  color: var(--cream);
  background: var(--ink);
}

.button-dark:hover {
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 4px 4px 0 rgba(43, 127, 216, 0.16);
}

.button-arrow {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.button-loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(254, 252, 246, 0.42);
  border-top-color: var(--yellow);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.is-loading .button-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.is-loading .button-arrow {
  display: none;
}

.is-loading .button-loader {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-note {
  position: relative;
  margin-top: 24px;
  padding: 17px 16px 13px;
  border: 1.5px dashed rgba(43, 127, 216, 0.34);
  border-radius: 9px;
  background: var(--cream);
}

.form-note-tag {
  position: absolute;
  top: -13px;
  left: 12px;
  padding: 0 8px;
  color: var(--blue-deep);
  background: var(--paper);
  font-family: var(--font-hand);
  font-size: 1rem;
  font-weight: 700;
}

.form-hint {
  color: var(--ink-light);
  font-size: 0.78rem;
  line-height: 1.7;
}

.empty-state {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.25fr);
  align-items: center;
  gap: clamp(34px, 6vw, 86px);
  margin-bottom: clamp(76px, 10vw, 120px);
  padding: clamp(36px, 5vw, 66px);
  border: 1.5px dashed rgba(43, 127, 216, 0.4);
  border-radius: 8px 18px 10px 15px;
  background: var(--cream-deep);
  overflow: visible;
}

.empty-state::before {
  content: "HOW IT WORKS";
  position: absolute;
  top: -20px;
  right: clamp(22px, 5vw, 60px);
  width: 160px;
  height: 40px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  transform: rotate(-1deg);
}

.empty-state-copy h2 {
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: clamp(1.65rem, 3vw, 2.45rem);
  font-weight: 900;
  line-height: 1.35;
}

.empty-state-copy p {
  max-width: 420px;
  margin-top: 12px;
  color: var(--ink-light);
  font-size: 0.86rem;
  line-height: 1.85;
}

.system-flow {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
}

.flow-step {
  min-width: 112px;
  flex: 1 1 0;
  padding: 20px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 3px 3px 0 rgba(43, 127, 216, 0.08);
}

.flow-step > span {
  color: var(--red-deep);
  font-family: var(--font-hand);
  font-size: 1.05rem;
  font-weight: 700;
}

.flow-step strong,
.flow-step small {
  display: block;
}

.flow-step strong {
  margin-top: 10px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 900;
}

.flow-step small {
  margin-top: 3px;
  color: var(--ink-faint);
  font-size: 0.66rem;
}

.flow-arrow {
  align-self: center;
  flex: 0 0 auto;
  color: var(--blue);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}

.result-section {
  scroll-margin-top: 84px;
  padding: clamp(64px, 9vw, 108px) 0 clamp(76px, 10vw, 126px);
  border-top: 2px solid var(--ink);
}

.result-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(26px, 4vw, 60px);
  margin-bottom: 34px;
}

.result-title-block {
  min-width: 0;
}

.result-heading h2 {
  max-width: 720px;
  margin-top: 8px;
  overflow-wrap: anywhere;
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4.2vw, 3.6rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.2;
}

.result-heading p {
  margin-top: 12px;
  color: var(--ink-light);
  font-size: 0.8rem;
}

.result-actions {
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.result-actions .button {
  min-height: 44px;
  font-size: 0.76rem;
}

.clipboard-fallback {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px 22px;
  margin: -8px 0 32px;
  padding: 18px 20px;
  border: 1.5px dashed rgba(43, 127, 216, 0.54);
  border-radius: 12px 15px 13px 10px;
  background: var(--cream-deep);
  box-shadow: 5px 5px 0 rgba(244, 215, 88, 0.34);
}

.clipboard-fallback-label {
  color: var(--red-deep);
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.clipboard-fallback strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 0.96rem;
}

.clipboard-fallback p {
  margin-top: 3px;
  color: var(--ink-light);
  font-size: 0.76rem;
  line-height: 1.65;
}

.clipboard-fallback .button {
  min-height: 44px;
  white-space: nowrap;
}

.caption-panel {
  margin-bottom: 32px;
  padding: clamp(22px, 3vw, 32px) clamp(18px, 3.5vw, 38px);
  border-top: 1.5px solid var(--ink);
  border-bottom: 1px dashed var(--line-strong);
  background: var(--cream-deep);
}

.caption-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.caption-panel-heading h3 {
  margin-top: 6px;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
  font-weight: 900;
}

.caption-copy-hint {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 0.72rem;
}

.caption-panel-heading .button {
  min-height: 44px;
  flex: 0 0 auto;
  font-size: 0.76rem;
}

.caption-text {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--ink-light);
  font-size: 0.95rem;
  line-height: 1.85;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.progress-panel {
  margin-bottom: 32px;
  padding: 19px 20px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  color: var(--cream);
  background: var(--blue-deep);
  box-shadow: 5px 5px 0 var(--yellow);
}

.progress-copy {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
  font-size: 0.76rem;
}

.progress-copy strong {
  font-family: var(--font-serif);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(254, 252, 246, 0.2);
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--yellow);
  transition: width 180ms ease;
}

.video-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.42fr) minmax(0, 1fr);
  margin-top: 34px;
  margin-bottom: clamp(58px, 8vw, 92px);
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 18px 24px 20px 16px;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--shadow-blue);
}

.video-intro {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(26px, 3.5vw, 44px);
  background: var(--cream-deep);
}

.media-section-heading h3 {
  margin-top: 7px;
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 2.6vw, 2.2rem);
  font-weight: 900;
  line-height: 1.35;
}

.video-actions {
  align-items: stretch;
  flex-direction: column;
  margin-top: clamp(34px, 5vw, 70px);
}

.quality-picker {
  display: grid;
  gap: 7px;
}

.quality-picker > span {
  color: var(--ink-light);
  font-size: 0.78rem;
  font-weight: 700;
}

.quality-picker select {
  width: 100%;
  min-height: 48px;
  padding: 0 38px 0 13px;
  border: 1.5px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  color: var(--ink);
  background: var(--paper);
  font-size: 0.75rem;
  font-weight: 600;
}

.quality-picker select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(43, 127, 216, 0.1);
}

.video-actions .button {
  width: 100%;
  font-size: 0.78rem;
}

.video-hint {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-faint);
  font-size: 0.78rem;
  line-height: 1.75;
}

.video-card {
  display: flex;
  min-width: 0;
  overflow: hidden;
  flex-direction: column;
  border-left: 1.5px solid var(--ink);
  background: #151821;
}

.video-card video {
  display: block;
  width: 100%;
  height: auto;
  min-height: 430px;
  max-height: min(72vh, 780px);
  flex: 1 1 auto;
  object-fit: contain;
  background: #151821;
}

.video-card p {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 16px;
  color: rgba(254, 252, 246, 0.74);
  background: #1d202b;
  font-size: 0.7rem;
}

.image-section {
  margin-top: 34px;
}

.image-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-strong);
}

.section-aside {
  color: var(--ink-faint);
  font-family: var(--font-hand);
  font-size: 1rem;
  line-height: 1.35;
  text-align: right;
}

.section-aside small {
  font-family: var(--font-sans);
  font-size: 0.72rem;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: clamp(20px, 2.5vw, 32px);
}

.image-card {
  position: relative;
  overflow: visible;
  border: 1.5px solid var(--ink);
  border-radius: 14px 18px 16px 12px;
  background: var(--paper);
  box-shadow: 6px 6px 0 rgba(43, 127, 216, 0.1);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.image-card:nth-child(3n + 2) {
  border-radius: 18px 12px 15px 17px;
  box-shadow: 6px 6px 0 rgba(244, 215, 88, 0.34);
}

.image-card:nth-child(3n) {
  border-radius: 12px 17px 13px 18px;
  box-shadow: 6px 6px 0 rgba(232, 74, 95, 0.1);
}

.image-card:hover {
  transform: translateY(-3px) rotate(-0.2deg);
  box-shadow: 9px 9px 0 rgba(43, 127, 216, 0.13);
}

.image-frame {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px 16px 0 0;
  background: var(--cream-deep);
}

.image-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.image-card:hover .image-frame img {
  transform: scale(1.025);
}

.live-photo-badge {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  color: var(--cream);
  background: var(--red-deep);
  box-shadow: 3px 3px 0 var(--yellow);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.live-photo-badge > span {
  color: var(--yellow);
  font-size: 0.58rem;
}

.live-photo-badge.is-unavailable {
  color: var(--ink);
  background: var(--cream-deep);
  box-shadow: 3px 3px 0 rgba(26, 26, 46, 0.14);
}

.live-photo-badge.is-unavailable > span {
  color: var(--red-deep);
}

.image-number {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  min-width: 42px;
  height: 42px;
  padding: 0 8px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 900;
  transform: rotate(3deg);
}

.select-control {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  cursor: pointer;
}

.select-control input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.select-control span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1.5px solid var(--ink);
  border-radius: 9px;
  background: var(--paper);
  box-shadow: 3px 3px 0 rgba(26, 26, 46, 0.16);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.select-control:hover span {
  transform: translateY(-1px);
}

.select-control input:checked + span {
  color: var(--cream);
  background: var(--blue);
  box-shadow: 3px 3px 0 var(--yellow);
}

.select-control input:checked + span::after {
  content: "✓";
  font-weight: 900;
}

.image-card-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}

.image-card.is-live-photo .image-card-actions {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.image-card.is-live-photo .image-card-actions > * {
  grid-column: span 2;
}

.image-card.is-live-photo .image-card-actions > .card-button-live,
.image-card.is-live-photo .image-card-actions > .card-button-live-video {
  grid-column: span 3;
}

.card-button {
  min-height: 44px;
  min-width: 0;
  padding: 0 6px;
  border-color: var(--blue);
  color: var(--cream);
  background: var(--blue-deep);
  font-size: 0.74rem;
  white-space: nowrap;
}

.card-button:hover {
  color: var(--ink);
  background: var(--yellow);
}

.card-button-muted {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--cream-deep);
}

.card-button-muted:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--paper);
}

.card-button-copy {
  border-color: var(--blue);
  color: var(--blue-deep);
  background: rgba(43, 127, 216, 0.07);
}

.card-button-copy:hover {
  color: var(--cream);
  background: var(--blue-deep);
}

.card-button-live {
  border-color: var(--red-deep);
  color: var(--cream);
  background: var(--red-deep);
}

.card-button-live:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--yellow);
}

.card-button-live-video {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--yellow);
}

.card-button-live-video:hover {
  color: var(--cream);
  background: var(--blue-deep);
}

footer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 12px 32px;
  padding: clamp(34px, 5vw, 54px) 0;
  border-top: 1.5px solid var(--ink);
  color: var(--ink-light);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1rem;
}

.footer-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  box-shadow: 3px 3px 0 var(--yellow);
  font-size: 16px;
}

footer > p {
  grid-column: 1;
  font-size: 0.74rem;
}

.footer-credits {
  display: grid;
  justify-items: end;
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: end;
  gap: 2px;
}

.design-credit,
.design-license-credit {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  color: var(--ink-faint);
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-decoration: none;
}

.design-credit {
  font-size: 0.75rem;
}

.design-license-credit {
  min-height: 24px;
  font-family: var(--font-sans);
  font-size: 0.62rem;
  letter-spacing: 0.01em;
}

.design-license-credit:hover {
  background: linear-gradient(transparent 60%, var(--yellow) 60%);
}

.toast {
  position: fixed;
  z-index: 110;
  right: 24px;
  bottom: 24px;
  max-width: min(420px, calc(100vw - 48px));
  padding: 15px 18px;
  border: 1.5px solid var(--ink);
  border-radius: 10px;
  color: var(--cream);
  background: var(--ink);
  box-shadow: 5px 5px 0 var(--yellow);
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast[data-type="success"] {
  background: #2d6a4f;
}

.toast[data-type="error"] {
  background: var(--red-deep);
}

[hidden] {
  display: none !important;
}

.design-system-signature {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding: clamp(50px, 7vw, 68px) 0 72px;
  }

  .hero-copy {
    grid-column: 1;
    grid-row: auto;
    order: 1;
  }

  .hero-index {
    grid-column: 1;
    grid-row: auto;
    order: 3;
    width: 100%;
    max-width: 760px;
    margin-top: 0;
  }

  .parse-card {
    grid-column: 1;
    grid-row: auto;
    order: 2;
    width: 100%;
    max-width: 760px;
  }

  .empty-state {
    grid-template-columns: 1fr;
  }

  .system-flow {
    justify-content: flex-start;
  }

  .result-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .clipboard-fallback {
    grid-template-columns: 1fr auto;
  }

  .clipboard-fallback-label {
    grid-column: 1 / -1;
  }

  .video-section {
    grid-template-columns: 1fr;
  }

  .video-intro {
    display: grid;
    grid-template-columns: minmax(190px, 0.55fr) minmax(0, 1fr);
    gap: 22px 34px;
  }

  .video-actions {
    margin-top: 0;
  }

  .video-hint {
    grid-column: 1 / -1;
    margin-top: 0;
  }

  .video-card {
    border-top: 1.5px solid var(--ink);
    border-left: 0;
  }

  .video-card video {
    min-height: 0;
  }
}

@media (max-width: 620px) {
  .app-header {
    height: 58px;
  }

  .app-header-inner,
  .page-shell {
    width: min(100% - 24px, 1200px);
  }

  .brand-logo {
    width: 34px;
    height: 34px;
  }

  .brand-copy small {
    display: none;
  }

  .app-header-inner {
    gap: 12px;
  }

  .app-header-actions {
    gap: 0;
  }

  .header-status {
    display: none;
  }

  .hero {
    gap: 38px;
    padding: 56px 0 68px;
  }

  .hero-copy {
    display: block;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 10.8vw, 3.2rem);
  }

  .hero-index {
    margin-top: 0;
  }

  .parse-card {
    padding: 26px 18px 22px;
    border-radius: 18px;
    box-shadow: 6px 6px 0 var(--shadow-blue);
  }

  .parse-card::before {
    right: 18px;
  }

  .engine-options {
    grid-template-columns: 1fr;
  }

  .form-actions {
    flex-wrap: nowrap;
  }

  .form-actions .button-primary {
    flex: 1 1 auto;
    flex-basis: auto;
    order: 0;
  }

  .form-actions .button-secondary {
    width: auto;
    flex: 0 0 96px;
    padding-right: 10px;
    padding-left: 10px;
    white-space: nowrap;
  }

  .empty-state {
    padding: 44px 22px 28px;
  }

  .empty-state::before {
    right: 18px;
    width: 146px;
  }

  .system-flow {
    align-items: stretch;
    flex-direction: column;
  }

  .flow-step {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    min-width: 0;
    padding: 15px 16px;
  }

  .flow-step > span {
    grid-row: 1 / span 2;
  }

  .flow-step strong {
    margin-top: 0;
  }

  .flow-arrow {
    align-self: flex-start;
    margin-left: 18px;
    transform: rotate(90deg);
  }

  .result-heading h2 {
    font-size: clamp(1.85rem, 9vw, 2.7rem);
  }

  .result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-actions .button {
    width: 100%;
    padding: 0 10px;
  }

  .result-actions .button-dark {
    grid-column: auto;
  }

  .video-section {
    border-radius: 14px;
    box-shadow: 5px 5px 0 var(--shadow-blue);
  }

  .video-intro {
    display: block;
    padding: 24px 18px;
  }

  .video-actions {
    margin-top: 28px;
  }

  .video-hint {
    margin-top: 20px;
  }

  .image-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-aside {
    text-align: left;
  }

  footer {
    grid-template-columns: 1fr;
  }

  footer > p,
  .footer-credits {
    grid-column: 1;
    grid-row: auto;
  }

  .footer-credits {
    justify-items: start;
    margin-top: 8px;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    max-width: calc(100vw - 24px);
  }
}

@media (max-width: 480px) {
  .app-header-inner,
  .brand {
    gap: 8px;
  }

  .brand-copy strong span {
    display: block;
    white-space: nowrap;
  }

  .clipboard-fallback {
    grid-template-columns: 1fr;
    padding: 17px 16px;
  }

  .clipboard-fallback-label {
    grid-column: auto;
  }

  .clipboard-fallback .button {
    width: 100%;
  }

  .caption-panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .caption-panel-heading .button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .nav-link {
    min-height: 44px;
    padding-right: 7px;
    padding-left: 7px;
    font-size: 0.69rem;
  }

  .nav-link::after {
    right: 7px;
    left: 7px;
  }

  .hero-copy h1 {
    font-size: 2.2rem;
  }

  .parse-card::before {
    max-width: 150px;
    font-size: 0.9rem;
  }

  .result-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .result-actions .button {
    padding-right: 6px;
    padding-left: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
