:root {
  --bg: #120d14; --panel: #1c1520; --panel2: #251c2b; --line: #352a3c;
  --text: #f3ecf5; --muted: #a998ad; --accent: #ff5d8f; --accent2: #ff8a5c; --bad: #ff6b6b;
  --r: 14px; font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(1200px 600px at 80% -10%, #2a1430 0%, var(--bg) 55%); color: var(--text); min-height: 100vh; }
a { color: inherit; text-decoration: none; }
.top { display: flex; align-items: center; gap: 16px; padding: 14px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(18,13,20,.85); backdrop-filter: blur(10px); z-index: 5; }
.brand { font-size: 22px; font-weight: 700; letter-spacing: -.5px; }
.brand span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tag { color: var(--muted); font-size: 13px; }
.status { margin-left: auto; font-size: 12px; color: var(--muted); }
.status b { color: var(--text); font-weight: 600; }
main { max-width: 1180px; margin: 0 auto; padding: 28px; }
h1 { font-size: 30px; letter-spacing: -.6px; margin: 0 0 6px; }
.hero p, .fine, .meta { color: var(--muted); }
.fine { font-size: 13px; }
.btn { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #fff; border: 0; border-radius: 999px; padding: 11px 22px; font-weight: 600; font-size: 15px; cursor: pointer; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.row { display: flex; gap: 12px; justify-content: flex-end; align-items: center; margin-top: 18px; }
.error { color: var(--bad); min-height: 1em; font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 18px; margin-top: 24px; }
.card { position: relative; aspect-ratio: 4/5.6; border-radius: var(--r); overflow: hidden; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: flex-end; transition: transform .15s; }
.card:hover { transform: translateY(-3px); }
.card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card .label { position: relative; width: 100%; padding: 44px 14px 14px; background: linear-gradient(transparent, rgba(0,0,0,.85)); }
.card .label b { font-size: 18px; } .card .label span { color: #ddd; font-size: 13px; display: block; }
.card.new { align-items: center; justify-content: center; flex-direction: column; gap: 8px; color: var(--muted); border-style: dashed; }
.card.new .plus { font-size: 44px; color: var(--accent); }
.making { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 13px; text-align: center; padding: 20px; }
.making::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%); background-size: 200% 100%; animation: shimmer 1.6s infinite linear; z-index: -1; }
@keyframes shimmer { to { background-position: -200% 0; } }

.create { max-width: 680px; }
form label { display: block; margin: 14px 0 6px; font-size: 14px; color: var(--muted); }
input, select, textarea { width: 100%; margin-top: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 15px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.two label { margin-top: 14px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r); padding: 4px 16px 16px; margin: 18px 0 0; }
legend { color: var(--text); padding: 0 6px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chips button { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 14px; }
.chips button.on { border-color: var(--accent); background: rgba(255,93,143,.15); }

.chat { display: grid; grid-template-columns: 300px 1fr; gap: 24px; height: calc(100vh - 130px); }
.side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; overflow: auto; }
.portrait { position: relative; aspect-ratio: 4/5.6; border-radius: 10px; overflow: hidden; background: var(--panel2); }
.portrait img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side h2 { margin: 14px 0 2px; } .about { font-size: 14px; line-height: 1.5; color: #d9cfdc; }
.sidebtns { display: flex; gap: 8px; margin-top: 12px; }
.convo { display: flex; flex-direction: column; min-height: 0; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); }
.msgs { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 72%; padding: 10px 14px; border-radius: 18px; line-height: 1.45; font-size: 15px; white-space: pre-wrap; word-wrap: break-word; }
.msg.user { align-self: flex-end; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-bottom-right-radius: 6px; }
.msg.assistant, .msg.photo { align-self: flex-start; background: var(--panel2); border-bottom-left-radius: 6px; }
.msg .pic { display: block; margin-top: 8px; width: 260px; aspect-ratio: 4/7; border-radius: 12px; overflow: hidden; position: relative; background: var(--bg); }
.msg .pic img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.typing { align-self: flex-start; color: var(--muted); font-size: 14px; padding: 4px 6px; }
.composer { display: flex; gap: 10px; padding: 12px; border-top: 1px solid var(--line); }
.composer input { margin: 0; border-radius: 999px; }
.composer .photo { background: var(--panel2); border: 1px solid var(--line); border-radius: 50%; width: 46px; flex: none; font-size: 18px; cursor: pointer; }
.convo .error { padding: 0 16px; margin: 0 0 8px; }
.empty { color: var(--muted); text-align: center; margin: auto; max-width: 340px; }

dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); max-width: 460px; padding: 26px; }
dialog::backdrop { background: rgba(8,5,10,.85); backdrop-filter: blur(6px); }
dialog h2 { margin-top: 0; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: grid; place-items: center; z-index: 20; cursor: zoom-out; }
.lightbox img { max-width: 92vw; max-height: 92vh; border-radius: 10px; }

@media (max-width: 760px) {
  main { padding: 16px; } .chat { grid-template-columns: 1fr; height: auto; }
  .side { display: grid; grid-template-columns: 110px 1fr; gap: 12px; } .side h2 { margin-top: 0; }
  .sidebtns, .about { grid-column: 1 / -1; } .convo { height: 70vh; } .msg { max-width: 88%; }
  .two { grid-template-columns: 1fr; }
}

.home h2.sub { margin: 2rem 0 .75rem; font-size: 1.1rem; opacity: .8; }

.me { max-width: 720px; margin: 0 auto; padding: 1rem; }
.me h2 { margin-top: 2rem; }
.card-box { border: 1px solid rgba(255,255,255,.1); border-radius: 14px; padding: 1rem 1.2rem; margin: .75rem 0; background: rgba(255,255,255,.03); }
.card-box.muted { opacity: .6; }
.card-box ul { margin: .3rem 0 .8rem 1.1rem; }
.card-box h3 { margin: 0 0 .3rem; font-size: 1rem; }
#calform input { flex: 1; }

.fb { display: flex; gap: .3rem; margin-top: .35rem; }
.fb button { background: none; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; padding: .1rem .5rem; cursor: pointer; opacity: .6; }
.fb button.on { opacity: 1; border-color: #f47ba0; }
.auth { max-width: 420px; margin: 3rem auto; padding: 1rem; }
.auth form { display: grid; gap: .8rem; }
.auth label { display: grid; gap: .3rem; font-size: .9rem; }
.auth input { padding: .7rem .8rem; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: rgba(0,0,0,.25); color: inherit; font: inherit; }
.btn.google { display: flex; align-items: center; justify-content: center; gap: .6rem; background: #fff; color: #222; text-decoration: none; }
.auth .or { text-align: center; margin: .8rem 0 0; }

/* advisor.my: no photos/videos/custom characters */
body.advisor #askphoto, body.advisor #askvideo, body.advisor #asktalk, body.advisor .card.new, body.advisor #newportrait, body.advisor #socialbox { display: none !important; }

.msg .pic audio { width: 260px; max-width: 100%; display: block; margin-top: .4rem; }
.msg .pic video { width: 320px; max-width: 100%; border-radius: 14px; display: block; margin-top: .4rem; }

#ilhsign { display: flex; justify-content: center; margin-top: .6rem; text-decoration: none; }
#ilhsign[hidden], .btn.google[hidden] { display: none !important; }
