@import url("/assets/r166/fonts.css?v=166");

/* R166 — visual-only premium shell. No JS, API, auth or data rules. */
:root{
  color-scheme:dark;
  --bg:#02060d;
  --bg2:#07111f;
  --panel:rgba(8,17,30,.88);
  --panel2:rgba(13,25,42,.9);
  --line:rgba(214,170,78,.22);
  --text:#fbf8f1;
  --muted:#aab4c3;
  --gold:#d6aa4e;
  --gold2:#f3d488;
  --cyan:#d6aa4e;
  --green:#49c993;
  --red:#ff7585;
  --shadow:0 28px 90px rgba(0,0,0,.48);
  --r:24px;
}

html{background:#02060d}
body{
  min-height:100vh;
  background:
    radial-gradient(circle at 86% 4%,rgba(214,170,78,.16),transparent 25rem),
    radial-gradient(circle at 8% 46%,rgba(113,79,29,.13),transparent 24rem),
    linear-gradient(155deg,#02060d 0%,#07111f 52%,#030912 100%);
  color:var(--text);
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}
body:before{
  opacity:.42;
  background-image:
    linear-gradient(rgba(243,212,136,.026) 1px,transparent 1px),
    linear-gradient(90deg,rgba(243,212,136,.026) 1px,transparent 1px);
  background-size:52px 52px;
}
body:after{
  content:"";
  position:fixed;
  z-index:-1;
  inset:0;
  pointer-events:none;
  background:linear-gradient(110deg,transparent 0 63%,rgba(214,170,78,.035) 63% 63.15%,transparent 63.15% 100%);
}

::selection{background:rgba(214,170,78,.32);color:#fff}
:focus-visible{outline:3px solid rgba(243,212,136,.38);outline-offset:3px}

.glass,.card{
  border:1px solid rgba(214,170,78,.2);
  background:
    linear-gradient(145deg,rgba(255,255,255,.055),rgba(255,255,255,.012)),
    rgba(7,16,29,.84);
  box-shadow:var(--shadow),inset 0 1px rgba(255,255,255,.055);
  backdrop-filter:blur(22px) saturate(115%);
  -webkit-backdrop-filter:blur(22px) saturate(115%);
}

.app-shell{
  width:min(492px,100%);
  padding:calc(18px + env(safe-area-inset-top)) 16px calc(108px + env(safe-area-inset-bottom));
}

.app-head{
  gap:12px;
  margin:3px 0 18px;
  padding:7px 4px;
}
.app-head .title b{font-size:1.03rem;font-weight:800;color:#fff}
.app-head .title small{font-size:.79rem;color:#929fb1}
.avatar{
  width:50px;
  height:50px;
  color:#1a1205;
  border:1px solid rgba(255,231,164,.5);
  background:linear-gradient(145deg,#f0d184,#ad7625);
  box-shadow:0 10px 28px rgba(214,170,78,.21);
}
.icon-btn{
  border-color:rgba(214,170,78,.24);
  background:rgba(214,170,78,.065);
  color:var(--gold2);
  box-shadow:inset 0 1px rgba(255,255,255,.04);
}

.app-logo{
  width:158px;
  height:168px;
  margin:0 auto 2px;
  object-fit:contain;
  filter:drop-shadow(0 15px 25px rgba(0,0,0,.42)) drop-shadow(0 0 18px rgba(214,170,78,.13));
}

.badge,.eyebrow{
  border-color:rgba(214,170,78,.38);
  background:linear-gradient(135deg,rgba(214,170,78,.14),rgba(214,170,78,.045));
  color:var(--gold2);
  padding:7px 13px;
  letter-spacing:0;
}

.center h1{font-size:clamp(1.45rem,6vw,1.9rem);line-height:1.45;margin:15px 0 5px}
.center>.muted{max-width:360px;margin:8px auto;color:#a7b1c0}

body:has(#authForm) .app-shell{
  display:grid;
  align-items:center;
  min-height:100svh;
  padding-top:24px;
  padding-bottom:24px;
}
body:has(#authForm) .card{
  position:relative;
  overflow:hidden;
  padding:24px 24px 22px;
  margin:0;
  border-color:rgba(214,170,78,.28);
}
body:has(#authForm) .card:before{
  content:"";
  position:absolute;
  inset:0 0 auto;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--gold2),transparent);
  opacity:.7;
}
body:has(#authForm) .bottom-nav{display:none}

.form{gap:13px;margin-top:18px}
.field{text-align:right}
.field label{color:#bdc5d0;font-weight:500}
.input,.composer textarea{
  border:1px solid rgba(214,170,78,.19);
  background:rgba(2,8,16,.8);
  box-shadow:inset 0 1px rgba(255,255,255,.025);
}
.input{min-height:52px}
.input>span{color:var(--gold2);font-weight:600}
.input input,.input textarea,.input select{caret-color:var(--gold2)}
.input:focus-within,.composer textarea:focus{
  border-color:rgba(243,212,136,.68);
  box-shadow:0 0 0 3px rgba(214,170,78,.095),inset 0 1px rgba(255,255,255,.035);
}
input::placeholder,textarea::placeholder{color:#637083;opacity:1}

.step-tabs{gap:7px;margin:18px 0 4px;padding:5px;border:1px solid rgba(214,170,78,.12);border-radius:17px;background:rgba(0,0,0,.17)}
.step-tabs button{border:0;background:transparent;padding:9px 8px}
.step-tabs button.active{
  border:1px solid rgba(214,170,78,.34);
  background:linear-gradient(135deg,rgba(214,170,78,.17),rgba(214,170,78,.06));
  color:#ffe5a1;
  box-shadow:0 7px 18px rgba(0,0,0,.18);
}

.btn{
  min-height:48px;
  border-radius:15px;
  font-weight:800;
  transition:transform .2s ease,filter .2s ease,box-shadow .2s ease;
}
.btn-gold,.btn-cyan,.composer button,.primary{
  color:#1b1204;
  background:linear-gradient(135deg,#b87b24 0%,#e1b85d 52%,#f3d488 100%);
  box-shadow:0 13px 30px rgba(185,125,38,.23),inset 0 1px rgba(255,255,255,.42);
}
.btn-ghost{
  color:#e7e9ed;
  border-color:rgba(214,170,78,.19);
  background:rgba(214,170,78,.045);
}
.btn:hover{filter:brightness(1.07);box-shadow:0 15px 34px rgba(185,125,38,.26)}

.dashboard-hero{
  min-height:218px;
  padding:22px;
  border-color:rgba(214,170,78,.3);
  background:
    radial-gradient(circle at 15% 25%,rgba(214,170,78,.17),transparent 43%),
    linear-gradient(140deg,rgba(13,25,42,.95),rgba(4,10,19,.92));
}
.dashboard-hero:before{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(115deg,transparent 65%,rgba(243,212,136,.06) 65% 65.5%,transparent 65.5%);
}
.dashboard-hero:after{
  content:"";
  left:10px;
  top:20px;
  width:132px;
  height:150px;
  opacity:.78;
  background:url("/assets/logo.png") center/contain no-repeat;
  filter:drop-shadow(0 12px 16px rgba(0,0,0,.35));
}
.dashboard-hero h1{font-size:1.95rem;color:#fff}
.dashboard-hero p{position:relative;z-index:1;max-width:270px;color:#aeb7c5;line-height:1.85}
.dashboard-hero .btn{position:relative;z-index:1}

.section{padding:18px 0 14px!important}
.service-grid.mobile{grid-template-columns:repeat(2,minmax(0,1fr));gap:11px}
.service-grid.mobile .service{
  min-height:200px;
  padding:17px;
  border-color:rgba(214,170,78,.15);
  background:linear-gradient(150deg,rgba(17,30,49,.88),rgba(6,14,25,.92));
}
.service .icon{
  width:47px;
  height:47px;
  display:grid;
  place-items:center;
  border-radius:15px;
  font-size:1.55rem;
  border:1px solid rgba(214,170,78,.22);
  background:rgba(214,170,78,.07);
}
.service h3{font-size:.98rem;margin:13px 0 4px}
.service p{font-size:.77rem;line-height:1.7;margin:0;color:#929eae}
.service footer{gap:8px;font-size:.78rem}
.service footer a{color:var(--gold2);font-weight:700}
.status{border-radius:999px}

.tool-grid{gap:9px}
.tool{
  min-height:68px;
  display:flex;
  align-items:center;
  padding:13px;
  border-color:rgba(214,170,78,.14);
  background:rgba(214,170,78,.035);
  color:#d9dde5;
  font-size:.83rem;
}

.bottom-nav{
  bottom:max(10px,env(safe-area-inset-bottom));
  width:min(460px,calc(100% - 20px));
  padding:7px;
  border-color:rgba(214,170,78,.24);
  border-radius:21px;
  background:rgba(3,9,17,.92);
  box-shadow:0 22px 58px rgba(0,0,0,.52),inset 0 1px rgba(255,255,255,.035);
}
.bottom-nav a{color:#7f8b9c;transition:background .2s,color .2s,transform .2s}
.bottom-nav a.active{
  color:#ffe5a1;
  background:linear-gradient(145deg,rgba(214,170,78,.18),rgba(214,170,78,.055));
  box-shadow:inset 0 0 0 1px rgba(214,170,78,.14);
}

.r163-logout-btn{
  font-family:var(--irannian-ui-font)!important;
  border-color:rgba(214,170,78,.24);
  background:rgba(3,10,19,.88);
  color:#d8dde6;
}

.chat-log{scrollbar-color:rgba(214,170,78,.38) transparent}
.bubble{line-height:1.9}
.bubble.user{background:rgba(214,170,78,.12);border-color:rgba(214,170,78,.26)}
.bubble.ai{background:rgba(15,29,47,.92);border-color:rgba(214,170,78,.16)}
.quick button{
  color:#d8dde5;
  border-color:rgba(214,170,78,.17);
  background:rgba(214,170,78,.04);
}
.composer button{color:#1b1204}

.talent-progress{background:rgba(255,255,255,.07)}
.talent-progress i,.bar i{background:linear-gradient(90deg,#ad7322,#f3d488)}
.choice{border-color:rgba(214,170,78,.14);background:rgba(255,255,255,.022)}
.choice:has(input:checked){border-color:rgba(243,212,136,.58);background:rgba(214,170,78,.1)}

.notice.info{background:rgba(214,170,78,.08);border-color:rgba(214,170,78,.22);color:#f3dba0}
.notice.ok{background:rgba(73,201,147,.09);border-color:rgba(73,201,147,.28)}
.notice.err{background:rgba(255,117,133,.09);border-color:rgba(255,117,133,.26)}

@media(max-width:560px){
  .app-shell{padding-inline:12px}
  .service-grid.mobile{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-hero:after{width:110px;height:132px;left:4px;top:34px}
}
@media(max-width:390px){
  body:has(#authForm) .card{padding:19px 16px}
  .app-logo{width:135px;height:142px}
  .service-grid.mobile{grid-template-columns:1fr}
  .service-grid.mobile .service{min-height:176px}
  .dashboard-hero:after{opacity:.35}
}
@media(prefers-reduced-motion:reduce){
  *,*:before,*:after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
