:root {
  --safe-top: 0px; --safe-right: 0px; --safe-bottom: 0px; --safe-left: 0px;
  --app-height: 100dvh; --bg: #050505; --panel: #111113; --line: #3b3b40;
  --muted: #a7a7ad; --text: #f7f7f8; --red: #ff4148;
  color-scheme: dark; font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none; background: var(--bg); color: var(--text);
}
* { box-sizing: border-box; }
html { min-width: 300px; min-height: 100%; background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 300px; min-height: 100vh; min-height: var(--app-height); overflow-x: hidden; background: var(--bg); color: var(--text); }
button, input, textarea { font: inherit; color: inherit; }
button { min-width: 44px; min-height: 44px; cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #ff777c; outline-offset: 3px; }
h1, h2, p, dd { overflow-wrap: anywhere; }
h1 { margin: 0; font-size: clamp(2rem, 8vw, 3.35rem); line-height: 1; letter-spacing: -.052em; }
h2 { margin: 0; font-size: 1.15rem; letter-spacing: -.025em; }
.sr-only { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.ambient { position: fixed; z-index: 0; inset: 0; overflow: hidden; pointer-events: none; background-image: linear-gradient(rgba(255,255,255,.018) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.018) 1px,transparent 1px); background-size: 68px 68px; mask-image: linear-gradient(#000 0 75%,transparent); }
.ambient span { position: absolute; width: 24rem; aspect-ratio: 1; border-radius: 50%; background: #ee1e27; filter: blur(110px); opacity: .075; }
.ambient span:first-child { top: -14rem; right: -12rem; } .ambient span:last-child { bottom: 8rem; left: -17rem; }
#app { position: relative; z-index: 1; min-height: var(--app-height); }
.offline { position: fixed; z-index: 40; top: var(--safe-top); left: 50%; width: min(100%,720px); transform: translateX(-50%); padding: .6rem 1rem; color: #fff; background: #9e1118; text-align: center; font-size: .8rem; font-weight: 800; }
.splash, .fatal { min-height: var(--app-height); display: grid; place-content: center; justify-items: center; gap: .8rem; padding: 2rem; text-align: center; }
.splash img { width: min(68vw,310px); max-height: 52vh; object-fit: contain; } .splash p { margin: 0; font-size: 1.25rem; font-weight: 850; }
.fatal p { max-width: 30rem; color: var(--muted); line-height: 1.55; }
.app-shell { min-height: var(--app-height); }
.topbar { position: sticky; z-index: 10; top: 0; width: min(100%,760px); margin: auto; padding: calc(.55rem + var(--safe-top)) calc(1rem + var(--safe-right)) .55rem calc(1rem + var(--safe-left)); display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: linear-gradient(#050505 78%,transparent); }
.brand { padding: 0; display: flex; align-items: center; gap: .65rem; border: 0; background: transparent; font-size: 1.12rem; font-weight: 850; }
.brand img { width: 42px; height: 42px; object-fit: contain; }
.balance-pill { padding: .48rem .68rem; display: grid; justify-items: end; border: 1px solid #46464b; border-radius: .9rem; background: rgba(20,20,22,.9); box-shadow: inset 0 1px rgba(255,255,255,.08); }
.balance-pill span { color: var(--muted); font-size: .58rem; letter-spacing: .09em; text-transform: uppercase; } .balance-pill strong { color: #ff6c72; font-size: .88rem; }
.screen { width: min(100%,760px); margin: 0 auto; padding: 1rem calc(1rem + var(--safe-right)) calc(7.4rem + var(--safe-bottom)) calc(1rem + var(--safe-left)); }
.eyebrow { margin: 0 0 .65rem; color: #ff6268; font-size: .69rem; font-weight: 850; letter-spacing: .15em; text-transform: uppercase; }
.lead, .muted, .compact-head > p:last-child { color: var(--muted); line-height: 1.55; }
.compact-head { margin-bottom: 1.1rem; } .compact-head > p:last-child { max-width: 38rem; margin-bottom: 0; }
.text-back { min-height: 44px; margin: -.4rem 0 .5rem; padding: 0; border: 0; color: #ff6e74; background: transparent; font-weight: 750; }
.studio-head { position: relative; min-height: 14rem; padding: 1.35rem; display: grid; grid-template-columns: 1fr minmax(7rem,33%); align-items: center; overflow: hidden; border: 1px solid #44444a; border-radius: 1.6rem; background: radial-gradient(circle at 84% 20%,rgba(255,42,51,.17),transparent 45%),linear-gradient(145deg,#1c1c1f,#080809); box-shadow: inset 0 1px rgba(255,255,255,.09),0 1.4rem 4rem rgba(0,0,0,.36); }
.studio-head img { grid-column: 2; grid-row: 1; width: min(150%,300px); max-width: none; height: 100%; min-height: 12rem; justify-self: end; object-fit: cover; object-position: 49% 52%; filter: saturate(.92) contrast(1.03); mask-image: linear-gradient(90deg,transparent 0,#000 22%); }
.studio-head > div { grid-column: 1; grid-row: 1; position: relative; z-index: 2; }
.studio-head p { max-width: 25rem; margin-bottom: 0; color: var(--muted); line-height: 1.5; }
.intake-list { margin-top: .85rem; display: grid; gap: .65rem; }
.intake { min-height: 76px; padding: .8rem; display: grid; grid-template-columns: 2.75rem 1fr auto; grid-template-rows: auto auto; column-gap: .8rem; align-items: center; text-align: left; border: 1px solid var(--line); border-radius: 1.05rem; background: linear-gradient(145deg,#1b1b1e,#0a0a0b); box-shadow: inset 0 1px rgba(255,255,255,.065); }
.intake > span { grid-row: 1/3; width: 2.65rem; aspect-ratio: 1; display: grid; place-items: center; color: var(--red); border: 1px solid rgba(255,65,72,.52); border-radius: 50%; background: rgba(255,45,52,.08); font-size: 1.3rem; }
.intake strong { align-self: end; } .intake small { align-self: start; color: var(--muted); } .intake b { grid-column: 3; grid-row: 1/3; color: #d0d0d4; font-size: 1.55rem; font-weight: 400; }
.intake.primary { border-color: rgba(255,65,72,.8); background: linear-gradient(135deg,#67090e,#1b0608 76%); }
.button { width: 100%; min-height: 52px; padding: .72rem .9rem; border: 1px solid var(--line); border-radius: .9rem; background: #131315; font-weight: 760; }
.button.primary { border-color: #ff555c; background: linear-gradient(135deg,#8a0c13,#3b070a); box-shadow: inset 0 1px rgba(255,255,255,.15),0 .7rem 2rem rgba(255,24,34,.13); }
.button.danger, .danger { border-color: #ff555c; color: #fff; background: #8c0c13; } .danger-outline { color: #ff747a; border-color: rgba(255,74,81,.52); background: rgba(91,7,12,.22); }
.button-row, .detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; } .active-share { border-color: #ff555c; color: #ff777c; }
.task-screen { min-height: calc(var(--app-height) - 6rem); display: grid; align-content: center; justify-items: center; text-align: center; }
.task-screen h1 { max-width: 38rem; } .task-screen .button { max-width: 30rem; margin-top: 1rem; }
.progress-card { width: min(100%,34rem); margin: 2rem auto 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1.1rem; background: var(--panel); }
.progress-track { height: .7rem; overflow: hidden; border-radius: 999px; background: #303034; } .progress-track span { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg,#aa0d15,#ff5960); transition: width .18s linear; }
.progress-track[data-indeterminate] span { width: 38%; animation: indeterminate 1.2s ease-in-out infinite; } .progress-card p { margin-bottom: 0; color: var(--muted); }
.record-orb { width: 10rem; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid rgba(255,65,72,.55); border-radius: 50%; background: radial-gradient(circle,rgba(255,45,53,.2),transparent 68%); }
.record-orb span { width: 3.4rem; aspect-ratio: 1; border-radius: 50%; background: var(--red); box-shadow: 0 0 2.2rem rgba(255,37,46,.45); animation: pulse 1.4s ease-in-out infinite; }
.record-time { margin: 1.2rem 0; font: 750 2rem/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.processing-mark { width: min(72vw,17rem); height: 10rem; display: grid; place-items: center; overflow: hidden; } .processing-mark img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 48%; filter: saturate(.9); mask-image: radial-gradient(ellipse,#000 38%,transparent 74%); animation: breathe 2s ease-in-out infinite; }
.status { color: #ff767b; } .status.ready { color: #73d99a; } .status.failed, .status.cancelled { color: #ff777c; }
.metadata, .detail-meta { margin: 1rem 0; display: grid; border: 1px solid var(--line); border-radius: 1.05rem; background: linear-gradient(145deg,#18181b,#0a0a0b); }
.metadata > div, .detail-meta > div { min-height: 55px; padding: .7rem .9rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #303034; }
.metadata > div:last-child, .detail-meta > div:last-child { border: 0; } .metadata dt, .detail-meta dt { color: var(--muted); font-size: .75rem; }
.metadata dd, .detail-meta dd { margin: 0; text-align: right; font-weight: 720; } .preview-screen > .button.primary { margin: .6rem 0; }
.search { min-height: 52px; padding: 0 .85rem; display: flex; align-items: center; gap: .6rem; border: 1px solid var(--line); border-radius: .95rem; background: #101012; }
.search span { color: var(--muted); font-size: 1.2rem; } .search input { width: 100%; height: 50px; border: 0; outline: 0; background: transparent; }
.records { margin-top: .8rem; display: grid; gap: .68rem; }
.record-card { width: 100%; min-height: 118px; padding: .85rem; display: grid; grid-template-columns: 2.8rem minmax(0,1fr) auto; gap: .75rem; align-items: start; text-align: left; border: 1px solid var(--line); border-radius: 1.05rem; background: linear-gradient(145deg,#19191c,#09090a); box-shadow: inset 0 1px rgba(255,255,255,.055); }
.record-sequence { width: 2.7rem; aspect-ratio: 1; display: grid; place-items: center; color: #ff686e; border: 1px solid rgba(255,65,72,.48); border-radius: 50%; background: rgba(255,45,53,.08); font-weight: 850; }
.record-copy { min-width: 0; display: grid; gap: .24rem; } .record-copy strong, .record-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.record-copy small { color: var(--muted); font-size: .73rem; } .record-copy em { display: -webkit-box; overflow: hidden; color: #d4d4d7; font-size: .8rem; font-style: normal; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.record-copy i { justify-self: start; font-size: .68rem; font-style: normal; font-weight: 800; } .chevron { align-self: center; color: #ff676d; font-size: 1.6rem; } .load-more { margin-top: .8rem; }
.empty-state { min-height: 52vh; display: grid; place-content: center; justify-items: center; text-align: center; }
.library-wave { width: 8.5rem; height: 5.5rem; margin-bottom: .7rem; display: flex; align-items: center; justify-content: center; gap: .32rem; border: 1px solid rgba(255,65,72,.34); border-radius: 999px; background: radial-gradient(circle,rgba(255,45,53,.16),rgba(255,45,53,.025) 62%,transparent 70%); box-shadow: inset 0 1px rgba(255,255,255,.07),0 0 2.6rem rgba(255,30,40,.08); }
.library-wave i { width: .3rem; border-radius: 999px; background: linear-gradient(#ff777c,#d51620); box-shadow: 0 0 .75rem rgba(255,48,57,.24); }
.library-wave i:nth-child(1),.library-wave i:nth-child(9) { height: .55rem; }.library-wave i:nth-child(2),.library-wave i:nth-child(8) { height: 1.15rem; }.library-wave i:nth-child(3),.library-wave i:nth-child(7) { height: 2rem; }.library-wave i:nth-child(4),.library-wave i:nth-child(6) { height: 2.85rem; }.library-wave i:nth-child(5) { height: 3.65rem; }
.empty-state p { max-width: 25rem; color: var(--muted); line-height: 1.5; } .empty-state .button { max-width: 24rem; }
.detail-head { position: relative; min-height: 8.25rem; margin-bottom: .8rem; padding-right: 6.4rem; } .detail-head > p:last-child { color: var(--muted); }
.detail-product-art { position: absolute; top: .2rem; right: -.35rem; width: 6.4rem; height: 7.3rem; object-fit: cover; object-position: 50% 48%; filter: saturate(.86); mask-image: radial-gradient(ellipse,#000 34%,transparent 75%); pointer-events: none; }
.detail-meta { grid-template-columns: repeat(3,1fr); } .detail-meta > div { min-width: 0; display: grid; justify-content: start; border-right: 1px solid #303034; border-bottom: 0; }
.detail-meta > div:last-child { border-right: 0; } .detail-meta dd { max-width: 100%; overflow: hidden; text-align: left; text-overflow: ellipsis; white-space: nowrap; }
.summary-card { margin: .8rem 0; padding: 1rem; border: 1px solid rgba(255,65,72,.3); border-radius: 1.05rem; background: rgba(255,45,53,.055); }
.summary-card p { margin-bottom: 0; color: #dedee1; line-height: 1.6; }
.segmented { margin: .8rem 0; padding: 3px; display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: .9rem; background: #0b0b0d; }
.segmented button { border: 0; border-radius: .68rem; color: var(--muted); background: transparent; font-size: .8rem; font-weight: 750; } .segmented button[aria-pressed="true"] { color: #fff; background: #7c0b11; box-shadow: inset 0 1px rgba(255,255,255,.12); }
.copy-button { margin-bottom: .85rem; } .reader { padding: .2rem 0; }
.reader-paragraph { margin: 0; padding: 1rem 0; display: grid; grid-template-columns: 1fr; gap: .5rem; border-bottom: 1px solid #27272a; color: #dedee1; font-size: 1.02rem; line-height: 1.72; }
.reader-paragraph time { width: max-content; padding: .3rem .55rem; border: 1px solid rgba(255,65,72,.42); border-radius: 999px; color: #ff777d; background: rgba(255,45,53,.07); font: 750 .72rem/1 ui-monospace,SFMono-Regular,Menlo,monospace; }
.detail-actions { margin-top: .9rem; } .danger-zone { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid #2b2b2e; }
.profile-balance { width: 100%; min-height: 112px; padding: 1rem; display: grid; grid-template-columns: 1fr auto; align-items: center; text-align: left; border: 1px solid rgba(255,65,72,.55); border-radius: 1.2rem; background: radial-gradient(circle at 90% 0,rgba(255,53,61,.18),transparent 50%),linear-gradient(145deg,#1b1b1e,#09090a); }
.profile-balance > span { grid-column: 1/-1; color: var(--muted); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; } .profile-balance strong { color: #ff686e; font-size: 2.5rem; } .profile-balance small { font-size: .9rem; } .profile-balance b { font-size: 1.6rem; }
.profile-section { margin-top: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1.05rem; background: linear-gradient(145deg,#17171a,#0a0a0b); }
.profile-section h2 { margin-bottom: .8rem; } details.profile-section summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 750; } details.profile-section p { color: var(--muted); line-height: 1.55; }
.provenance > div, .payment-row { min-height: 52px; padding: .6rem 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; border-bottom: 1px solid #2e2e32; }
.provenance > div:last-child, .payment-row:last-child { border: 0; } .provenance span, .payment-row small { display: block; color: var(--muted); font-size: .75rem; }
.payment-row button { border: 1px solid var(--line); border-radius: 50%; color: #ff7379; background: #101012; font-size: 1.2rem; }
.locale-row { display: grid; grid-template-columns: repeat(3,1fr); gap: .45rem; } .locale-row button { border: 1px solid var(--line); border-radius: .8rem; background: #101012; font-size: .75rem; }
.locale-row button[aria-pressed="true"] { border-color: #ff555c; color: #fff; background: #690a0f; }
.setting-row { width: 100%; min-height: 58px; padding: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; text-align: left; border: 0; background: transparent; }
.setting-row span { display: grid; gap: .2rem; } .setting-row small { color: var(--muted); }
.setting-row i { width: 48px; height: 28px; padding: 3px; flex: 0 0 auto; border: 1px solid #55555b; border-radius: 999px; background: #242428; }
.setting-row i::before { content: ""; display: block; width: 20px; aspect-ratio: 1; border-radius: 50%; background: #bcbcc1; transition: transform .16s ease; }
.setting-row[aria-checked="true"] i { border-color: #ff555c; background: #730a10; } .setting-row[aria-checked="true"] i::before { background: #fff; transform: translateX(18px); }
.profile-links { padding-top: .25rem; padding-bottom: .25rem; } .profile-links .setting-row + .setting-row { border-top: 1px solid #2e2e32; } .profile-links .setting-row b { color: #ff7379; font-size: 1.35rem; }
.packages { margin-top: 1rem; display: grid; gap: .7rem; }
.package { min-height: 78px; padding: .85rem; display: flex; align-items: center; justify-content: space-between; gap: .7rem; text-align: left; border: 1px solid var(--line); border-radius: 1rem; background: linear-gradient(145deg,#19191c,#09090a); }
.package span { display: grid; gap: .2rem; } .package small { color: var(--muted); } .package b { padding: .48rem .62rem; border: 1px solid #a71119; border-radius: .68rem; background: #52090d; white-space: nowrap; }
.package.recommended { border-color: #ff555c; box-shadow: inset 0 0 0 1px rgba(255,85,92,.13); } .terms-note { color: var(--muted); font-size: .78rem; line-height: 1.5; }
.dock { position: fixed; z-index: 12; left: 50%; bottom: calc(.6rem + var(--safe-bottom)); width: min(calc(100% - 1.4rem),430px); padding: .38rem; display: grid; grid-template-columns: repeat(3,1fr); gap: .25rem; transform: translateX(-50%); border: 1px solid #46464b; border-radius: 1.18rem; background: rgba(11,11,13,.9); backdrop-filter: blur(22px) saturate(1.2); box-shadow: inset 0 1px rgba(255,255,255,.08),0 1rem 3rem rgba(0,0,0,.5); }
.dock button { min-height: 52px; display: grid; place-content: center; gap: .08rem; border: 0; border-radius: .8rem; color: #9b9ba1; background: transparent; font-size: .64rem; font-weight: 760; } .dock button span { font-size: 1.15rem; }
.dock button.active { color: #ff747a; background: linear-gradient(145deg,rgba(255,45,53,.16),rgba(255,45,53,.035)); }
.modal-backdrop { position: fixed; z-index: 30; inset: 0; padding: 1rem; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,.76); }
.modal { width: min(100%,540px); max-height: min(86vh,720px); overflow-y: auto; padding: 1rem; border: 1px solid #4b4b50; border-radius: 1.25rem; background: linear-gradient(145deg,#1b1b1e,#09090a); box-shadow: 0 1.8rem 5rem #000; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; } .modal-head button { border: 1px solid var(--line); border-radius: 50%; background: #101012; font-size: 1.35rem; }
.modal-label, .modal > p { color: var(--muted); line-height: 1.5; }
.field { margin: .8rem 0; display: grid; gap: .4rem; color: var(--muted); font-size: .75rem; }
.field input, .field textarea { width: 100%; min-height: 52px; padding: .75rem; resize: vertical; border: 1px solid var(--line); border-radius: .85rem; background: #0c0c0e; font-size: 1rem; }
.check { min-height: 56px; margin: .5rem 0 1rem; display: flex; align-items: center; gap: .7rem; } .check input { width: 24px; height: 24px; accent-color: var(--red); }
.check span { display: grid; gap: .2rem; } .check small { color: var(--muted); }
.format-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .55rem; }
.format-grid button { min-height: 70px; display: grid; place-content: center; gap: .16rem; border: 1px solid var(--line); border-radius: .85rem; background: #101012; } .format-grid small { color: var(--muted); font-size: .7rem; }
.modal > .button + .button { margin-top: .55rem; }
@media (min-width: 680px) {
  .screen { padding-right: calc(1.4rem + var(--safe-right)); padding-left: calc(1.4rem + var(--safe-left)); }
  .intake-list { grid-template-columns: repeat(3,1fr); }
  .intake { min-height: 148px; grid-template-columns: 1fr auto; grid-template-rows: 3.1rem auto auto; }
  .intake > span { grid-column: 1; grid-row: 1; } .intake strong, .intake small { grid-column: 1/-1; } .intake b { grid-column: 2; grid-row: 1; }
  .records { grid-template-columns: 1fr 1fr; } .detail-meta { max-width: 38rem; }
  .reader-paragraph.with-time { grid-template-columns: 5rem 1fr; gap: 1rem; } .reader-paragraph time { justify-self: start; margin-top: .2rem; }
  .packages { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 360px) {
  .screen, .topbar { padding-right: calc(.72rem + var(--safe-right)); padding-left: calc(.72rem + var(--safe-left)); }
  .brand span { display: none; } .studio-head { min-height: 13rem; padding: 1rem; grid-template-columns: 1fr 6rem; } .studio-head img { width: 11rem; transform: translateX(1.2rem); } .studio-head h1 { font-size: 1.85rem; } .studio-head p { font-size: .83rem; }
  .intake { column-gap: .58rem; } .detail-meta { grid-template-columns: 1fr; }
  .detail-head { padding-right: 4.8rem; }.detail-product-art { width: 5.2rem; height: 6.3rem; }
  .detail-meta > div { grid-template-columns: 1fr auto; border-right: 0; border-bottom: 1px solid #303034; }
  .locale-row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto!important; animation-duration: .001ms!important; animation-iteration-count: 1!important; transition-duration: .001ms!important; } }
@keyframes indeterminate { 0% { transform: translateX(-115%); } 100% { transform: translateX(290%); } }
@keyframes pulse { 50% { transform: scale(.88); opacity: .72; } } @keyframes breathe { 50% { transform: scale(.94); opacity: .78; } }

.studio-head.generated-card {
  display: block; min-height: 0; padding: 0; border: 0; background: none; box-shadow: none;
}
.studio-head.generated-card img {
  display: block; width: 100%; height: auto; min-height: 0; max-width: none;
  object-fit: contain; object-position: center; mask-image: none; filter: none; transform: none;
}
