/* Portal app styles */
:root{ --bg:#0b0b0e; --panel:#111216; --panel2:#14161b; --text:#eae9e4; --muted:#a7a39a; --gold:#c99b2e; --gold-weak:rgba(201,155,46,.22); --line:rgba(255,255,255,.08); --veil:linear-gradient(90deg, rgba(201,155,46,.12), rgba(201,155,46,.06)); }
*{box-sizing:border-box}
body{margin:0; background:radial-gradient(1200px 700px at 60% -10%, rgba(201,155,46,.06), transparent), var(--bg); color:var(--text); font-family:Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial}
.noise{position:fixed; inset:0; pointer-events:none; opacity:.06; background-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"160\" height=\"160\"><filter id=\"n\"><feTurbulence baseFrequency=\"0.8\" numOctaves=\"2\"/></filter><rect width=\"100%\" height=\"100%\" filter=\"url(%23n)\" opacity=\"0.4\"/></svg>');}
.portal-header{position:sticky; top:0; z-index:10; display:flex; align-items:center; justify-content:space-between; padding:12px 18px; border-bottom:1px solid rgba(255,255,255,.08); background:linear-gradient(180deg, rgba(17,18,22,.9), rgba(17,18,22,.5)); backdrop-filter: blur(6px)}
.brand{display:flex; align-items:center; gap:10px; color:var(--text); text-decoration:none}
.logo{width:26px; height:26px; filter: drop-shadow(0 0 6px rgba(201,155,46,.4))}
.hud{display:flex; align-items:center; gap:10px; color:var(--muted)}
.hud .progress{width:160px; height:8px; background:#0f1116; border:1px solid rgba(255,255,255,.1); border-radius:10px; overflow:hidden}
.hud .progress i{display:block; height:100%; background:linear-gradient(90deg, rgba(201,155,46,.6), rgba(201,155,46,.2))}
.portal-main{width:min(1100px, 92%); margin:22px auto 40px; display:grid; gap:20px}
.grid{display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:14px}
.card{background:linear-gradient(180deg, var(--panel), var(--panel2)); border:1px solid var(--gold-weak); border-radius:16px; padding:16px; box-shadow:0 12px 40px rgba(0,0,0,.45)}
.card:hover{transform:translateY(-2px); transition:transform .15s}
.phase-head{display:flex; align-items:center; justify-content:space-between}
.phase-num{width:40px; height:40px; display:grid; place-items:center; border-radius:10px; border:1px solid var(--gold-weak); color:var(--gold); background:var(--veil);}
.progress-ring{height:6px; border-radius:99px; background:rgba(201,155,46,.14); overflow:hidden; margin-top:10px}
.progress-ring i{display:block; height:100%; width:0%; background:linear-gradient(90deg, var(--gold), #ffe7a3)}
.actions{display:flex; gap:10px; margin-top:14px}
.btn{border:1px solid rgba(255,255,255,.12); background:linear-gradient(180deg, #151621, #101219); color:var(--text); padding:10px 14px; border-radius:12px; cursor:pointer}
.btn.primary{border-color:var(--gold-weak); background:var(--gold); color:#0b0b0e; font-weight:700}
.btn.ghost{background:transparent}
.panel{padding:18px; border:1px solid var(--gold-weak); border-radius:16px; background:linear-gradient(180deg, rgba(17,18,22,.95), rgba(17,18,22,.7)); box-shadow:0 20px 80px rgba(0,0,0,.45)}
.hidden{display:none}
.top{display:flex; align-items:center; justify-content:space-between}
.prompt{padding:14px; border:1px solid rgba(255,255,255,.08); border-radius:12px; background:#14161b; margin-top:12px}
.prompt label{display:block; font-weight:600; margin-bottom:8px}
.input, textarea, select{width:100%; background:#0f1116; color:var(--text); border:1px solid rgba(255,255,255,.08); border-radius:10px; padding:10px}
.range{display:flex; align-items:center; gap:10px}
.range input[type=range]{width:100%}
.range .val{width:36px; text-align:right; color:var(--gold)}
.tagrow{display:flex; gap:8px; flex-wrap:wrap}
.tag{padding:6px 10px; background:#101218; border:1px solid rgba(255,255,255,0.12); border-radius:999px; cursor:pointer}
.tag.active{border-color: var(--gold-weak); color:var(--gold)}
.portal-footer{padding:18px; text-align:center; color:var(--muted)}
@media (max-width:640px){ .grid{grid-template-columns:1fr} }