:root {
  color-scheme: dark;
  font-family: "Avenir Next", Inter, system-ui, sans-serif;
  color: #fff3f1;
  background: #16090e;
  --muted: #efcfcc;
  --line: #784450;
  --accent: #edc1b8;
  --surface: #391823;
  --burgundy: #82283f;
  --burgundy-hover: #96334a;
  --page: #16090e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; min-height: 100vh; background: radial-gradient(ellipse at 78% 23%, #491c2e 0%, transparent 49%), var(--page); }
button, select, input { font: inherit; }
button, select, summary { cursor: pointer; }
button, a, select, summary, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
main h1[tabindex="-1"]:focus { outline: none; -webkit-tap-highlight-color: transparent; }

.launch-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 44%, #391620, var(--page) 72%);
  animation: launch-splash-out 1340ms ease both;
}
.launch-lockup {
  position: relative;
  width: min(84vw, 47vh, 360px);
  animation: launch-appear 460ms cubic-bezier(.2,.62,.3,1) both;
}
.launch-art {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%);
}
.launch-glint {
  position: absolute;
  inset: 0;
  animation: launch-orbit 940ms linear 125ms both;
}
.launch-glint::before {
  content: "";
  position: absolute;
  inset: -6% auto auto -6%;
  width: 12%;
  aspect-ratio: 1;
  background: radial-gradient(circle, #fff1e6ed 4%, #ffb4aade 12%, #ef6a7466 33%, transparent 69%);
}
@keyframes launch-appear {
  from { opacity: 0; transform: scale(.95); }
  to { opacity: 1; transform: none; }
}
@keyframes launch-orbit {
  0% { transform: translate(25%, 46%); opacity: 0; }
  14% { transform: translate(18.5%, 55%); opacity: .85; }
  25% { transform: translate(22%, 60.5%); opacity: 1; }
  39% { transform: translate(38%, 63.2%); }
  54% { transform: translate(57%, 57%); }
  67% { transform: translate(74%, 48%); }
  77% { transform: translate(83.5%, 39%); }
  85% { transform: translate(85%, 33%); }
  93% { transform: translate(79%, 27%); opacity: .8; }
  100% { transform: translate(69%, 25%); opacity: 0; }
}
@keyframes launch-splash-out {
  0%, 77% { opacity: 1; visibility: visible; }
  99% { visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .launch-splash { display: none; }
}
.frame { width: min(1060px, calc(100% - 56px)); margin-inline: auto; }
.top { border-bottom: 1px solid #713848; background: #2c1120; }
.is-scrolling .top { border-color: #a9657b; background: #361628; }
.bar { min-height: 72px; display: flex; align-items: center; gap: 20px; }
.logo { font-size: 25px; font-weight: 950; letter-spacing: -.07em; text-decoration: none; white-space: nowrap; }
.logo span { color: #eab7ab; }
.tabs { display: flex; gap: 4px; margin-inline: auto; }
.tabs a { color: var(--muted); text-decoration: none; padding: 9px 14px; font-size: .875rem; border-radius: 9px; font-weight: 690; display: flex; align-items: center; gap: 8px; }
.tabs a:hover, .tabs a[aria-current] { color: #fff3f1; background: #592033; }
.nav-icon { width: 19px; height: 19px; display: inline-block; position: relative; flex: 0 0 19px; }
.nav-trends::before { content: ''; position: absolute; top: 3px; left: 3px; width: 4px; height: 4px; border: 1px solid; border-radius: 1px; box-shadow: 7px 0, 0 7px, 7px 7px; }
.nav-create::before, .nav-history::before { content: ''; position: absolute; inset: 2px; border: 1.5px solid; border-radius: 50%; }
.nav-create::after { content: ''; position: absolute; inset: 5px; background: linear-gradient(currentColor,currentColor) center/1px 100% no-repeat, linear-gradient(currentColor,currentColor) center/100% 1px no-repeat; }
.nav-history::after { content: ''; position: absolute; inset: 5px 5px 9px 9px; border-inline-start: 1px solid currentColor; border-block-end: 1px solid currentColor; }
.demo { display: inline-flex; align-items: center; gap: 7px; color: #f0c4c7; font-size: .875rem; font-weight: 620; white-space: nowrap; }
.demo i { width: 6px; height: 6px; background: #ec9aab; border-radius: 50%; }
select { appearance: none; color: #f3d9dc; border: 1px solid #6f414e; border-radius: 9px; padding: 8px 24px 8px 10px; background: linear-gradient(45deg,transparent 50%,#d7a1aa 50%) right 13px center/4px 4px no-repeat, linear-gradient(135deg,#d7a1aa 50%,transparent 50%) right 9px center/4px 4px no-repeat, #321823; font-size: .875rem; }
main { padding-bottom: 64px; }
.intro { margin: 38px 0 25px; }
h1 { margin: 0 0 5px; font-size: clamp(2.95rem, 7.3vw, 5.5rem); line-height: 1.04; letter-spacing: -.075em; font-weight: 900; width: fit-content; }
h1 span { color: var(--burgundy); }
p { color: var(--muted); margin: 8px 0; line-height: 1.5; }
.back { color: var(--accent); display: inline-block; margin-bottom: 10px; font-size: .9375rem; text-underline-offset: 4px; }
.studio-intro #studio-name { color: inherit; }
.studio-intro h1 { font-size: clamp(2.45rem, 6.2vw, 4.5rem); }
.feature, .trend { position: relative; isolation: isolate; overflow: hidden; border: 1px solid #794459; border-radius: 22px; background: #2d111f; }
.catalog { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.feature { min-height: 410px; display: flex; align-items: end; }
.trend-art { position: absolute; z-index: -2; inset: 0; height: 100%; width: 100%; object-fit: cover; object-position: center 46%; filter: hue-rotate(58deg) saturate(.90); }
.feature .trend-art { left: 25%; width: 75%; object-position: 56% 47%; }
.feature::after, .trend::after { content: ''; position: absolute; z-index: -1; inset: 0; }
.feature::after { background: linear-gradient(90deg, #2d111f 13%, #2d111fe6 34%, #2d111f12 75%), linear-gradient(0deg, #200d19ad, transparent 42%); }
.feature-content { padding: clamp(23px, 5.2vw, 56px); }
.feature h2 { margin: 13px 0 8px; font-size: clamp(2.4rem, 6.1vw, 4.4rem); max-width: 11ch; line-height: .94; letter-spacing: -.065em; font-weight: 820; }
.feature p { color: #f2d9dd; }
.film { display: inline-flex; font-size: .875rem; color: #ffeaeb; border: 1px solid #e7a3b266; padding: 5px 10px; border-radius: 50px; background: #3f192ab8; }
.feature-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.feature-actions .primary { width: auto; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 18px; }
.trend[hidden] + .panel { grid-column: 1 / -1; }
.trend { min-height: 406px; }
.trend::after { background: linear-gradient(0deg, #1f0b16af, transparent 38%); }
.trend-copy { position: absolute; left: 21px; bottom: 21px; }
.play { position: absolute; z-index: 1; right: 20px; top: 20px; border: 1px solid #f7c6ccaf; background: #3b1729df; color: #fff6f4; border-radius: 99px; width: 48px; height: 48px; font-size: .875rem; }
.play:hover { background: #6d2e46; }
.panel { min-width: 0; padding: 25px; border: 1px solid var(--line); border-radius: 21px; background: linear-gradient(145deg, #361a28, #26121c 78%); }
.panel h2, dialog h2 { margin: 0 0 19px; font-size: 1.65rem; letter-spacing: -.035em; }
.upload { display: flex; align-items: center; min-height: 93px; padding: 13px; gap: 13px; border: 1px dashed #b27686; background: #482537; border-radius: 12px; cursor: pointer; position: relative; }
.upload:hover { border-color: var(--accent); }
.upload:focus-within { outline: 2px solid var(--accent); outline-offset: 4px; }
.upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.upload-icon, .upload img { flex: 0 0 48px; height: 48px; width: 48px; border-radius: 10px; background: #6b364c; color: #ffd4d6; display: grid; place-items: center; font-size: 1.7rem; object-fit: cover; }
.upload span { min-width: 0; }
.upload strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload small { display: block; margin-top: 5px; color: var(--muted); font-size: .875rem; }
.text-button { color: var(--accent); padding: 10px 0; border: 0; background: none; font-size: .875rem; text-decoration: underline; text-underline-offset: 3px; }
.consent { display: flex; align-items: flex-start; gap: 8px; margin: 8px 0 17px; font-size: .9375rem; line-height: 1.35; color: #f1d9dd; }
.consent input { flex: 0 0 17px; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #e9a0aa; }
.price { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line); padding: 14px 0; color: var(--muted); }
.price strong { color: #fff0f0; text-align: right; }
.primary, .quiet { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; border: 1px solid transparent; border-radius: 10px; text-decoration: none; font-weight: 750; padding: 10px 15px; text-align: center; }
.primary { width: 100%; background: var(--burgundy); color: #fff4f2; }
.primary:hover { background: var(--burgundy-hover); }
.primary:disabled { background: #492632; color: #d4b5b0; cursor: not-allowed; }
.quiet { border-color: #7c4859; background: #4a2536; color: #fff0f0; }
.quiet:hover { background: #603044; }
details { margin-top: 14px; color: var(--muted); font-size: .875rem; }
.scenario { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 9px; }
dialog { background: #321923; border: 1px solid #764858; color: inherit; border-radius: 17px; padding: 21px; width: min(420px, calc(100% - 32px)); }
dialog::backdrop { background: #140a12cc; }
dialog p { margin-bottom: 17px; }
dialog .quiet { margin-top: 8px; width: 100%; }
video { display: block; width: 100%; max-height: min(53vh, 460px); background: #170b15; border-radius: 10px; }
#preview-dialog form { margin-bottom: 10px; }
#notice { padding: 10px 14px; margin-top: 15px; border: 1px solid #956174; background: #482535; border-radius: 10px; color: #ffdae3; }
#result { scroll-margin-top: 1rem; }
#result p { margin-bottom: 15px; }
#result .quiet { margin-top: 9px; width: 100%; }
#result .primary { margin-top: 13px; }
#result[aria-busy="true"] h2::before { content: ''; display: inline-block; width: 14px; height: 14px; border: 2px solid #995f71; border-top-color: #ffcad2; border-radius: 50%; margin-right: 9px; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.orders { display: grid; gap: 10px; }
.order { display: flex; justify-content: space-between; text-align: left; gap: 12px; width: 100%; padding: 16px; align-items: center; background: var(--surface); color: #fff2ef; border: 1px solid var(--line); border-radius: 12px; }
.order small { display: block; color: var(--muted); margin-top: 5px; font-size: .875rem; }
.order .state { color: var(--accent); text-align: right; font-size: .875rem; }
@media (max-width: 670px) {
  .frame { width: calc(100% - 30px); }
  .bar { min-height: 60px; gap: 10px; }
  .logo { font-size: 22px; margin-right: auto; }
  .demo { font-size: .8125rem; gap: 5px; }
  .tabs { position: fixed; z-index: 5; bottom: 0; left: 0; right: 0; margin: 0; padding: 6px 13px calc(7px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; background: #211019; border-top: 1px solid var(--line); }
  .tabs a { flex-direction: column; gap: 1px; padding: 6px; font-size: .8125rem; justify-content: center; text-align: center; min-height: 47px; }
  main { padding-bottom: calc(91px + env(safe-area-inset-bottom)); }
  .intro { margin: 24px 0 17px; }
  .catalog { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.feature { min-height: 381px; }
  .feature .trend-art { left: 0; width: 100%; object-position: 59% 42%; }
  .feature::after { background: linear-gradient(0deg, #230e1b 9%, #291020cc 36%, #2910200d 82%); }
  .feature-content { width: 100%; padding: 20px; }
  .feature-actions { margin-top: 16px; gap: 8px; }
  .feature-actions > * { flex: 1 1 auto; padding-inline: 9px; }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .trend { min-height: 222px; }
  .trend .trend-art { object-position: 54% 41%; }
  .trend-copy { left: 15px; bottom: 15px; }
  .panel { padding: 17px; }
  .price { font-size: .9375rem; }
}
@media (prefers-reduced-motion: reduce) { #result h2::before { animation: none !important; } }

/* Brand and mobile library */
.logo { display: inline-flex; align-items: center; gap: 8px; letter-spacing: -.055em; }
.logo span:last-child { color: #fff3f1; }
.logo-mark { display: block; flex: 0 0 auto; width: 36px; height: 36px; object-fit: contain; }
.nav-mine::before { content: ''; position: absolute; top: 1px; left: 6px; width: 5px; height: 5px; border: 1px solid; border-radius: 99px; }
.nav-mine::after { content: ''; position: absolute; bottom: 3px; left: 3px; right: 3px; height: 5px; border: 1px solid; border-radius: 5px 5px 2px 2px; }
.filters, .subtabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; }
.filter, .subtabs a {
  min-height: 42px;
  padding: 7px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #2e1722;
  color: #ead0d7;
  border: 1px solid #64394a;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 680;
}
.filter:hover, .filter[aria-pressed="true"], .subtabs a[aria-current] { background: #6d263c; color: #fff4f3; border-color: #a75e72; }
.catalog { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.feature { min-height: 440px; }
.feature:only-child { grid-column: 1 / -1; }
.feature .trend-art { width: 100%; left: 0; object-position: 64% 43%; }
.trend-art { filter: none; }
[data-trend="neon-portal"] .trend-art { filter: hue-rotate(54deg) saturate(.86); }
.feature::after { background: linear-gradient(0deg, #220d1bf7 5%, #2a1221dc 23%, #2a122163 53%, transparent 82%), linear-gradient(90deg, #1e10183d, transparent 68%); }
.feature-content { width: 100%; padding: clamp(21px, 4.1vw, 36px); }
.feature h2 { font-size: clamp(2.35rem, 5vw, 4.2rem); max-width: 13ch; }
.feature p { max-width: 34ch; }
.card-price { margin-top: 13px; color: #f9dfe2; font-weight: 740; font-size: .875rem; }
.save-trend {
  position: absolute; z-index: 1; right: 18px; top: 18px;
  display: grid; place-items: center; height: 43px; width: 43px;
  border: 1px solid #bd7d8d; border-radius: 11px;
  background: #371a29e8; color: #ffe4e6;
}
.save-trend:hover, .save-trend[aria-pressed="true"] { background: #edc1b8; color: #542036; border-color: #edc1b8; }
.bookmark { display: block; width: 13px; height: 17px; background: currentColor; position: relative; border-radius: 2px 2px 0 0; clip-path: polygon(0 0,100% 0,100% 100%,50% 75%,0 100%); }
.save-trend[aria-pressed="false"] .bookmark::after { content: ''; position: absolute; inset: 2px 2px 4px; background: #371a29; clip-path: polygon(0 0,100% 0,100% 100%,50% 76%,0 100%); }
.save-trend[aria-pressed="false"]:hover .bookmark::after { background: #edc1b8; }
.library-head { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 13px; }
.library-head h2 { margin: 0; font-size: 1.5rem; letter-spacing: -.03em; }
.library-head p { margin: 4px 0; }
.compact { width: auto; }
.characters { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,250px),1fr)); gap: 12px; }
.character-card { display: grid; grid-template-columns: 50px minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 9px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 13px; }
.character-card img, .picker-button img { width: 49px; height: 49px; border-radius: 9px; object-fit: cover; }
.character-card strong { min-width: 0; overflow-wrap: anywhere; }
.character-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; align-items: center; }
.character-actions .quiet { min-height: 39px; }
.saved-chooser { margin: 0 0 16px; }
.saved-chooser > span { display: block; margin-bottom: 8px; color: #f5d5dc; font-weight: 675; font-size: .9rem; }
.character-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.picker-button { display: flex; align-items: center; gap: 7px; padding: 4px 8px 4px 4px; min-height: 40px; border-radius: 8px; background: #3d2030; border: 1px solid #794759; color: #ffe7e8; font-size: .875rem; }
.picker-button img { width: 30px; height: 30px; border-radius: 5px; }
.picker-button[aria-pressed="true"] { background: #6b334b; border-color: #f1a5b7; }
.field { display: grid; gap: 6px; margin-bottom: 13px; }
.field input { min-height: 42px; padding: 9px 10px; border-radius: 9px; border: 1px solid #946073; color: inherit; background: #23121c; width: 100%; }
.inline-error { color: #ffd1dc; font-size: .9rem; }
.visually-hidden { clip-path: inset(50%); width: 1px; height: 1px; position: absolute; white-space: nowrap; overflow: hidden; }
@media (max-width: 670px) {
  .logo { gap: 6px; font-size: 21px; }
  .tabs { grid-template-columns: repeat(4, minmax(0, 1fr)); padding-inline: 7px; gap: 4px; }
  .tabs a { padding-inline: 3px; }
  .catalog { grid-template-columns: minmax(0, 1fr); gap: 13px; }
  .feature { min-height: 375px; }
  .feature h2 { font-size: clamp(2.3rem, 10vw, 3.5rem); }
  .feature .trend-art { object-position: 59% 40%; }
  .feature-content { padding: 20px; }
  .filters, .subtabs { margin-bottom: 15px; }
  .library-head { align-items: stretch; flex-direction: column; gap: 9px; }
  .library-head .primary { align-self: start; }
}
@media (min-width: 671px) and (max-width: 790px) {
  .bar { gap: 12px; }
  .tabs a { padding-inline: 8px; }
  .tabs .nav-icon { display: none; }
}

.active-character {
  display: flex; gap: 10px; justify-content: space-between; align-items: center;
  color: #ffe1e6; background: #472334; border: 1px solid #774357;
  padding: 10px 13px; border-radius: 10px; margin-bottom: 13px;
  font-size: .9rem;
}
.active-character a { flex: 0 0 auto; color: var(--accent); text-underline-offset: 3px; }

/* Workbench, catalog and preview */
.nav-home::before, .nav-feed::before, .nav-tools::before, .nav-assistant::before {
  position: absolute; content: ''; border: 1.5px solid currentColor; border-radius: 4px;
}
.nav-home::before { width: 10px; height: 10px; inset: 3px auto auto 3px; transform: rotate(45deg); }
.nav-home::after { position: absolute; content: ''; border: 1px solid; border-top: 0; inset: 8px 5px 3px; background: #27151e; }
.nav-feed::before { inset: 2px; }
.nav-feed::after { position: absolute; content: ''; width: 6px; height: 8px; left: 7px; top: 5px; background: currentColor; clip-path: polygon(0 0,100% 50%,0 100%); }
.nav-tools::before { inset: 4px; transform: rotate(45deg); border-radius: 2px; }
.nav-assistant::before { inset: 2px 1px 4px; border-radius: 6px; }
.nav-assistant::after { position: absolute; content: ''; width: 4px; height: 4px; left: 4px; bottom: 2px; border-left: 1.5px solid; transform: skewY(-28deg); }
.welcome {
  margin-top: 30px; min-height: 318px; border: 1px solid #8d4a65; border-radius: 24px; overflow: hidden;
  display: flex; align-items: center; position: relative; isolation: isolate; background: #38141e;
}
.welcome::before {
  position: absolute; content: ''; z-index: -2; inset: 0 0 0 20%;
  background: url('/poster.jpg') 57% 45% / cover;
  filter: hue-rotate(54deg) saturate(.80);
}
.welcome::after {
  position: absolute; content: ''; z-index: -1; inset: 0;
  background: linear-gradient(92deg,#321118 10%,#421823f0 33%,#4216219c 52%,#36131c08 85%);
}
.welcome-content { padding: clamp(24px,5.3vw,58px); max-width: min(79%, 620px); }
.welcome-content h1 { font-size: clamp(3rem,7.8vw,6.2rem); letter-spacing: -.07em; }
.welcome-content p { color: #f5d6df; margin-bottom: 21px; }
.home-links, .start-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); }
.home-links { margin-block: 17px 25px; }
.entry, .start-card {
  display: flex; gap: 13px; align-items: center; color: #fff3f1; text-decoration: none;
  border: 1px solid #62313d; border-radius: 13px; background: #31171e; padding: 13px;
}
.entry:hover, .start-card:hover { background: #48212c; border-color: #a76378; }
.entry strong, .entry small, .start-card strong, .start-card small { display: block; }
.entry small, .start-card small { color: #e1bdc5; margin-top: 3px; font-size: .875rem; line-height: 1.4; }
.entry-mark {
  width: 41px; height: 41px; flex: 0 0 41px; position: relative;
  border-radius: 10px; background: #632c3b; color: #ffd6de; display: grid; place-items: center;
}
.entry-mark::before { inset: 11px !important; }
.entry-mark::after { inset: 16px !important; }
.entry-mark.nav-assistant::after { inset: auto auto 8px 14px !important; }
.entry-mark.nav-mine::before { inset: 9px auto auto 16px !important; width: 7px; height: 7px; }
.entry-mark.nav-mine::after { inset: auto 12px 10px !important; }
.entry-mark.nav-trends::before { left: 13px !important; top: 13px !important; }
.start-card { align-items: flex-start; flex-direction: column; min-height: 160px; padding: 20px; }
.start-template { background: linear-gradient(142deg,#5a2940,#2d1624 72%); border-color: #8c4f67; }
.start-card strong { font-size: 1.35rem; letter-spacing: -.03em; }
.start-card small { margin-top: -7px; max-width: 33ch; }
.tool-link { margin-top: 14px; width: min(100%,510px); }
.section-line { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 5px 12px; margin: 0 0 13px; }
.section-line h2 { font-size: 1.45rem; margin: 0; letter-spacing: -.035em; }
.section-line a { color: var(--accent); text-underline-offset: 4px; font-size: .875rem; }
.catalog-tools { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.search { position: relative; flex: 1; min-width: 0; max-width: 440px; }
.search input, .prompt-grid textarea {
  width: 100%; color: #fff3f1; background: #25141d; border: 1px solid #744759; border-radius: 11px; padding: 10px 12px;
}
.search input { min-height: 44px; padding-left: 38px; }
.search input::placeholder, .prompt-grid textarea::placeholder { color: #be9da8; }
.search-icon { position: absolute; width: 14px; height: 14px; border: 1.5px solid #edc5d0; border-radius: 50%; left: 14px; top: 13px; pointer-events: none; }
.search-icon::after { content: ''; position: absolute; width: 6px; height: 1.5px; background: #edc5d0; right: -5px; bottom: -2px; transform: rotate(45deg); }
.saved-filter { min-height: 44px; gap: 7px; white-space: nowrap; }
.saved-filter .bookmark { width: 10px; height: 13px; }
.filters { flex-wrap: nowrap; max-width: 100%; overflow-x: auto; scrollbar-width: thin; padding: 4px 4px 7px; margin-inline: -4px; }
.filters .filter { flex: 0 0 auto; }
.catalog { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 13px; }
.feature, .feature:only-child { grid-column: auto; display: block; min-height: 0; background: #311820; border-radius: 15px; }
.feature::after { display: none; }
.feature-media { position: relative; aspect-ratio: 16/10; isolation: isolate; background: #26141e; }
.preview-card {
  position: absolute; inset: 0; width: 100%; border: 0; padding: 0; background: transparent;
  color: #fff2f2; display: grid; place-items: center; overflow: hidden;
}
.feature .trend-art { z-index: 0; inset: 0; width: 100%; height: 100%; max-width: none; object-position: 61% 45%; }
.preview-card::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg,#1f0d1880,transparent 52%,#24111f58); }
.preview-card:focus-visible { outline-offset: -4px; }
.play-symbol {
  z-index: 1; position: relative; display: block; width: 46px; height: 46px;
  background: #2d1423b0; border: 1px solid #efb3c6a0; border-radius: 50%;
}
.play-symbol::before {
  content: ''; display: block; position: absolute; left: 17px; top: 13px;
  width: 13px; height: 18px; background: currentColor; clip-path: polygon(0 0,100% 50%,0 100%);
}
.preview-card:hover .play-symbol { background: #693149; }
.card-time { position: absolute; left: 10px; bottom: 10px; pointer-events: none; }
.feature-media .save-trend { top: 9px; right: 9px; width: 41px; height: 41px; }
.feature-content { padding: 13px 16px 15px; }
.card-category { color: #f3bdc9; font-size: .875rem; font-weight: 650; }
.feature h2 { font-size: clamp(1.2rem,2.4vw,1.7rem); max-width: none; margin: 5px 0 6px; line-height: 1.15; letter-spacing: -.04em; overflow-wrap: anywhere; }
.feature p { font-size: .9rem; margin: 0; max-width: none; }
.feature-actions { flex-wrap: wrap; align-items: center; justify-content: space-between; margin-top: 10px; }
.feature-actions .primary { min-height: 43px; font-size: .9rem; }
.card-price { margin: 0; white-space: nowrap; }
.photo-actions { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.photo-help, .test-options { margin-top: 4px; }
.photo-help p { font-size: .875rem; }
.checkout-bar { margin-top: 13px; padding-top: 2px; border-top: 1px solid var(--line); background: #32181f; }
.checkout-bar .price { padding-block: 10px; border-top: 0; }
.order { justify-content: flex-start; }
.order .state { margin-left: auto; }
.order-thumb { width: 47px; height: 47px; object-fit: cover; border-radius: 7px; }
.empty-state { padding: 0 4px; }
#preview-dialog { width: min(465px,calc(100% - 26px)); }
.sheet-header { display: flex; align-items: start; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.sheet-header h2 { line-height: 1.16; margin: 0 0 4px; }
.sheet-header span { color: #e7c3ca; font-size: .875rem; }
#preview-dialog form { margin: 0; }
.icon-close { width: 42px; height: 42px; padding: 0; border-radius: 11px; border: 1px solid #a16a7c; background: #4a283b; color: #fff0f3; font-size: 25px; }
.sheet-actions { display: flex; align-items: stretch; gap: 9px; margin-top: 10px; }
.sheet-actions .save-trend { position: static; flex: 0 0 45px; height: auto; }
#preview-dialog video { max-height: min(47dvh, 400px); }
.prompt-grid, .feed-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; align-items: start; }
.prompt-grid textarea { resize: vertical; line-height: 1.45; font: inherit; min-height: 86px; }
.prompt-options, .prompt-examples { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 14px; }
.prompt-options .field { flex: 1; min-width: 100px; margin: 0; }
.prompt-result .quiet { margin-top: 8px; }
.prompt-result p { font-size: .875rem; }
.feed-card { min-width: 0; overflow: hidden; border: 1px solid #734457; border-radius: 15px; background: #321820; }
.feed-card video { border-radius: 0; aspect-ratio: 9/12; object-fit: contain; }
.feed-card > div { padding: 14px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.feed-card h2 { font-size: 1.2rem; margin: 0; }
@media (min-width: 900px) {
  body { display: grid; grid-template-columns: 218px minmax(0,1fr); align-items: start; }
  .top { position: sticky; top: 0; min-height: 100vh; max-height: 100dvh; overflow-y: auto; border-bottom: 0; border-right: 1px solid #633348; }
  .top .bar { flex-direction: column; align-items: stretch; width: 100%; gap: 12px; padding: 26px 14px 17px; min-height: 100dvh; }
  .top .logo { align-self: flex-start; margin: 0 0 12px 6px; }
  .tabs { width: 100%; flex-direction: column; gap: 4px; margin: 0; }
  .tabs a { width: 100%; min-height: 45px; padding: 8px 11px; }
  .tabs .nav-main-action { background: #692c3c; border: 1px solid #87475f; color: #fff1f3; }
  .tabs .nav-main-action[aria-current] { background: #733143; }
  .tabs .desktop-only:first-of-type { margin-top: 8px; }
  .top .demo { margin-top: auto; padding: 12px 7px 1px; }


  main.frame { width: min(1110px, calc(100% - 60px)); }
}
@media (max-width: 899px) {
  .top .bar { min-height: 62px; }
  .logo { margin-right: auto; }
  .logo-mark { width: 33px; height: 33px; }
  .tabs {
    position: fixed; z-index: 10; left: 8px; right: 8px; bottom: max(7px,env(safe-area-inset-bottom)); margin: 0;
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)) minmax(0,1.45fr) minmax(0,1.22fr) repeat(2,minmax(0,1fr)); align-items: center; gap: 2px; padding: 4px;
    border: 1px solid #8e4c66; border-radius: 18px; background: #321423;
    box-shadow: 0 9px 30px #09050ab0; backdrop-filter: blur(12px);
  }
  .is-scrolling .tabs { background: #3d182c; border-color: #b46e8a; }
  .tabs a { min-height: 49px; justify-content: center; flex-direction: column; font-size: .75rem; gap: 2px; padding: 4px 2px; }
  .tabs [data-tab="assistant"] span:last-child { white-space: nowrap; }
  .tabs .desktop-only { display: none; }
  .tabs .nav-main-action { background: #70243c; color: #fff3f5; }
  main { padding-bottom: calc(94px + env(safe-area-inset-bottom)); }
  .welcome { margin-top: 14px; }
}
@media (max-width: 670px) {
  #tools-title { font-size: clamp(2.35rem, 10.6vw, 4.5rem); }
  .welcome { min-height: 242px; border-radius: 17px; }
  .welcome-content { padding: 19px; max-width: 84%; }
  .welcome-content h1 { font-size: clamp(2.45rem,10.3vw,4.5rem); }
  .welcome-content p { margin-bottom: 13px; }
  .home-links { gap: 8px; margin-top: 11px; margin-bottom: 19px; grid-template-columns: 1fr; }
  .entry { padding: 9px 12px; min-height: 57px; }
  .entry-mark { flex-basis: 38px; width: 38px; height: 38px; }
  .start-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .start-card { min-height: 150px; padding: 12px; gap: 9px; }
  .start-card strong { font-size: 1.125rem; }
  .start-card small { margin-top: 0; }
  .catalog { gap: 8px; }
  .feature { border-radius: 12px; }
  .feature-media { aspect-ratio: 4/4.1; }
  .feature-content { padding: 9px; }
  .feature h2 { margin: 4px 0 6px; }
  .feature p { display: none; }
  .card-category { font-size: .8125rem; }
  .feature-actions { gap: 7px; margin-top: 7px; }
  .feature-actions .primary { width: 100%; padding-inline: 4px; font-size: .875rem; }
  .saved-filter { padding-inline: 9px; font-size: .8125rem; }
  #preview-dialog {
    width: calc(100% - 12px); max-width: none; margin: auto auto max(5px,env(safe-area-inset-bottom));
    padding: 16px; border-radius: 18px; max-height: calc(100dvh - 24px);
  }
  .checkout-bar {
    position: sticky; z-index: 2; bottom: calc(71px + env(safe-area-inset-bottom));
    margin-inline: -10px; padding: 4px 10px 7px; border: 1px solid #774759; border-radius: 12px;
    box-shadow: 0 -4px 18px #170b1873;
  }
  .prompt-grid { grid-template-columns: 1fr; }
  .feed-grid { grid-template-columns: 1fr; }
}
@media (max-width: 350px) {
  .catalog { grid-template-columns: minmax(0,1fr); }
  .feature-media { aspect-ratio: 16/9; }
  .feature p { display: block; }
  .tabs a { font-size: .64rem; padding-inline: 1px; }
  .tabs [data-tab="tools"] { font-size: .60rem; letter-spacing: -.035em; padding-inline: 0; }
  .top .demo { font-size: .75rem; }
}

.feed-actions {
  width: 100%; display: flex; flex-wrap: wrap; gap: 7px; align-items: center;
}
.feed-actions .compact { margin-left: auto; }
.feed-actions .quiet { min-height: 43px; }
.feed-like { min-width: 58px; gap: 6px; }
.like-symbol { color: #bb8799; font-size: 1.2rem; line-height: 1; }
.feed-like[aria-pressed="true"] { border-color: #ed93ab; background: #653049; }
.feed-like[aria-pressed="true"] .like-symbol { color: #ff9fbd; }
.studio-share { position: absolute; right: 12px; bottom: 12px; min-height: 42px; font-size: .875rem; }
#share-dialog .sheet-header form { margin: 0; }
@media (max-width: 420px) {
  .feed-actions .compact { flex: 1 1 100%; }
  .studio-share { right: 9px; bottom: 9px; }
}

.nav-image::before, .nav-wave::before {
  position: absolute; content: ''; border: 1.5px solid currentColor; border-radius: 4px;
}
.entry-mark.nav-image::before { inset: 10px 9px !important; }
.nav-image::after { position: absolute; content: ''; inset: 18px 13px 13px !important; background: currentColor; clip-path: polygon(0 100%,35% 22%,53% 63%,72% 38%,100% 100%); }
.entry-mark.nav-wave::before { inset: 13px 12px !important; border-radius: 0; border-block: 0; }
.entry-mark.nav-wave::after { position: absolute; content: ''; inset: 10px 19px !important; background: currentColor; }
.tool-grid .panel { background: linear-gradient(149deg,#3b202f,#26141f 75%); }
.tool-options { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 2px; }
.tool-options .field { flex: 1 1 105px; min-width: 0; }
.tool-options .field select { width: 100%; min-height: 41px; }
.tool-options.padded { margin-top: 17px; }
.tool-set { margin: 16px 0 3px; border: 0; padding: 0; }
.tool-set legend { margin-bottom: 7px; padding: 0; }
.tool-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-instruction { margin: 9px 0 15px; }
.tool-instruction .field { margin: 9px 0; }
.tool-result video, .tool-result canvas { width: 100%; max-height: min(50dvh, 480px); object-fit: contain; background: #1c1018; border-radius: 10px; }
.tool-result audio { width: 100%; }
.tool-result .primary { margin-top: 10px; }
.clip-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.clip-list li { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid #62394d; border-radius: 10px; background: #2d1824; }
.clip-list strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .875rem; }
.clip-actions { display: flex; gap: 4px; }
.clip-control { min-width: 34px; min-height: 34px; padding: 4px 6px; font-size: .8125rem; }
.clip-control:disabled { opacity: .45; cursor: default; }
.clip-bounds { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.clip-field { font-size: .8125rem; color: var(--muted); flex: 1 1 115px; display: grid; gap: 3px; }
.clip-field input { min-height: 33px; padding: 4px 6px; font: inherit; width: 100%; border-radius: 6px; border: 1px solid #714959; background: #21121c; color: #fff3f1; }

.session-layout { display: grid; grid-template-columns: minmax(185px, .6fr) minmax(0, 1.6fr); align-items: start; gap: 15px; }
.sessions-list { display: grid; gap: 6px; margin-top: 15px; }
.session-list-button { text-align: left; padding: 9px 11px; min-height: 42px; background: #351c2a; color: #fff1f3; border: 1px solid #6f4355; border-radius: 8px; overflow-wrap: anywhere; }
.session-list-button[aria-current] { background: #683249; border-color: #bc7d91; }
.session-workspace { min-height: 335px; }
#session-note { min-height: 75px; width: 100%; resize: vertical; border: 1px solid #82566a; border-radius: 9px; padding: 8px 10px; background: #21111b; color: #fff3f1; font: inherit; }
.session-tools { display: flex; gap: 9px 16px; flex-wrap: wrap; margin: 14px 0; }
.session-tools a { color: var(--accent); text-underline-offset: 4px; }
.attach-session { position: relative; cursor: pointer; margin-left: 5px; }
.attach-session:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.attach-session input { cursor: pointer; opacity: 0; position: absolute; inset: 0; width: 100%; }
.session-items { display: grid; gap: 8px; }
.session-item { background: #23131d; border: 1px solid #673a4e; border-radius: 12px; padding: 12px; min-width: 0; }
.session-item h3 { font-size: 1rem; margin: 0 0 8px; overflow-wrap: anywhere; }
.session-item img, .session-item video { display: block; width: 100%; max-height: min(43dvh, 380px); object-fit: contain; border-radius: 8px; background: #1a0f16; }
.session-item audio { width: 100%; }
.session-item .quiet { margin-top: 8px; }
.session-item-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.session-save { margin-top: 8px; }
.session-toast { position: fixed; z-index: 20; right: max(16px,env(safe-area-inset-right)); top: 14px; max-width: min(410px,calc(100% - 32px)); border: 1px solid #a7697f; border-radius: 12px; padding: 10px 14px; background: #452234; color: #fff0f3; box-shadow: 0 8px 28px #180c12b0; overflow-wrap: anywhere; }
.session-toast a { color: var(--accent); white-space: nowrap; }
@media (max-width: 760px) {
  .session-layout { grid-template-columns: minmax(0,1fr); }
  .sessions-list { grid-template-columns: repeat(auto-fit,minmax(min(100%,115px),1fr)); }
  .session-workspace { min-height: 180px; }
}
.session-edit { margin-left: 6px; }

.desk-page { display: block; }
.desk-queue { margin-block: 22px; }
.desk-card { padding: 14px; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; }
.desk-card h3 { margin: 0; overflow-wrap: anywhere; }
.desk-card a, .desk-sources a { color: var(--accent); text-underline-offset: 4px; }
.desk-sources { padding-left: 20px; color: var(--muted); }
.desk-sources li { padding: 5px 0; }

[data-closed-beta] .profile,
[data-closed-beta] a[href="/trend-desk"],
[data-closed-beta] a[href="#voice"] { display: none; }

.account { max-width: 760px; }
.account-balance {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(16px, 5vw, 28px);
  border: 1px solid #74404c;
  border-radius: 18px;
  background: linear-gradient(130deg, #471729, var(--surface) 74%);
}
.account-balance h2 { margin: 0; font-size: 1.55rem; }
.account-balance p { margin: 4px 0 0; }
.account-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; margin-top: 14px; }
.account-test-profile { display: inline-block; margin-top: 14px; }
.account-topup h2 { margin-bottom: 8px; }
.account-topup .primary { margin-top: 10px; }
@media (max-width: 899px) {
  .top .bar { width: calc(100% - 24px); gap: 10px; }
}
@media (max-width: 360px) {
  .top .bar { gap: 7px; }
  .top .demo { font-size: .65rem; }
}

.welcome-dialog {
  position: fixed;
  width: min(390px, calc(100% - 30px));
  padding: 19px 23px 23px;
  text-align: center;
  background: radial-gradient(ellipse at 50% 0, #451626, #271018 74%);
}
.welcome-close { position: absolute; top: 10px; right: 10px; }
.welcome-close .icon-close { border-color: transparent; background: #2b101ab8; }
.welcome-art {
  display: block;
  width: 172px;
  height: 172px;
  margin: 0 auto 10px;
  mask-image: radial-gradient(circle closest-side, #000 90%, transparent 100%);
}
.welcome-dialog h2 { margin: 0; font-size: clamp(1.56rem, 7vw, 2.25rem); line-height: 1.08; }
.welcome-dialog p { margin: 10px 0 20px; }

.prompt-photos { margin-bottom: 15px; }
.prompt-photo-heading { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.prompt-photo-heading span { color: var(--muted); font-variant-numeric: tabular-nums; }
.prompt-photo-add { min-height: 38px; padding: 5px 12px; font-size: .85rem; }
.prompt-photo-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; margin-top: 8px; }
.prompt-photo-list:empty { display: none; }
.prompt-photo-list > div { position: relative; min-width: 0; }
.prompt-photo-list img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.prompt-photo-remove {
  position: absolute; top: 2px; right: 2px; width: 27px; height: 27px; border: 1px solid #876775;
  border-radius: 7px; color: #fff4f2; background: #230c17ed; font-size: 1.1rem;
}
#prompt-photo-note, #prompt-photo-status, #prompt-online-note, #prompt-balance { font-size: .82rem; margin-bottom: 0; }

/* Studio and coin wallet */
.top-coins { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 1px solid #875168; border-radius: 13px; padding: 9px 12px; background: #442032; color: #fff0f4; text-decoration: none; font-size: .84rem; white-space: nowrap; }
.top-coins strong { color: #f4ceda; }
.top-coins:hover { border-color: #f2a9bf; background: #542439; }
.coin-packs { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(145px,100%),1fr)); gap: 10px; margin: 18px 0; }
.coin-pack { display: grid; align-content: start; gap: 9px; min-width: 0; padding: 15px; border: 1px solid #815169; border-radius: 14px; background: #2c1321; }
.coin-pack strong { font-size: 1.16rem; }
.coin-pack span { color: #ffe1a8; }
.coin-pack small { color: #e5b9c8; }
.coin-pack .quiet { padding: 8px; min-width: 0; }
#session-layout { grid-template-columns: minmax(156px, .45fr) minmax(0, 2fr); }
#session-layout.solo { grid-template-columns: minmax(0, 1fr); }
#session-layout.solo .sessions-list-pane, #session-layout.solo #session-actions, #session-layout.solo #session-items { display: none; }
#session-layout .session-workspace { display: flex; flex-direction: column; min-height: max(500px,calc(100dvh - 180px)); overflow: hidden; }
.session-canvas { min-height: 235px; flex: 1; margin: 7px 0 14px; padding: clamp(10px,2vw,20px); border: 1px solid #64394f; border-radius: 18px; background: radial-gradient(ellipse at top right,#48223645,transparent 70%), #1b0d16; }
.studio-compose { padding-top: 13px; border-top: 1px solid #674056; }
.studio-settings, .studio-compose-footer { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
.studio-settings .field { min-width: 0; flex: 1; }
.studio-settings .field:first-child { flex: 2; min-width: min(177px,100%); }
.studio-settings select, .character-traits select { display: block; padding: 8px; border: 1px solid #81536c; border-radius: 8px; width: 100%; color: inherit; background: #25111d; }
.studio-compose-footer { justify-content: space-between; }
.studio-compose-footer .field { max-width: 100%; }
.studio-compose-footer input[type="file"], #character-ai-form input[type="file"] { width: 100%; }
.studio-compose p:empty, #topup-feedback:empty, #character-ai-status:empty { display: none; }
.studio-gallery { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(210px,100%),1fr)); gap: 14px; }
.studio-gallery:not(:empty) { margin-bottom: 14px; }
.studio-job { overflow: hidden; border: 1px solid #73445b; border-radius: 16px; background: #2b1421; }
.studio-job > img, .studio-job > video { display: block; width: 100%; height: 200px; object-fit: contain; background: #130b10; }
.studio-job-body { display: grid; gap: 8px; padding: 13px; }
.studio-job-body :is(small,p) { margin: 0; overflow-wrap: anywhere; }
.studio-job-body small { color: #e8a8c0; }
.yatam-processing { display: grid; position: relative; isolation: isolate; place-items: center; align-content: center; gap: 10px; overflow: hidden; height: 155px; background: radial-gradient(ellipse at center,#602641,#1a0a13 75%); color: #ffe5ee; font-size: .83rem; }
.yatam-processing::before { content: ""; position: absolute; z-index: -1; width: 105px; aspect-ratio: 1; border: 1px solid #d58ba8; border-radius: 50%; animation: yatam-orbit 2.6s ease-out infinite; }
.yatam-processing img { width: 48px; height: 48px; object-fit: contain; }
@keyframes yatam-orbit { from { transform: scale(.5); opacity: .9; } to { transform: scale(2.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .yatam-processing::before { animation: none; opacity: .35; } }
.order .yatam-processing { width: 67px; height: 48px; border-radius: 9px; }
.order .yatam-processing img { width: 28px; height: 28px; }
.order .yatam-processing span { display: none; }
.character-mode, .character-traits { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.character-mode { margin-bottom: 14px; }
.character-mode [aria-pressed="true"] { border-color: #eea9bf; background: #502439; }
#character-dialog { max-height: calc(100dvh - max(20px, var(--telegram-top, 0px)) - max(20px, var(--telegram-bottom, 0px))); }
.session-materials > summary, #character-ai-form summary { cursor: pointer; padding: 8px 0; color: #efc4d4; }
html[data-closed-beta] body { padding: var(--telegram-top,0px) var(--telegram-right,0px) 0 var(--telegram-left,0px); }
html[data-closed-beta] .top { top: var(--telegram-top,0px); }
@media (max-width: 720px) {
  .top-coins { margin-left: auto; padding: 6px 8px; flex-wrap: wrap; gap: 2px 6px; }
  #session-layout { grid-template-columns: minmax(0,1fr); }
  #session-layout .session-workspace { min-height: 580px; }
  .session-canvas { min-height: 200px; }
  html[data-closed-beta] .tabs { bottom: max(7px,var(--telegram-bottom,0px)); }
  html[data-closed-beta] main { padding-bottom: calc(94px + max(env(safe-area-inset-bottom),var(--telegram-bottom,0px))); }
}

@media (max-width: 560px) {
  .top .demo { display: none; }
  .top .logo { margin-right: 0; }
  .top-coins { flex: 0 1 auto; min-width: 0; }
}
@media (max-width: 375px) {
  .top-coins { font-size: .75rem; }
  .top .bar { gap: 6px; }
}

.character-entry-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fullscreen-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; }
.fullscreen-controls p { margin: 0; color: var(--muted); font-size: .85rem; }

/* Canvas studio */
.studio-active { --workspace-h: calc(100dvh - var(--telegram-top, 0px) - var(--telegram-bottom, 0px)); }
.studio-active main.frame { width: 100%; min-width: 0; padding-bottom: 0; }
#sessions { min-width: 0; }
#session-layout, #session-layout.solo { display: grid; height: var(--workspace-h); min-height: 0; gap: 0; align-items: stretch; }
#session-layout { grid-template-columns: clamp(180px,17vw,240px) minmax(0,1fr); }
#session-layout.solo { grid-template-columns: minmax(0,1fr); }
#session-layout .sessions-list-pane { padding: 24px 14px; background: #21101b; border-right: 1px solid #46263a; overflow: auto; }
.session-sidebar-head { padding-inline: 5px; }
.session-sidebar-head h1 { font-size: 1.5rem; margin: 15px 0 20px; }
#new-session-picker summary { list-style: none; cursor: pointer; padding: 12px; text-align: left; }
#new-session-picker summary::-webkit-details-marker { display: none; }
#new-session-form { margin: 10px 0 12px; }
.session-list-button { border-radius: 8px; background: none; border-color: transparent; box-shadow: none; }
.session-list-button:hover, .session-list-button[aria-current="true"] { background: #442437; border-color: #6b3d53; }
#session-layout .session-workspace { min-height: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto auto; border: 0; border-radius: 0; background: #160e16; }
.studio-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-width: 0; padding: 17px clamp(16px,3vw,38px); border-bottom: 1px solid #46263a; }
.studio-head p { margin: 0 0 2px; color: #e4a7bd; font-size: .75rem; letter-spacing: .06em; }
.studio-head h2 { margin: 0; font-size: clamp(1.35rem,2.2vw,2.1rem); font-weight: 820; overflow-wrap: anywhere; }
.studio-links { display: flex; gap: 7px; flex-wrap: wrap; justify-content: end; }
.studio-links a { padding: 7px 10px; text-decoration: none; }
.session-canvas { min-height: 0; min-width: 0; overflow: auto; margin: 0; border: none; border-radius: 0; padding: clamp(16px,3vw,38px); background: radial-gradient(ellipse at 70% 15%,#6b32434a,transparent 65%), #160e16; }
#studio-empty { display: grid; justify-items: center; align-content: center; min-height: 100%; text-align: center; padding: 14px 0; }
#studio-empty img { width: clamp(72px,8vw,118px); margin-bottom: 12px; filter: drop-shadow(0 12px 28px #d675945c); }
#studio-empty h3 { margin: 0; font-size: clamp(1.6rem,3vw,2.8rem); font-weight: 830; letter-spacing: -.035em; }
#studio-empty p { margin: 8px 0 15px; color: #d0adbf; }
.session-canvas:is(.has-results,.has-materials) #studio-empty { display: none; }
#studio-empty #studio-intro { max-width: 46ch; font-size: .875rem; line-height: 1.55; text-wrap: pretty; margin: 8px 0 0; }
#studio-gpt-shortcut { padding: 0; min-height: 0; font: inherit; font-weight: 700; color: #ffc6da; text-underline-offset: .18em; }
#session-generations, #session-items { display: grid; grid-template-columns: minmax(0,1fr); max-width: 1020px; gap: 14px; margin: 0 auto; }
#session-items:not(:empty) { margin: 0 auto 14px; }
#session-generations .studio-job, #session-items .session-item { background: #281924; border: 1px solid #553348; border-radius: 14px; }
#session-generations .studio-job > img, #session-generations .studio-job > video { height: min(46vh, 460px); }
.studio-job > audio { width: min(100%, 460px); display: block; padding: 9px 10px 0; }
.studio-answer { border-left: 2px solid #bc7799; padding-left: 11px; white-space: pre-wrap; }
#session-generations .studio-job-body .quiet { justify-self: start; }
#session-actions { padding-inline: clamp(13px,3vw,38px); background: #22141f; color: #edd4e0; min-width: 0; }
#session-actions summary { padding: 5px 0; font-size: .8rem; }
#studio-compose { padding: 10px clamp(13px,3vw,38px) calc(13px + var(--telegram-bottom,0px)); background: #22141f; min-width: 0; position: relative; z-index: 2; }
.studio-types { display: flex; gap: 7px; margin-bottom: 9px; flex-wrap: wrap; }
.studio-types button { border: 1px solid #664457; background: #2c1c28; border-radius: 7px; padding: 7px 14px; color: #f0d9e4; }
.studio-types button[aria-pressed="true"] { background: #edb5cb; color: #341021; border-color: #edb5cb; font-weight: 750; }
.studio-config { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; position: relative; }
#studio-model-picker > summary { list-style: none; cursor: pointer; display: flex; gap: 7px; align-items: baseline; white-space: nowrap; border: 1px solid #664457; background: #32202e; padding: 8px 10px; border-radius: 8px; font-size: .84rem; }
#studio-model-picker > summary::-webkit-details-marker { display: none; }
#studio-model-picker > summary::after { content: "⌄"; color: #edb5cb; }
#studio-model-picker > summary span { color: #d6a8be; }
.studio-model-cards { position: absolute; bottom: calc(100% + 6px); z-index: 4; left: 0; width: min(580px,100%); max-height: 40dvh; overflow: auto; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,145px),1fr)); padding: 9px; gap: 6px; background: #2e1c29; border: 1px solid #81506b; border-radius: 12px; box-shadow: 0 14px 28px #130a12af; }
.studio-model-card { display: grid; align-content: center; gap: 3px; min-height: 58px; border: 1px solid #674559; border-radius: 8px; padding: 8px; text-align: left; color: #fff0f6; background: #362533; }
.studio-model-card[aria-pressed="true"] { background: #64364d; border-color: #cc83a5; }
.studio-model-card small { color: #e3bacd; }
.studio-settings { gap: 7px; }
.studio-settings label.field { display: flex; align-items: center; gap: 5px; margin: 0; flex: none; }
.studio-settings label.field:first-child { flex: none; min-width: 0; }
.studio-settings select { min-width: 58px; width: auto; padding-block: 5px; padding-inline: 6px; }
.studio-settings .consent { margin: 0; }
.studio-upload { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 7px 0 2px; }
.studio-upload-button { position: relative; cursor: pointer; overflow: hidden; padding: 5px 9px; border-radius: 7px; border: 1px solid #664457; font-size: .8rem; }
.studio-upload-button:focus-within { outline: 2px solid #edb5cb; }
.studio-upload-button input { opacity: 0; position: absolute; inset: 0; width: 100%; cursor: pointer; }
#studio-files-note { overflow-wrap: anywhere; color: #e1b7cc; }
#studio-reference-consent { margin: 3px 0; font-size: .78rem; }
.studio-composer-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; align-items: stretch; margin-top: 7px; }
.studio-composer-row textarea { margin: 0; padding: 10px; min-width: 0; width: 100%; border-radius: 9px; }
.studio-composer-row .primary { padding: 8px 13px; white-space: nowrap; }
#studio-caption { margin: 5px 0 0; color: #e5b8ce; font-size: .8rem; }
#character-dialog:has(#character-ai-form:not([hidden])) { width: min(930px, calc(100% - 28px)); max-width: none; padding: clamp(13px,3vw,28px); }
.casting-head h2 { font-size: clamp(1.6rem, 4vw, 2.45rem); margin: 2px 0 6px; }
.casting-group { min-width: 0; border: 0; padding: 0; margin: 10px 0 17px; }
.casting-group legend { font-size: 1rem; font-weight: 760; padding: 0 0 7px; }
.casting-options { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 7px; }
.casting-option { display: grid; align-content: start; min-width: 0; gap: 5px; border: 1px solid #6d485e; border-radius: 9px; background: #312130; padding: 4px; color: #f6dde9; text-align: left; }
.casting-option[aria-pressed="true"] { background: #67374f; border-color: #fac7df; box-shadow: inset 0 0 0 1px #fac7df; }
.casting-option span:last-child { padding: 1px 4px 4px; white-space: normal; overflow-wrap: anywhere; font-size: clamp(.68rem,1.35vw,.9rem); }
.casting-portrait { background: url('/casting.webp') no-repeat; background-size: 400% 400%; aspect-ratio: 1; border-radius: 5px; }
@media(max-width:899px) {
  #session-layout, #session-layout.solo { height: calc(var(--workspace-h) - 128px - env(safe-area-inset-bottom)); min-height: 430px; }
  #session-layout:not(.solo) { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(0,1fr); position: relative; }
  #session-layout .sessions-list-pane { border: 0; border-bottom: 1px solid #563245; }
  .session-sidebar-head { display: none; }
  #new-session-picker summary { padding: 6px; }
  #sessions-list { margin: 2px 0; }
  .session-list-button { min-height: 34px; padding: 4px 7px; }
  .studio-head { padding-block: 7px; }
  .studio-links { gap: 3px; }
  .studio-links a { font-size: .72rem; padding: 4px 6px; }
  .studio-types button { padding: 4px 8px; font-size: .78rem; }
  .studio-composer-row .primary { font-size: .75rem; }
  .studio-settings label.field, #studio-model-picker > summary { font-size: .75rem; }
  #studio-compose { padding-bottom: 7px; }
  .session-canvas { padding: 11px; }
  #studio-empty img { width: 57px; margin-bottom: 4px; }
  #studio-empty h3 { font-size: 1.25rem; }
  #studio-empty p { font-size: .78rem; margin: 4px 0; }
}
@media(max-width:430px) {
  .casting-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

.web-login { max-width: min(480px,calc(100vw - 24px)); padding: 24px; border-color: #7d4d65; background: #261522; }
.web-login h2 { margin: 8px 0; }
.web-login p { color: #e0bcce; }
.web-login-art img { width: 76px; }
#web-approve-code { font-size: 1.65rem; letter-spacing: .18em; color: #ffcde4; }

/* A separate inspector for quick creation; sessions retain the bottom composer. */
@media(min-width:1000px) {
  #session-layout.solo .session-workspace { grid-template-columns: minmax(310px, 385px) minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); }
  #session-layout.solo .studio-head { grid-column: 1 / -1; }
  #session-layout.solo .session-canvas { grid-area: 2 / 2; }
  #session-layout.solo #studio-compose { grid-area: 2 / 1; padding: 17px 15px; border-top: 0; border-right: 1px solid #553449; overflow: auto; align-self: stretch; }
  #session-layout.solo .studio-types { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; }
  #session-layout.solo .studio-types button { padding: 8px 3px; }
  #session-layout.solo .studio-config { display: grid; gap: 11px; }
  #session-layout.solo #studio-model-picker > summary { justify-content: space-between; padding: 11px; white-space: normal; }
  #session-layout.solo .studio-model-cards { position: static; margin-top: 5px; max-height: 29dvh; }
  #session-layout.solo .studio-composer-row { grid-template-columns: minmax(0,1fr); margin-top: 16px; }
  #session-layout.solo .studio-composer-row textarea { min-height: 112px; }
  #session-layout.solo .studio-composer-row .primary { min-height: 40px; }
}
@media (min-width: 900px) {
  body.session-active { display: block; }
  body.session-active > .top { display: none; }
  body.session-active #session-layout { grid-template-columns: clamp(190px,17vw,246px) minmax(0,1fr); }
}

.studio-composer-row textarea, #character-ai-description, #session-note {
  background: #1b111b; color: #fae8f1; border: 1px solid #755268;
  font: inherit; font-size: .9rem; padding: 10px 12px; resize: vertical;
}
.studio-composer-row textarea::placeholder, #character-ai-description::placeholder { color: #c2a4b4; }
#character-ai-form input[type=file]::file-selector-button {
  background: #513044; color: #ffedf5; border: 0; border-radius: 5px; padding: 5px 8px; margin-right: 8px; cursor: pointer;
}

.character-toolbar { display: grid; grid-template-columns: 32px minmax(0,1fr); align-items: start; gap: 10px; }
.character-toolbar .character-mode { margin-bottom: 13px; }
.character-close { display: grid; place-items: center; border-radius: 50%; width: 32px; height: 32px; padding: 0; font-size: 1.3rem; line-height: 1; border: 1px solid #90586d; background: #452232; color: #fff0f4; }
.character-inputs { margin: 8px 0 13px; }
.casting-portrait { display: block; overflow: hidden; background-size: 428.57% 428.57%; aspect-ratio: 1; }
.casting-options { grid-template-columns: repeat(4,minmax(0,1fr)); }
.casting-option { overflow: hidden; }
#studio-model-note { margin: 4px 0; font-size: .8rem; color: #e5b8ce; }
@media (max-width: 440px) {
  .casting-options { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .character-inputs { grid-template-columns: 1fr; }
  .character-toolbar { gap: 5px; }
  .character-toolbar .quiet { padding-inline: 5px; }
}

#session-name:focus, #character-ai-heading:focus { outline: none; }
#session-list-toggle { display: none; }
.casting-tip { display: flex; gap: 9px; align-items: baseline; border-left: 3px solid #ee7297; padding: 6px 10px; color: #ffe4ec; }
.casting-tip strong { color: #ffc0d0; }
.casting-extra { margin: 0 0 14px; border-block: 1px solid #755268; }
.casting-extra > summary { padding: 10px 2px; cursor: pointer; }
@media (max-width: 899px) {
  #session-layout:not(.solo) .sessions-list-pane { display: none; position: absolute; inset: 0 0 auto; transform: translateY(54px); z-index: 5; max-height: min(52dvh,350px); padding: 12px; box-shadow: 0 14px 24px #170a14b0; }
  #session-layout.show-session-list:not(.solo) .sessions-list-pane { display: block; }
  #session-layout:not(.solo) #sessions-list { display: grid; gap: 4px; }
  #session-layout:not(.solo) #session-list-toggle { display: inline-flex; min-height: 32px; font-size: .72rem; padding: 4px 7px; white-space: nowrap; }
  #session-layout:not(.solo) .studio-links a[href="#sessions"] { display: none; }
  .studio-head { gap: 7px; }
  #session-layout, #session-layout.solo { min-height: 340px; }
}

.reference-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.reference-grid > fieldset { min-width: 0; margin: 0; padding: 12px; border: 1px solid #755268; border-radius: 12px; }
.reference-grid > fieldset > legend { padding-inline: 5px; font-weight: 750; }
.reference-upload { min-height: 72px; }
.reference-upload strong { white-space: normal; }
.reference-previews:not(:empty) { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.reference-previews img { width: 54px; height: 54px; border-radius: 6px; object-fit: cover; }
.pinterest-link { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 6px; margin-top: 10px; }
.pinterest-link input { min-width: 0; border: 1px solid #755268; border-radius: 9px; padding: 7px; background: #1b111b; color: #fae8f1; }
.pinterest-link button { min-height: 41px; padding: 6px 8px; }
.pinterest-form > details { margin-top: 14px; }
#pinterest-import-status { margin: 5px 0 0; font-size: .8rem; color: #edc0d2; }
#pinterest-import-status:empty, #pinterest-status:empty, #reference-status:empty { display: none; }
@media (max-width: 580px) {
  .reference-grid { grid-template-columns: minmax(0,1fr); }
  .pinterest-form details .reference-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 899px) and (max-height: 700px) {
  #session-layout:not(.solo) #studio-compose { padding-top: 6px; }
  #session-layout:not(.solo) .studio-types { margin-bottom: 5px; }
  #session-layout:not(.solo) .studio-composer-row { margin-top: 4px; }
  #session-layout:not(.solo) .studio-composer-row textarea { padding-block: 5px; }
  #session-layout:not(.solo) #session-actions summary { min-height: 0; padding-block: 3px; }
  #session-layout:not(.solo) .session-materials { margin-block: 0; }
  #session-layout:not(.solo) .session-materials form { max-height: 28dvh; overflow: auto; }
}

@media (max-width: 899px) and (max-height: 700px) {
  #studio-empty:has(#studio-intro:not([hidden])) img { display: none; }
  #studio-empty #studio-intro { font-size: .8rem; }
}

.session-view { display: flex; gap: 2px; background: #21121d; border: 1px solid #70465c; border-radius: 9px; padding: 2px; }
.session-view button, .board-toolbar button, #board-links button, .board-actions button {
  color: #f7e0eb; border: 1px solid transparent; border-radius: 6px; background: transparent; padding: 5px 8px; font-size: .78rem;
}
.session-view button[aria-pressed="true"], .board-actions button[aria-pressed="true"] { background: #f0bbd0; color: #351323; font-weight: 750; }
#session-canvas[data-view="board"] { display: flex; padding: 0; overflow: hidden; }
#session-canvas[data-view="board"] :is(#studio-empty, #session-items, #session-generations) { display: none; }
#session-board { display: flex; flex: 1; flex-direction: column; position: relative; min-width: 0; min-height: 0; }
.board-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 5px 12px; border-bottom: 1px solid #59374b; background: #261622; color: #e7c3d6; font-size: .76rem; }
.board-zoom { display: flex; flex: none; align-items: center; gap: 3px; }
.board-toolbar button, #board-links button { border-color: #70465c; }
#board-field { flex: 1; overflow: auto; min-height: 54px; background: #170f19; }
#board-plane { position: relative; background-color: #170f19; background-image: radial-gradient(#664158 1px, transparent 1px); background-size: 20px 20px; }
#board-lines, #board-cards { position: absolute; inset: 0; pointer-events: none; }
.board-line { position: absolute; display: block; height: 2px; border-radius: 1px; transform-origin: left center; background: #e48fb0; }
.board-line::after { content: ''; position: absolute; right: 0; top: -4px; border-left: 8px solid #e48fb0; border-block: 5px solid transparent; }
.board-card { pointer-events: auto; width: 236px; height: 184px; display: grid; grid-template-rows: auto minmax(0,1fr) auto; gap: 4px; position: absolute; overflow: hidden; border-radius: 12px; background: #342031; border: 1px solid #99637d; box-shadow: 0 4px 13px #140a14a0; }
.board-card:focus-within, .board-card.is-dragging { z-index: 1; }
.board-card.is-dragging { border-color: #f2aecb; }
.board-handle { padding: 7px 9px; background: #4b293e; color: #ffedf6; border: 0; width: 100%; cursor: grab; touch-action: none; user-select: none; text-align: left; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.board-handle::before { content: '⠿'; margin-inline-end: 6px; color: #f3b9d2; }
.board-handle:focus-visible, #board-field:focus-visible { outline-offset: -3px; }
.board-content { padding: 3px 8px; overflow: auto; overflow-wrap: anywhere; font-size: .8rem; color: #edd3e1; }
.board-content p { white-space: pre-wrap; margin: 3px 0; }
.board-content img, .board-content video { display: block; width: 100%; height: 100%; object-fit: contain; }
.board-content audio { width: 100%; }
.board-actions { padding: 2px 5px; display: flex; gap: 2px; }
.board-actions button { border-color: #76516a; }
#board-links { padding: 2px 12px; border-bottom: 1px solid #59374b; background: #261622; font-size: .78rem; }
#board-links summary { cursor: pointer; padding: 5px 0; }
#board-links-list { max-height: 120px; overflow: auto; }
#board-links-list > div { display: flex; gap: 8px; justify-content: space-between; padding-block: 3px; }
#board-empty { position: absolute; top: 38%; width: 100%; padding-inline: 12px; text-align: center; color: #ebc6d9; pointer-events: none; }
@media (max-width: 899px) {
  .session-view button, .board-toolbar button { padding: 4px 6px; }
}
.board-actions small { align-self: center; margin-inline-start: auto; color: #e7bdd2; font-size: .69rem; }

.tabs a[data-tab="account"] { box-shadow: inset 0 0 0 1px #a66080; }
.library-history { display: inline-flex; margin-bottom: 8px; }
#history-title { margin-top: 3px; }
.entry-mark, .nav-icon { display: inline-grid; place-items: center; }
.nav-sessions::before {
  content: '';
  width: 58%;
  height: 49%;
  border: 1.5px solid currentColor;
  border-radius: 2px;
  box-shadow: 2px -2px 0 -1px #28121f, 3px -3px 0 -1px currentColor;
  translate: -1px 1px;
}
.entry-mark.nav-montage::before {
  content: '';
  width: 55%;
  height: 52%;
  border: 2px solid currentColor;
  border-radius: 4px;
  background: repeating-linear-gradient(to right,currentColor 0 2px,transparent 2px 5px) center top / 100% 4px no-repeat,
    repeating-linear-gradient(to right,currentColor 0 2px,transparent 2px 5px) center bottom / 100% 4px no-repeat;
}
.entry-mark.nav-crop::before {
  content: '';
  width: 51%;
  height: 51%;
  background: linear-gradient(currentColor,currentColor) 25% 0 / 2px 86% no-repeat,
    linear-gradient(currentColor,currentColor) 0 24% / 90% 2px no-repeat,
    linear-gradient(currentColor,currentColor) 90% 24% / 2px 76% no-repeat,
    linear-gradient(currentColor,currentColor) 25% 90% / 75% 2px no-repeat;
}
.entry-mark.nav-enhance::before { content: '✦'; font-size: 1.65rem; line-height: 1; }
.entry-mark.nav-reference::before {
  content: '';
  width: 48%;
  height: 48%;
  border: 2px solid currentColor;
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #502638, inset 0 0 0 4.5px currentColor;
}
.pinterest-badge { position: relative; overflow: hidden; background: #fff; }
.pinterest-badge img { position: absolute; width: 156px; max-width: none; height: auto; inset: 50% auto auto 50%; transform: translate(-50%, -50%); }
#enhance-form { max-width: 520px; }
.enhance-upload { min-height: 68px; }
.enhance-upload video { flex: 0 0 52px; width: 52px; height: 44px; object-fit: cover; border-radius: 7px; background: #180c15; }
#enhance-status:empty { display: none; }
.montage-templates { margin: 0 0 14px; }
#montage-presets { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(126px,100%),1fr)); gap: 6px; }
#montage-presets button {
  display: grid; align-content: start; gap: 3px; text-align: left; padding: 9px 8px; border: 1px solid #775269;
  background: #321e2e; color: #ffedf6; border-radius: 9px; min-width: 0;
}
#montage-presets button[aria-pressed="true"] { background: #5b2e47; border-color: #e4a2bf; }
#montage-presets small, .montage-example small { display: block; color: #e2bcd0; font-size: .75rem; }
.montage-example { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 7px; padding: 9px; margin-top: 10px; border: 1px solid #735166; border-radius: 9px; }
.montage-example .quiet { min-height: 36px; padding: 5px 8px; font-size: .8rem; }
.board-toolbar { flex-wrap: wrap; }
.board-add { display: flex; gap: 4px; flex-wrap: wrap; }
.board-upload {
  position: relative; display: inline-flex; align-items: center; border: 1px solid #a26d89; border-radius: 6px;
  padding: 5px 8px; color: #fff0f7; background: #493043; cursor: pointer;
}
.board-upload:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.board-upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
#board-status { margin: 0; padding: 3px 12px; font-size: .73rem; color: #e7c3d6; background: #261622; }
#board-note-form { display: flex; gap: 6px; align-items: stretch; padding: 6px 12px; background: #261622; }
#board-note { flex: 1; min-width: 0; padding: 6px; background: #1b111b; color: #fae8f1; border: 1px solid #755268; border-radius: 6px; font: inherit; font-size: .8rem; }
#board-note-form button { color: #ffedf6; background: #68445b; border: 1px solid #a26d89; border-radius: 6px; font: inherit; font-size: .78rem; }
#board-plane { cursor: grab; }
#board-field.is-panning #board-plane { cursor: grabbing; }
.board-card { cursor: default; }
@media (max-width: 530px) {
  .board-toolbar { gap: 4px; padding: 4px 7px; }
  .board-upload { padding: 4px 6px; }
  #board-status { padding-inline: 7px; }
}
