:root {
  --bg: #10101b;
  --bg-deep: #0b0b13;
  --surface: rgba(34, 31, 53, 0.78);
  --surface-strong: #211e34;
  --text: #f5f1fc;
  --muted: #a7a0b7;
  --line: rgba(255, 255, 255, 0.09);
  --violet: #b9a2ff;
  --lilac: #d9c9ff;
  --gold: #ffda8b;
  --ember: #ff9f8d;
  --green: #7ee1bd;
  --safe-bottom: max(18px, env(safe-area-inset-bottom));
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: Manrope, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
.ambient { position: fixed; z-index: -1; border-radius: 999px; pointer-events: none; filter: blur(2px); opacity: .58; }
.ambient--one { width: 430px; height: 430px; left: -210px; top: -130px; background: radial-gradient(circle, rgba(113, 84, 196, .38), transparent 67%); }
.ambient--two { width: 380px; height: 380px; right: -230px; top: 280px; background: radial-gradient(circle, rgba(218, 143, 115, .17), transparent 68%); }

.loading-screen { position: fixed; inset: 0; z-index: 10; display: grid; align-content: center; justify-items: center; gap: 10px; background: var(--bg-deep); transition: opacity .35s ease, visibility .35s ease; }
.loading-screen.is-gone { opacity: 0; visibility: hidden; }
.loading-screen strong { font: 700 27px/1 "Playfair Display", serif; letter-spacing: -.03em; }
.loading-screen small { color: var(--muted); }
.app-shell { width: min(100%, 690px); min-height: 100dvh; margin: 0 auto; padding: env(safe-area-inset-top) 18px calc(88px + var(--safe-bottom)); transition: opacity .3s ease; }
.app-shell.is-hidden { opacity: 0; pointer-events: none; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 9px; background: transparent; padding: 4px 0; font: 700 19px/1 "Playfair Display", serif; letter-spacing: -.04em; }
.brand__mark { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 10px; background: linear-gradient(135deg, #d6c1ff, #9676ed); box-shadow: 0 6px 20px rgba(161, 122, 250, .28); }
.brand__mark i { width: 12px; height: 12px; display: block; border: 2px solid #201731; border-radius: 3px 3px 7px 3px; transform: rotate(-8deg); }
.icon-button { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: rgba(255,255,255,.055); }
.icon-button svg, .nav-item svg, .composer svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.view { display: none; animation: rise .38s ease both; }
.view.is-active { display: block; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.eyebrow { margin-top: 25px; color: var(--lilac); font-size: 10px; letter-spacing: .13em; font-weight: 800; text-transform: uppercase; display: flex; align-items: center; gap: 7px; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 5px rgba(255,218,139,.13); animation: pulse 2s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(255,218,139,0); } }
.sparkle { color: var(--gold); font-size: 14px; }
h1, h2, p { margin: 0; }
h1 { margin-top: 13px; font: 700 clamp(36px, 11vw, 57px)/.99 "Playfair Display", serif; letter-spacing: -.055em; }
h1 em, h2 { color: var(--lilac); font-style: italic; }
.home-title-row { display: flex; justify-content: space-between; gap: 10px; }
.lead { max-width: 405px; margin-top: 15px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.moon-mark { position: relative; width: 68px; height: 68px; margin-bottom: 11px; border-radius: 50%; background: radial-gradient(circle at 36% 28%, #2f2949, #171527 72%); box-shadow: inset 0 0 0 1px rgba(213,195,255,.15), 0 16px 34px rgba(0,0,0,.25); overflow: hidden; }
.moon-mark::before { content: ""; position: absolute; width: 40px; height: 40px; left: 13px; top: 14px; border-radius: 50%; background: linear-gradient(145deg, #ffe3a2, #dbb865); }
.moon-mark::after { content: ""; position: absolute; width: 37px; height: 37px; left: 26px; top: 9px; border-radius: 50%; background: #1a172b; }
.moon-mark span { position: absolute; width: 6px; height: 6px; top: 14px; right: 16px; z-index: 2; background: #ffe5a1; transform: rotate(45deg); box-shadow: 0 0 13px #ffd36e; }
.moon-mark--small { width: 49px; height: 49px; margin-top: 12px; }
.moon-mark--small::before { transform: scale(.72); transform-origin: top left; }
.moon-mark--small::after { transform: scale(.72); transform-origin: top left; }
.moon-mark--small span { transform: scale(.7) rotate(45deg); transform-origin: top left; }

.story-pulse { display: block; width: 100%; margin: 29px 0 33px; padding: 18px 18px 19px; text-align: left; border-radius: 22px; background: linear-gradient(118deg, rgba(92, 68, 157, .42), rgba(42, 35, 69, .96) 57%, rgba(112, 76, 117, .38)); border: 1px solid rgba(219,202,255,.16); box-shadow: 0 17px 35px rgba(0,0,0,.18); }
.story-pulse__top { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; font-weight: 700; }
.story-pulse__top i { color: var(--lilac); font-style: normal; }
.story-pulse__line { height: 1px; margin: 13px 0 11px; background: linear-gradient(90deg, var(--violet), rgba(185,162,255,.08)); }
.story-pulse__copy { font: 600 15px/1.35 Manrope, sans-serif; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; margin: 20px 0 15px; }
.section-heading span { color: var(--muted); font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.section-heading h2 { margin-top: 5px; font: 700 25px/1.04 "Playfair Display", serif; letter-spacing: -.045em; }
.section-heading--tight { margin-top: 30px; }
.text-button { padding: 7px 0; background: transparent; color: var(--lilac); font-size: 12px; font-weight: 800; }

.character-cards { display: grid; gap: 13px; }
.character-card { position: relative; min-height: 174px; overflow: hidden; padding: 20px; border-radius: 25px; text-align: left; background: var(--surface); border: 1px solid var(--line); transition: transform .2s ease, border-color .2s ease; }
.character-card:active { transform: scale(.985); }
.character-card.is-selected { border-color: rgba(227,211,255,.55); }
.character-card--violet { background: linear-gradient(110deg, #302550, #211a35 57%, #2c2344); }
.character-card--ember { background: linear-gradient(110deg, #3a2633, #281d2a 57%, #35202a); }
.character-card__light { position: absolute; width: 200px; height: 200px; right: -46px; top: -44px; border-radius: 50%; opacity: .75; filter: blur(1px); }
.character-card--violet .character-card__light { background: radial-gradient(circle, #ae8cff 0 10%, rgba(174,140,255,.2) 36%, transparent 70%); }
.character-card--ember .character-card__light { background: radial-gradient(circle, #ffb180 0 10%, rgba(255,145,122,.22) 35%, transparent 70%); }
.character-card__portrait { position: absolute; right: 24px; bottom: -4px; display: grid; place-items: center; width: 102px; height: 126px; border-radius: 50px 50px 16px 16px; color: rgba(255,255,255,.88); font: 700 58px/.9 "Playfair Display", serif; border: 1px solid rgba(255,255,255,.16); background: linear-gradient(150deg, rgba(255,255,255,.22), rgba(255,255,255,.035)); text-shadow: 0 7px 20px rgba(0,0,0,.25); }
.character-card__portrait::before { content: ""; position: absolute; width: 70px; height: 70px; top: -20px; border-radius: 45% 55% 45% 55%; background: inherit; opacity: .8; }
.character-card__portrait b { position: relative; z-index: 1; }
.character-card__status { position: relative; z-index: 1; color: var(--gold); font-size: 10px; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
.character-card__name { position: relative; z-index: 1; margin-top: 12px; font: 700 33px/.95 "Playfair Display", serif; letter-spacing: -.045em; }
.character-card__subtitle { position: relative; z-index: 1; max-width: 215px; margin-top: 8px; color: rgba(255,255,255,.73); font-size: 12px; line-height: 1.45; }
.character-card__meta { position: relative; z-index: 1; margin-top: 15px; color: rgba(255,255,255,.5); font-size: 10px; }

.view.chat-view { display: none; height: calc(100dvh - 148px - var(--safe-bottom)); min-height: 420px; flex-direction: column; position: relative; padding-bottom: 0; }
.view.chat-view.is-active { display: flex; }
.chat-header { display: flex; align-items: center; gap: 12px; padding: 15px 0 14px; border-bottom: 1px solid var(--line); }
.chat-header__avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 15px; font: 700 21px "Playfair Display", serif; }
.chat-header__avatar.violet { background: #50407e; color: #eadfff; }
.chat-header__avatar.ember { background: #794657; color: #ffe1d5; }
.chat-header b { display: block; font-size: 14px; }
.chat-header span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.chat-header__back { margin-left: auto; padding: 7px 0; color: var(--lilac); background: transparent; font-size: 11px; font-weight: 800; }
.chat-scroll { flex: 1 1 auto; min-height: 0; padding: 20px 0 12px; overflow-y: auto; scrollbar-width: none; }
.chat-scroll::-webkit-scrollbar { display: none; }
.chat-day { width: fit-content; margin: 0 auto 18px; padding: 5px 10px; color: rgba(255,255,255,.48); font-size: 10px; background: rgba(255,255,255,.05); border-radius: 999px; }
.message { display: flex; margin: 8px 0; }
.message--assistant { justify-content: flex-start; }
.message--user { justify-content: flex-end; }
.message__bubble { max-width: 84%; padding: 11px 13px 8px; border-radius: 16px; font-size: 14px; line-height: 1.48; box-shadow: 0 8px 20px rgba(0,0,0,.08); }
.message--assistant .message__bubble { border-top-left-radius: 5px; background: #28243a; color: #f5efff; }
.message--user .message__bubble { border-top-right-radius: 5px; background: linear-gradient(135deg, #8e70de, #7359bf); color: white; }
.message__action { display: inline; color: #d8d1e5; font-style: italic; font-weight: 500; }
.message__speech { color: #fff; font-weight: 800; letter-spacing: .005em; }
.message__time { display: block; margin-top: 4px; text-align: right; color: rgba(255,255,255,.46); font-size: 9px; }
.typing { display: inline-flex; gap: 4px; align-items: center; min-height: 40px; padding: 0 15px; border-radius: 15px 15px 15px 5px; background: #28243a; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--lilac); animation: bounce 1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .12s; }.typing i:nth-child(3) { animation-delay: .24s; }
@keyframes bounce { 50% { transform: translateY(-4px); opacity: .4; } }
.composer { position: relative; z-index: 4; display: flex; flex: 0 0 auto; gap: 9px; align-items: flex-end; width: 100%; margin-top: 8px; padding: 8px 8px 8px 15px; border: 1px solid rgba(255,255,255,.12); border-radius: 19px; background: rgba(31,28,45,.94); box-shadow: 0 10px 26px rgba(0,0,0,.24); backdrop-filter: blur(15px); }
.composer textarea { flex: 1; max-height: 104px; border: 0; outline: 0; resize: none; padding: 8px 0; color: var(--text); background: transparent; font-size: 14px; line-height: 1.35; }
.composer textarea::placeholder { color: #89829b; }
.composer button { display: grid; place-items: center; flex: 0 0 37px; width: 37px; height: 37px; margin-bottom: 0; border-radius: 13px; background: var(--lilac); color: #251b39; transition: transform .15s ease; }
.composer button:active { transform: scale(.9); }
.composer button:disabled { opacity: .45; }

.story-title { margin-bottom: 24px; }
.relationship-card { position: relative; overflow: hidden; min-height: 180px; padding: 21px; border: 1px solid rgba(206,183,255,.17); border-radius: 25px; background: linear-gradient(135deg, rgba(76,58,121,.72), rgba(35,29,57,.95)); }
.relationship-card::after { content: ""; position: absolute; width: 180px; height: 180px; right: -50px; top: -70px; border: 1px solid rgba(255,218,139,.26); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,218,139,.035), 0 0 0 44px rgba(255,218,139,.025); }
.relationship-card__with { color: var(--gold); font-size: 10px; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
.relationship-card__title { position: relative; z-index: 1; max-width: 300px; margin-top: 12px; font: 700 26px/1.1 "Playfair Display", serif; letter-spacing: -.04em; }
.relationship-card__copy { position: relative; z-index: 1; max-width: 320px; margin-top: 11px; color: rgba(255,255,255,.67); font-size: 12px; line-height: 1.55; }
.relationship-card__mood { position: relative; z-index: 1; display: inline-flex; margin-top: 16px; padding: 6px 9px; border-radius: 8px; background: rgba(255,255,255,.1); color: var(--lilac); font-size: 10px; font-weight: 700; }
.timeline, .memory-list { display: grid; gap: 10px; }
.timeline-item { display: grid; grid-template-columns: 22px 1fr; gap: 12px; padding: 11px 0; }
.timeline-item__line { position: relative; width: 1px; background: rgba(185,162,255,.22); margin: 13px auto -20px; }
.timeline-item__line::before { content: ""; position: absolute; top: -2px; left: -4px; width: 9px; height: 9px; border: 2px solid #181424; border-radius: 50%; background: var(--gold); }
.timeline-item:last-child .timeline-item__line { background: transparent; }
.timeline-item b, .memory-item b { display: block; font-size: 13px; }
.timeline-item p, .memory-item p { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.timeline-item small { display: block; margin-top: 6px; color: rgba(255,255,255,.32); font-size: 9px; }
.memory-item { padding: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); }
.memory-item__tag { display: inline-block; margin-bottom: 7px; color: var(--gold); font-size: 9px; letter-spacing: .1em; font-weight: 800; text-transform: uppercase; }
.empty-state { padding: 18px; border: 1px dashed rgba(255,255,255,.13); border-radius: 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }

.settings-card { margin-top: 15px; padding: 17px; border: 1px solid var(--line); border-radius: 20px; background: rgba(255,255,255,.04); }
.setting-title b { display: block; font-size: 14px; }.setting-title span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.segment-control { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 15px; padding: 4px; border-radius: 12px; background: #171524; }
.segment-control button { padding: 8px 3px; border-radius: 9px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 700; }.segment-control button.is-selected { background: #6f55b6; color: white; }
.hours-row { display: flex; gap: 11px; margin-top: 16px; }.hours-row label { flex: 1; color: var(--muted); font-size: 11px; }.hours-row select { display: block; width: 100%; margin-top: 6px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 10px; background: #1b1829; color: white; outline: none; }
.settings-note { margin: 18px 4px; color: var(--muted); font-size: 11px; line-height: 1.65; }

.bottom-nav { position: fixed; z-index: 5; bottom: 0; left: 50%; display: flex; justify-content: space-around; width: min(100%, 690px); padding: 8px 14px calc(8px + var(--safe-bottom)); border-top: 1px solid rgba(255,255,255,.07); background: rgba(14,13,24,.9); transform: translateX(-50%); backdrop-filter: blur(18px); }
.nav-item { display: grid; justify-items: center; gap: 4px; width: 64px; padding: 5px 0; color: #777187; background: transparent; font-size: 9px; font-weight: 700; }.nav-item svg { width: 20px; height: 20px; }.nav-item.is-active { color: var(--lilac); }
.toast { position: fixed; z-index: 20; left: 50%; bottom: 98px; max-width: calc(100% - 44px); padding: 11px 14px; border-radius: 13px; color: #fff; background: #2a2441; box-shadow: 0 10px 30px rgba(0,0,0,.28); font-size: 12px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; transition: .25s ease; }.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }

@media (min-width: 720px) { .app-shell { padding-left: 26px; padding-right: 26px; } .composer { width: min(calc(100% - 52px), 638px); } }

[hidden] { display: none !important; }

/* Compact character picker: the art is the card, copy stays at the bottom. */
.selection-heading { margin: 25px 0 15px; }
.selection-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px; }
.selection-heading > span { color: var(--muted); font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.selection-heading > div > span { color: var(--muted); font-size: 10px; letter-spacing: .14em; font-weight: 800; }
.selection-heading h1 { margin: 6px 0 0; color: var(--text); font: 700 29px/1.08 "Playfair Display", serif; letter-spacing: -.045em; }
.create-button { flex: 0 0 auto; margin-bottom: 1px; padding: 9px 12px; border-radius: 11px; background: #6f55b6; color: #fff; font-size: 11px; font-weight: 800; }
.character-cards { gap: 12px; }
.character-card { min-height: 238px; padding: 0; isolation: isolate; border-radius: 23px; background: #242036; }
.character-card__light { z-index: -2; inset: 0; width: auto; height: auto; filter: none; opacity: 1; }
.character-card__image { position: absolute; z-index: -1; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.character-card__portrait { z-index: -1; right: 50%; bottom: 25px; width: 122px; height: 150px; transform: translateX(50%); opacity: .75; }
.character-card__shade { position: absolute; z-index: -1; inset: 0; background: linear-gradient(180deg, rgba(12,10,22,.02) 24%, rgba(10,8,17,.2) 49%, rgba(9,8,14,.88) 100%); }
.character-card__details { position: absolute; left: 17px; right: 17px; bottom: 16px; z-index: 1; text-align: left; }
.character-card__details b { display: block; font: 700 29px/1 "Playfair Display", serif; letter-spacing: -.04em; }
.character-card__details small { display: block; max-width: 255px; margin-top: 6px; color: rgba(255,255,255,.77); font: 600 11px/1.35 Manrope, sans-serif; }
.card-location { display: block; overflow: hidden; margin-top: 7px; color: #f0d998; font: 700 10px/1.25 Manrope, sans-serif; letter-spacing: .01em; text-overflow: ellipsis; white-space: nowrap; }
.chat-header__avatar { overflow: hidden; }
.chat-header__avatar img { width: 100%; height: 100%; object-fit: cover; }
.scene-state { display: grid; gap: 3px; margin: 11px 0 2px; padding: 11px 13px; border: 1px solid rgba(215,194,255,.14); border-radius: 15px; background: linear-gradient(115deg, rgba(92,70,148,.27), rgba(38,32,57,.62)); }
.scene-state > span { color: var(--gold); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.scene-state > b { font: 700 16px/1.1 "Playfair Display", serif; }
.scene-state > small { color: var(--lilac); font-size: 10px; }
.scene-state > p { margin-top: 3px; color: rgba(244,239,255,.78); font-size: 11px; line-height: 1.4; }

.app-shell.is-chat-mode { width: 100%; max-width: none; height: 100dvh; min-height: 100dvh; padding: 0; }
.app-shell.is-chat-mode .topbar, .app-shell.is-chat-mode .bottom-nav { display: none; }
.app-shell.is-chat-mode .main-content { height: 100%; }
.app-shell.is-chat-mode .chat-view.is-active { height: 100dvh; min-height: 100dvh; padding: max(10px, env(safe-area-inset-top)) 14px max(10px, env(safe-area-inset-bottom)); }
.app-shell.is-chat-mode .chat-header { padding: 7px 0 11px; }
.app-shell.is-chat-mode .chat-scroll { padding-top: 14px; }
.chat-header__icon { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 11px; background: rgba(255,255,255,.055); color: var(--lilac); }
.chat-header__icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.admin-open { width: 100%; margin-top: 14px; padding: 11px 13px; border-radius: 11px; background: #6f55b6; color: #fff; font-size: 12px; font-weight: 800; }
.admin-lead { margin: -11px 0 19px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.admin-character-list { display: grid; gap: 14px; }
.admin-character-card { display: grid; grid-template-columns: 105px 1fr; min-height: 142px; overflow: hidden; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.04); }
.admin-character-card__preview { display: grid; place-items: center; overflow: hidden; color: rgba(255,255,255,.8); font: 700 42px "Playfair Display", serif; background: #29223d; }
.admin-character-card__preview img { width: 100%; height: 100%; object-fit: cover; }
.admin-character-card__body { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; padding: 14px; }
.admin-character-card__body > b { font-size: 15px; }
.admin-character-card__body > span { color: var(--muted); font-size: 10px; line-height: 1.35; }
.native-file-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.admin-upload { width: 100%; padding: 8px 10px; border-radius: 9px; background: rgba(185,162,255,.18); color: var(--lilac); font-size: 10px; font-weight: 800; }
.admin-upload { display: block; text-align: center; }
.upload-progress { width: 100%; margin-top: 2px; color: var(--muted); font-size: 9px; }
.upload-progress span { display: block; margin-bottom: 4px; }
.upload-progress i { display: block; height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.upload-progress b { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #9d80ef, #d9c9ff); transition: width .15s ease; }

.compact-view-title { margin: 26px 0 15px; font: 700 25px/1 "Playfair Display", serif; letter-spacing: -.04em; }
.compact-action { width: 100%; margin-top: 12px; padding: 11px; border-radius: 13px; color: var(--lilac); background: rgba(255,255,255,.045); font-size: 11px; font-weight: 800; }
#view-story .relationship-card { min-height: 132px; padding: 18px; }
#view-story .relationship-card__title { margin-top: 8px; font-size: 25px; }
#view-story .relationship-card__copy { margin-top: 7px; font-size: 12px; }
.admin-ai-settings { margin-bottom: 13px; }
.admin-ai-card { display: grid; gap: 10px; padding: 15px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255,255,255,.04); }
.admin-ai-card__head { display: flex; align-items: center; justify-content: space-between; }
.admin-ai-card__head > b { font-size: 15px; }
.admin-ai-card__head > span { color: var(--green); font-size: 10px; font-weight: 800; }
.admin-ai-card label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.admin-ai-card input { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #1b1829; color: var(--text); font-size: 12px; }

.community-section { margin-top: 25px; }
.community-heading, .admin-moderation-title { margin: 0 0 11px; color: var(--muted); font-size: 10px; letter-spacing: .12em; font-weight: 800; text-transform: uppercase; }
.community-cards { display: grid; gap: 12px; }
.community-card { position: relative; isolation: isolate; overflow: hidden; border: 1px solid var(--line); border-radius: 21px; background: #242036; }
.community-card__main { position: relative; display: block; width: 100%; min-height: 212px; overflow: hidden; padding: 0; color: var(--text); text-align: left; background: transparent; }
.community-card__main .character-card__image { z-index: 0; }
.community-card__main .character-card__portrait { z-index: 0; }
.community-card__main .character-card__shade { z-index: 1; }
.community-card__main .character-card__details { z-index: 2; }
.community-card__footer { position: relative; z-index: 3; display: flex; justify-content: space-between; gap: 8px; align-items: center; min-height: 42px; padding: 7px 12px; border-top: 1px solid rgba(255,255,255,.07); background: rgba(16,14,26,.96); }
.creator-link { max-width: 70%; overflow: hidden; color: var(--muted); text-align: left; text-overflow: ellipsis; white-space: nowrap; background: transparent; font-size: 10px; font-weight: 700; }
.verified-mark { display: inline-grid; width: 14px; height: 14px; margin-left: 4px; border-radius: 50%; place-items: center; vertical-align: -1px; background: #8a6ce2; color: #fff; font: 800 10px/14px Arial, sans-serif; }
.heart-button { padding: 5px 0 5px 7px; color: #aaa0b7; background: transparent; font-size: 11px; font-weight: 800; }
.heart-button span { color: #aa92bb; font-size: 16px; vertical-align: -1px; }
.heart-button.is-liked, .heart-button.is-liked span { color: #f06b8d; }
.community-status { display: inline-block; margin-top: 7px; padding: 3px 6px; border-radius: 6px; background: rgba(255,218,139,.15); color: var(--gold); font-size: 9px; font-weight: 800; }

.creator-form { display: grid; gap: 12px; }
.creator-form label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; }
.creator-form input, .creator-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; outline: none; padding: 11px; color: var(--text); background: rgba(255,255,255,.045); font: 500 13px/1.42 Manrope, sans-serif; resize: vertical; }
.creator-form input[type="file"] { padding: 9px; color: var(--muted); font-size: 10px; }
.visibility-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 4px; border-radius: 13px; background: rgba(255,255,255,.045); }
.visibility-choice button { padding: 9px; border-radius: 9px; color: var(--muted); background: transparent; font-size: 11px; font-weight: 800; }
.visibility-choice button.is-selected { color: #fff; background: #6f55b6; }
.create-submit { padding: 13px; border-radius: 13px; background: linear-gradient(135deg, #9b7aeb, #7357c2); color: #fff; font-size: 12px; font-weight: 800; }

.author-card { margin-bottom: 16px; }
.author-card .compact-view-title { margin-bottom: 13px; }
.author-stats { display: flex; gap: 8px; }
.author-stats span { padding: 7px 9px; border-radius: 9px; color: var(--muted); background: rgba(255,255,255,.05); font-size: 10px; font-weight: 700; }
.admin-moderation-list { display: grid; gap: 10px; margin-top: 20px; }
.moderation-card { padding: 13px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.035); }
.moderation-card b, .moderation-card small { display: block; }
.moderation-card small { margin-top: 4px; color: var(--muted); font-size: 10px; }
.moderation-card p { margin-top: 7px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.moderation-card div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.moderation-card button { padding: 7px 9px; border-radius: 8px; background: rgba(185,162,255,.16); color: var(--lilac); font-size: 10px; font-weight: 800; }
