@font-face { font-family: "Inter Tight"; src: url("/fonts/inter-tight/InterTight-Variable.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }
:root {
  color-scheme: light;
  --paper: #fbfaf8;
  --card: #ffffff;
  --ink: #191a17;
  --muted: #67675f;
  --maroon: #8b1538;
  --accent: #b72d54;
  --peach: #ff7873;
  --peach-soft: #ffead5;
  --line: rgba(103, 103, 95, 0.12);
  --motion: cubic-bezier(0.165, 0.84, 0.44, 1);
  font: 16px/1.5 "Inter Tight", Inter, system-ui, sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #050505;
  --card: #0b0b0b;
  --ink: #f4f1ec;
  --muted: rgba(244, 241, 236, 0.64);
  --line: rgba(255, 255, 255, 0.1);
  --accent: #a62049;
  --maroon: #ff827b;
  --peach-soft: rgba(255, 255, 255, 0.08);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; transition: background 0.35s ease, color 0.35s ease; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.workspace { display: grid; min-height: 100svh; place-items: center; padding: 24px; }
.theme-toggle { position: fixed; z-index: 5; top: 20px; right: 20px; min-height: 36px; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--card); font-size: 12px; font-weight: 500; }
.theme-toggle:hover { color: #fff; background: var(--accent); border-color: var(--accent); }
.screen { display: grid; width: 100%; place-items: center; }
.bento-card { width: min(100%, 560px); padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--card); box-shadow: 0 12px 36px rgba(0, 0, 0, 0.18); }
.media-layout { display: grid; grid-template-columns: minmax(0, 560px); gap: 18px; align-items: start; width: min(100%, 560px); }
.card-kicker { margin-bottom: 20px; color: var(--ink); font-size: 17px; font-weight: 500; letter-spacing: -0.02em; }
.field-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13px; font-weight: 500; }
.entry-field { display: grid; grid-template-columns: minmax(0, 1fr) 48px; gap: 8px; }
.entry-field input, .entry-field button { height: 50px; border-radius: 10px; }
.entry-field input { width: 100%; padding: 0 14px; border: 1px solid var(--line); color: var(--ink); background: #fff; outline: none; transition: border-color 0.25s ease, box-shadow 0.25s ease; }
:root[data-theme="dark"] .entry-field input, :root[data-theme="dark"] .media-link-form__control input { background: #050505; }
.entry-field input::placeholder, .media-link-form__control input::placeholder { color: #8b8b84; }
.entry-field input:focus { border-color: var(--maroon); box-shadow: 0 0 0 3px rgba(183, 45, 84, 0.1); }
.entry-field button { border: 1px solid var(--accent); border-radius: 10px; color: #fff; background: var(--accent); font-size: 20px; transition: background 0.25s ease; }
.entry-field button:hover { background: var(--maroon); }
.greeting { display: grid; min-height: 50px; align-items: center; }
.greeting p { margin: 0; font-size: 24px; font-weight: 500; letter-spacing: -0.03em; animation: greeting-in 0.5s var(--motion) both; }
.media-card > .card-kicker { margin-bottom: 20px; }
.media-link-form { animation: reveal 0.45s var(--motion) both; }
.media-link-form__control { position: relative; isolation: isolate; padding: 2px; border-radius: 12px; background: conic-gradient(from var(--entry-angle, 0deg), #e7bdaf, #f6e5dc, #c98779, #fff0e7, #e7bdaf); animation: entry-orbit 10s linear infinite; }
:root[data-theme="dark"] .media-link-form__control { background: conic-gradient(from var(--entry-angle, 0deg), #7f122f, #ff7873, #3d0717, #ffcaaf, #7f122f); }
:root[data-theme="dark"] .media-link-form__control { background: conic-gradient(from var(--entry-angle, 0deg), #5f0c27, #a62049, #1a1a1a, #d36f69, #5f0c27); }
@property --entry-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.media-link-form__control input { display: block; width: 100%; height: 54px; padding: 0 16px 0 48px; border: 0; border-radius: 10px; color: var(--ink); background: #fff; outline: none; font-size: 16px; }
.media-link-form__control input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.media-link-form__icon { position: absolute; top: 17px; left: 15px; width: 22px; height: 22px; color: var(--maroon); pointer-events: none; }
.status { min-height: 24px; margin: 12px 2px 0; color: var(--muted); font-size: 14px; }
.status[data-error] { color: var(--maroon); font-weight: 600; }
.media-loading { display: flex; align-items: center; gap: 12px; margin-top: 20px; color: var(--muted); font-size: 14px; }
.media-loading__rings { position: relative; width: 30px; height: 30px; flex: none; }
.media-loading__rings span { position: absolute; inset: 0; border: 2px solid rgba(183, 45, 84, 0.16); border-radius: 50%; animation: loading-ring 1.7s ease-in-out infinite; }
.media-loading__rings span:nth-child(2) { inset: 5px; border-color: rgba(255, 120, 115, 0.34); animation-delay: 0.16s; }
.media-loading__rings span:nth-child(3) { inset: 10px; border-color: var(--maroon); animation-delay: 0.32s; }
.media-loading__label { animation: loading-label 1.7s ease-in-out infinite; }
.result-card { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); animation: reveal 0.45s var(--motion) both; }
.preview-frame { display: grid; min-height: 220px; place-items: center; overflow: hidden; padding: 14px; border: 1px solid rgba(255, 228, 214, 0.7); border-radius: 12px; background: linear-gradient(180deg, #fff8f5, #fdede4); }
:root[data-theme="dark"] .preview-frame { border-color: rgba(255, 255, 255, 0.1); background: #050505; }
.preview-frame img, .preview-frame video { display: block; max-width: 100%; max-height: 52svh; object-fit: contain; border-radius: 8px; }
.preview-frame video { background: #191a17; }
.download-button { display: flex; align-items: center; gap: 9px; width: 100%; min-height: 48px; margin-top: 14px; padding: 5px 6px 5px 15px; border: 1px solid var(--accent); border-radius: 12px; color: #fff; background: var(--accent); font-size: 14px; font-weight: 500; text-decoration: none; transition: background 0.25s ease; }
.download-button svg { width: 21px; height: 21px; }
.download-button__arrow { display: grid; width: 34px; height: 34px; margin-left: auto; place-items: center; border-radius: 8px; color: var(--accent); background: #fffdf9; transition: transform 0.25s var(--motion); }
:root[data-theme="dark"] .download-button__arrow { color: var(--maroon); background: #0b0b0b; }
.download-button:hover { background: var(--maroon); }
.download-button:hover .download-button__arrow { transform: translate(2px, -2px); }
.story-empty-hero { position: relative; display: flex; min-height: 260px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 24px; border: 1px solid rgba(255, 202, 175, 0.45); border-radius: 16px; color: #fffdf9; background: linear-gradient(145deg, #8b1538 0%, #b72d54 48%, #ff7873 100%); box-shadow: 0 16px 34px rgba(139, 21, 56, 0.18); }
.story-empty-hero__eyebrow, .story-empty-hero__code { position: relative; z-index: 1; font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; }
.story-empty-hero h2 { position: relative; z-index: 1; margin: auto 0 12px; font-size: 32px; line-height: 1.02; letter-spacing: -0.05em; font-weight: 500; }
.story-empty-hero h2 em { color: #ffead5; font-style: normal; }
.story-empty-hero p { position: relative; z-index: 1; max-width: 240px; margin: 0 0 28px; color: rgba(255, 253, 249, 0.78); font-size: 14px; line-height: 1.4; }
.story-empty-hero__orb { position: absolute; top: 20%; right: -35px; width: 190px; height: 190px; border-radius: 50%; background: rgba(255, 234, 213, 0.18); filter: blur(2px); }
.story-empty-hero__orb::before, .story-empty-hero__orb::after, .story-empty-hero__orb span { position: absolute; inset: 18px; content: ''; border: 1px solid rgba(255, 234, 213, 0.34); border-radius: 50%; }
.story-empty-hero__orb::after { inset: 42px; border-color: rgba(255, 234, 213, 0.48); }
.story-empty-hero__orb span { inset: 68px; background: #ffcaaf; border: 0; box-shadow: 0 0 34px rgba(255, 202, 175, 0.85); }
.has-story-error .media-card { min-width: 0; }
.preview-placeholder { display: grid; width: 100%; min-height: 240px; place-items: center; align-content: center; gap: 8px; border-radius: 8px; color: var(--maroon); background: linear-gradient(180deg, #fff8f5, #fdede4); }
.preview-placeholder span { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; }
.preview-placeholder strong { font-size: 34px; font-weight: 500; letter-spacing: -0.04em; }
@keyframes entry-orbit { to { --entry-angle: 360deg; } }
@keyframes greeting-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes loading-ring { 0%, 100% { transform: scale(0.72); opacity: 0.45; } 50% { transform: scale(1); opacity: 1; } }
@keyframes loading-label { 50% { opacity: 0.55; } }
@media (max-width: 560px) { .story-empty-hero { min-height: 240px; } }
@media (max-width: 560px) { .workspace { padding: 64px 14px 14px; } .bento-card { padding: 16px; } .theme-toggle { top: 14px; right: 14px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; } }
