/* ==========================================================================
   JULIJA GETTING A DREAM JOB — v3: dark red / dark green, grain, gold hairlines
   ========================================================================== */
:root {
  --bg: #0a1410;
  --bg-2: #0f1f18;
  --bg-3: #13271e;
  --red: #4a0c1a;
  --red-2: #6e1428;
  --red-3: #93233d;
  --green: #0f2c20;
  --green-2: #1a4a35;
  --green-3: #2f6f52;
  --gold: #c9a24d;
  --gold-2: #e6c77a;
  --gold-dim: rgba(201, 162, 77, 0.28);
  --gold-line: rgba(201, 162, 77, 0.18);
  --cream: #efe6d6;
  --cream-2: #bdb39f;
  --cream-3: #7f7a6a;
  --panel: rgba(255, 255, 255, 0.025);
  --panel-2: rgba(255, 255, 255, 0.05);
  --danger: #c9505f;
  --r: 14px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--cream); font-family: var(--sans); font-size: 15px; line-height: 1.55; min-height: 100vh; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--red-2); color: #fff; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.005em; margin: 0; line-height: 1.1; }

/* atmosphere ------------------------------------------------------------ */
.texture { position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 80% at 15% 0%, rgba(110, 20, 40, 0.55), transparent 55%),
    radial-gradient(90% 70% at 100% 100%, rgba(26, 74, 53, 0.55), transparent 60%),
    radial-gradient(60% 50% at 80% 10%, rgba(201, 162, 77, 0.08), transparent 60%),
    linear-gradient(180deg, #0c1912, #0a1410 60%, #0b120f); }
.texture::after { content: ""; position: absolute; inset: 0; opacity: .5; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='600' height='600'><filter id='m'><feTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='4' seed='7'/><feColorMatrix values='0 0 0 0 .9 0 0 0 0 .8 0 0 0 0 .6 0 0 0 .55 0'/></filter><rect width='600' height='600' filter='url(%23m)'/></svg>"); background-size: 600px 600px; }
.grain { position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: .16; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>"); }
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 1; background: radial-gradient(120% 100% at 50% 40%, transparent 55%, rgba(0, 0, 0, 0.55)); }

/* header ---------------------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 14px 28px; background: rgba(10, 20, 16, .7); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); border-bottom: 1px solid var(--gold-line); }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; }
.brand b { font-family: var(--serif); font-weight: 600; letter-spacing: .28em; font-size: 17px; background: linear-gradient(90deg, var(--gold-2), var(--gold) 60%, #a8863a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand i { font-family: var(--serif); font-style: italic; color: var(--cream-2); font-size: 15px; }
.tabs { display: flex; gap: 2px; margin-left: auto; }
.tabs button { border: 0; background: transparent; padding: 8px 14px; color: var(--cream-2); font-weight: 500; font-size: 14px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid transparent; transition: .2s var(--ease); letter-spacing: .02em; }
.tabs button:hover { color: var(--cream); }
.tabs button.active { color: var(--gold-2); border-bottom-color: var(--gold); }
.tabcount:empty { display: none; }
.tabcount { font-size: 10px; background: var(--red-2); color: #fff; padding: 1px 6px; border-radius: 999px; font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 8px; }
.sync { width: 6px; height: 6px; border-radius: 50%; background: var(--cream-3); }
.sync.ok { background: var(--green-3); box-shadow: 0 0 8px var(--green-3); }
.sync.err { background: var(--danger); }
.sync.busy { background: var(--gold); animation: pulse 1s infinite; }
.lang, .icon-btn { border: 1px solid var(--gold-line); background: transparent; border-radius: 8px; height: 34px; min-width: 34px; padding: 0 10px; font-weight: 600; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; color: var(--cream-2); transition: .2s; letter-spacing: .06em; }
.lang:hover, .icon-btn:hover { border-color: var(--gold); color: var(--gold-2); }

/* layout ---------------------------------------------------------------- */
#app { position: relative; z-index: 2; max-width: 1120px; margin: 0 auto; padding: 28px 28px 90px; }
.view[hidden] { display: none; }
.view-head { margin: 8px 0 26px; }
.view-head h2 { font-size: clamp(34px, 4.5vw, 48px); }
.view-head p { color: var(--cream-2); max-width: 58ch; margin: 8px 0 0; }
.eyebrow { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.eyebrow b { color: var(--gold-2); }
.hair { height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); }

/* stage ----------------------------------------------------------------- */
.stage { display: grid; grid-template-columns: 1fr 1.05fr; gap: 0; margin-bottom: 34px; border: 1px solid var(--gold-line); border-radius: 22px; overflow: hidden; background: linear-gradient(120deg, rgba(74, 12, 26, .55), rgba(15, 31, 24, .6) 55%, rgba(15, 44, 32, .55)); box-shadow: var(--shadow); position: relative; }
.stage::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 25% 50%, rgba(147, 35, 61, .35), transparent 60%); pointer-events: none; }
.gem-wrap { position: relative; min-height: 340px; display: grid; place-items: center; }
.gem-wrap canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; display: block; }
.gem-css { display: none; width: 150px; height: 150px; position: relative; }
.gem-fallback-on .gem-css { display: block; }
.gem-fallback-on canvas { display: none; }
.gem-css::before, .gem-css::after { content: ""; position: absolute; top: 0; width: 75px; height: 120px; border-radius: 75px 75px 0 0; background: linear-gradient(160deg, #b3304c, #4a0c1a); transform: rotate(-45deg); transform-origin: 0 100%; left: 75px; box-shadow: inset -10px -10px 30px rgba(0,0,0,.4), 0 20px 60px rgba(147,35,61,.5); }
.gem-css::after { left: 0; transform: rotate(45deg); transform-origin: 100% 100%; }
.hud { padding: 40px 42px; display: flex; flex-direction: column; justify-content: center; gap: 10px; border-left: 1px solid var(--gold-line); position: relative; }
.hud h1 { font-size: clamp(36px, 4.6vw, 54px); font-style: italic; font-weight: 500; color: var(--cream); }
.xpbar { height: 3px; background: rgba(255,255,255,.08); margin-top: 8px; position: relative; overflow: hidden; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); transition: width 1s var(--ease); box-shadow: 0 0 12px rgba(230,199,122,.6); }
.xpline { margin: 0; font-size: 13px; color: var(--cream-2); }
.hud-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; }
.daily, .streak { display: inline-flex; align-items: center; gap: 10px; padding: 10px 14px; border: 1px solid var(--gold-line); border-radius: 10px; font-size: 13px; background: rgba(0,0,0,.18); }
.daily b { font-family: var(--serif); font-size: 20px; font-weight: 600; color: var(--gold-2); }
.daily.done { border-color: rgba(47,111,82,.6); }
.daily.done b { color: var(--green-3); }
.streak.none { color: var(--cream-2); }
.streak .dots { display: inline-flex; gap: 3px; }
.streak .dots i { width: 5px; height: 5px; border-radius: 50%; background: rgba(239,230,214,.15); }
.streak .dots i.on { background: var(--gold); box-shadow: 0 0 6px var(--gold); }
.whisper { margin: 14px 0 0; font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--cream-2); }

/* filters --------------------------------------------------------------- */
.filters { display: grid; gap: 12px; margin-bottom: 20px; }
.search { display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; border-radius: 10px; background: rgba(0,0,0,.2); border: 1px solid var(--gold-line); color: var(--cream-3); transition: .2s; }
.search:focus-within { border-color: var(--gold-dim); color: var(--cream); }
.search input { flex: 1; background: transparent; border: 0; outline: 0; height: 100%; color: var(--cream); font-size: 15px; }
.search input::placeholder { color: var(--cream-3); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chip { border: 1px solid var(--gold-line); background: transparent; padding: 7px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--cream-2); transition: .18s var(--ease); letter-spacing: .01em; }
.chip:hover { border-color: var(--gold-dim); color: var(--cream); }
.chip.on { background: var(--gold); border-color: var(--gold); color: #1a1409; font-weight: 600; }
.chip.on.red { background: var(--red-3); border-color: var(--red-3); color: #fff; }
.chip.on.green { background: var(--green-3); border-color: var(--green-3); color: #fff; }
.chip.sep { border: 0; width: 1px; height: 18px; padding: 0; background: var(--gold-line); border-radius: 0; margin: 0 4px; }
.chip.ghost { border-color: transparent; color: var(--cream-3); }
.chip.ghost:hover, .chip.ghost.on { color: var(--gold-2); background: transparent; border-color: var(--gold-line); }
.chip .n { font-size: 11px; opacity: .65; margin-left: 2px; }
.more { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--gold-line); border-radius: 12px; background: rgba(0,0,0,.18); animation: rise .3s var(--ease); }
.more[hidden] { display: none; }
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
select { appearance: none; -webkit-appearance: none; background: transparent url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%23bdb39f' stroke-width='1.6'/></svg>") no-repeat right 12px center; border: 1px solid var(--gold-line); color: var(--cream-2); padding: 8px 32px 8px 12px; border-radius: 8px; font-size: 13px; }
select:focus { outline: none; border-color: var(--gold-dim); }
select option { background: var(--bg-2); color: var(--cream); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--cream-2); cursor: pointer; }
.toggle input { accent-color: var(--gold); }
.count { margin-left: auto; color: var(--cream-3); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
.updated { color: var(--cream-3); font-size: 12px; text-align: center; margin: 30px 0 0; }

/* cards ----------------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 20px 20px 14px; border-radius: var(--r); background: linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.12)); border: 1px solid var(--gold-line); transition: transform .25s var(--ease), border-color .25s, box-shadow .25s; animation: rise .4s var(--ease) both; cursor: pointer; }
.card:hover { transform: translateY(-2px); border-color: var(--gold-dim); box-shadow: 0 16px 40px rgba(0,0,0,.35); }
.card.dream { border-color: var(--gold-dim); background: linear-gradient(160deg, rgba(201,162,77,.12), rgba(110,20,40,.18) 55%, rgba(0,0,0,.12)); }
.card.dream:hover { border-color: var(--gold); box-shadow: 0 16px 50px rgba(201,162,77,.12); }
.card.creative { background: linear-gradient(160deg, rgba(147,35,61,.16), rgba(0,0,0,.12) 70%); }
.card.handled { opacity: .5; }
.card.handled:hover { opacity: .85; }
.c-top { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--cream-3); min-height: 16px; }
.c-top .tier { color: var(--gold-2); font-weight: 600; }
.c-top .tier.creative { color: #e08aa0; }
.c-top .stu { color: var(--green-3); font-weight: 600; }
.c-top .new { color: var(--cream); }
.c-top .src { margin-left: auto; letter-spacing: .06em; text-transform: none; }
.card h3 { font-size: 23px; line-height: 1.15; font-weight: 500; }
.card .who { color: var(--cream-2); font-size: 13.5px; margin: 0; }
.card .who b { color: var(--cream); font-weight: 500; }
.card .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--cream-3); font-size: 12.5px; margin: 2px 0 0; }
.card .meta .soon { color: var(--gold-2); } .card .meta .urgent { color: var(--danger); }
.card .meta .pay { color: var(--green-3); }
.card .acts { display: flex; gap: 6px; align-items: center; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--gold-line); }
.abtn { border: 1px solid var(--gold-line); background: transparent; color: var(--cream-2); padding: 7px 12px; border-radius: 8px; font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: .18s; white-space: nowrap; letter-spacing: .02em; }
.abtn:hover { color: var(--cream); border-color: var(--gold-dim); }
.abtn.primary { background: var(--gold); color: #1a1409; border-color: var(--gold); }
.abtn.primary:hover { background: var(--gold-2); border-color: var(--gold-2); }
.abtn.on { background: var(--green-2); border-color: var(--green-2); color: #dff5e8; }
.abtn.saved { color: var(--gold-2); border-color: var(--gold-dim); }
.abtn.ghost { border-color: transparent; color: var(--cream-3); padding: 7px 8px; }
.abtn.ghost:hover { color: var(--cream); }
.xp { margin-left: auto; font-family: var(--serif); font-weight: 600; color: var(--gold-2); font-size: 16px; white-space: nowrap; }
.empty { text-align: center; padding: 60px 20px; color: var(--cream-2); }
.empty h3 { font-size: 26px; margin-bottom: 6px; }
.loading { grid-column: 1/-1; text-align: center; padding: 60px; color: var(--cream-2); font-family: var(--serif); font-style: italic; font-size: 22px; }
.loading i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); margin-right: 12px; animation: pulse 1s infinite; }

/* drawer ---------------------------------------------------------------- */
.drawer-bg { position: fixed; inset: 0; background: rgba(5, 10, 8, .65); backdrop-filter: blur(4px); z-index: 40; animation: fade .25s; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100%); z-index: 41; background: var(--bg-2); border-left: 1px solid var(--gold-line); overflow-y: auto; padding: 24px 28px 48px; box-shadow: var(--shadow); animation: slide .35s var(--ease); }
.drawer[hidden], .drawer-bg[hidden], .modal-bg[hidden] { display: none; }
.d-head { display: flex; align-items: center; gap: 12px; }
.d-close { margin-left: auto; flex: none; }
.drawer h2 { font-size: 32px; line-height: 1.1; margin: 14px 0 8px; }
.d-who { color: var(--cream-2); font-size: 15px; }
.d-who b { color: var(--cream); font-weight: 500; }
.d-logo { width: 52px; height: 52px; border-radius: 10px; background: #fff; object-fit: contain; padding: 4px; flex: none; }
.d-stage { display: flex; align-items: center; gap: 10px; margin: 18px 0; padding: 12px 14px; border: 1px solid var(--gold-line); border-radius: 10px; font-size: 13px; flex-wrap: wrap; color: var(--cream-2); }
.pill { padding: 4px 10px; border-radius: 999px; font-weight: 600; font-size: 12px; background: var(--panel-2); color: var(--cream); }
.pill.saved { color: var(--gold-2); border: 1px solid var(--gold-dim); background: transparent; }
.pill.applied { background: var(--green-2); color: #dff5e8; }
.pill.interview { background: var(--red-2); color: #fff; }
.pill.offer { background: var(--gold); color: #1a1409; }
.pill.rejected { background: rgba(239,230,214,.08); color: var(--cream-2); }
.d-acts { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 22px; }
.d-acts .abtn { padding: 10px 14px; font-size: 13.5px; }
.d-sec { margin: 20px 0; }
.d-sec h4 { font-family: var(--sans); text-transform: uppercase; letter-spacing: .2em; font-size: 10.5px; color: var(--gold); margin: 0 0 8px; font-weight: 600; }
.d-sec p { margin: 0; color: var(--cream-2); white-space: pre-line; line-height: 1.6; }
.d-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.d-kv div { padding: 10px 12px; border: 1px solid var(--gold-line); border-radius: 8px; font-size: 13px; }
.d-kv small { display: block; color: var(--cream-3); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; }
.d-kv b { font-weight: 500; color: var(--cream); }
.d-contact { display: flex; gap: 8px; flex-wrap: wrap; }
.d-contact a { text-decoration: none; }
.why { display: flex; gap: 6px; flex-wrap: wrap; }
.why span { padding: 4px 9px; border-radius: 6px; border: 1px solid var(--gold-line); color: var(--gold-2); font-size: 12px; }
textarea.note { width: 100%; min-height: 90px; resize: vertical; background: rgba(0,0,0,.2); border: 1px solid var(--gold-line); border-radius: 10px; padding: 10px 12px; color: var(--cream); outline: none; }
textarea.note:focus { border-color: var(--gold-dim); }
.d-next { display: grid; gap: 6px; }
.d-next button { text-align: left; }

/* kanban ---------------------------------------------------------------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.kcol { border: 1px solid var(--gold-line); border-radius: var(--r); padding: 12px; min-height: 160px; display: flex; flex-direction: column; gap: 8px; background: rgba(0,0,0,.12); }
.kcol h3 { font-family: var(--sans); font-size: 10.5px; text-transform: uppercase; letter-spacing: .2em; color: var(--cream-2); display: flex; justify-content: space-between; padding: 4px 6px 8px; font-weight: 600; }
.kcol h3 b { color: var(--cream-3); }
.kcol.offer h3 { color: var(--gold-2); } .kcol.interview h3 { color: #e08aa0; } .kcol.applied h3 { color: var(--green-3); } .kcol.saved h3 { color: var(--gold); }
.kcard { background: var(--bg-2); border: 1px solid var(--gold-line); border-radius: 10px; padding: 12px; cursor: pointer; transition: .2s; }
.kcard:hover { border-color: var(--gold-dim); transform: translateY(-2px); }
.kcard b { display: block; font-family: var(--serif); font-size: 17px; font-weight: 500; line-height: 1.2; }
.kcard small { color: var(--cream-2); font-size: 12px; display: block; margin-top: 4px; }
.kcard .kd { color: var(--cream-3); font-size: 11px; margin-top: 6px; }
.kcard .note-flag { color: var(--gold-2); }

/* start / prologue -------------------------------------------------------- */
.prolog-bar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding: 14px 18px; border: 1px solid var(--gold-line); border-radius: 12px; }
.prolog-bar .bar { flex: 1; height: 2px; background: rgba(255,255,255,.08); overflow: hidden; }
.prolog-bar .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green-3), var(--gold)); transition: width .5s var(--ease); }
.start-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.task { display: grid; grid-template-columns: 44px 1fr; gap: 14px; padding: 20px; border-radius: var(--r); border: 1px solid var(--gold-line); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.12)); transition: .25s var(--ease); animation: rise .4s var(--ease) both; }
.task.done { border-color: rgba(47,111,82,.5); background: linear-gradient(160deg, rgba(26,74,53,.25), rgba(0,0,0,.12)); }
.task .t-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; font-size: 22px; border: 1px solid var(--gold-line); }
.task h3 { font-size: 23px; }
.task p { margin: 6px 0 12px; color: var(--cream-2); font-size: 13.5px; line-height: 1.55; }
.task .t-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.task .t-foot .xp { margin-left: auto; }
.money { margin-top: 26px; padding: 24px; border-radius: var(--r); border: 1px solid var(--gold-line); background: linear-gradient(140deg, rgba(26,74,53,.35), rgba(74,12,26,.25)); }
.money h3 { font-size: 28px; }
.money p { color: var(--cream-2); margin: 6px 0 14px; max-width: 60ch; }
.money .calc { display: flex; gap: 18px; align-items: end; flex-wrap: wrap; }
.money label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--cream-3); }
.money input[type=range] { width: 200px; accent-color: var(--gold); }
.money .val { font-family: var(--serif); font-size: 24px; color: var(--cream); text-transform: none; letter-spacing: 0; }
.money .result { font-family: var(--serif); font-size: 40px; font-weight: 600; color: var(--gold-2); margin-left: auto; }
.money .note { font-size: 12.5px; color: var(--cream-3); margin: 12px 0 0; }
.money .row { display: flex; gap: 8px; margin-top: 12px; }

/* profile ---------------------------------------------------------------- */
.profile { display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.p-hero { border-radius: 22px; padding: 30px 24px; border: 1px solid var(--gold-line); background: linear-gradient(160deg, rgba(74,12,26,.5), rgba(15,31,24,.6)); text-align: center; position: relative; overflow: hidden; }
.p-hero .gem-css { display: block; margin: 20px auto 30px; }
.p-hero h2 { font-size: 36px; margin-top: 6px; }
.p-hero .lvl { color: var(--gold-2); font-family: var(--serif); font-style: italic; font-size: 18px; }
.p-hero .bar { height: 2px; background: rgba(255,255,255,.08); margin: 16px 0 8px; overflow: hidden; }
.p-hero .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), var(--gold-2)); }
.p-hero small { color: var(--cream-3); }
.p-side { display: grid; gap: 14px; align-content: start; }
.p-box { padding: 20px; border-radius: var(--r); border: 1px solid var(--gold-line); background: rgba(0,0,0,.12); }
.p-box h3 { font-size: 24px; margin-bottom: 12px; }
.p-box h3 small { font-family: var(--sans); font-weight: 500; color: var(--cream-3); font-size: 12px; margin-left: 8px; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats-grid div { padding: 12px; border: 1px solid var(--gold-line); border-radius: 10px; }
.stats-grid b { font-family: var(--serif); font-size: 30px; display: block; line-height: 1; color: var(--gold-2); }
.stats-grid small { color: var(--cream-2); font-size: 12px; }
.ach-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.ach { padding: 14px 10px; border-radius: 10px; border: 1px solid var(--gold-line); text-align: center; transition: .2s; }
.ach.on { border-color: var(--gold-dim); background: linear-gradient(160deg, rgba(201,162,77,.12), transparent); }
.ach .a-icon { font-size: 24px; filter: grayscale(1); opacity: .3; }
.ach.on .a-icon { filter: none; opacity: 1; }
.ach b { display: block; font-size: 12.5px; margin-top: 6px; font-weight: 600; }
.ach small { display: block; color: var(--cream-3); font-size: 11px; margin-top: 2px; line-height: 1.3; }
.ach.on small { color: var(--cream-2); }
.cal { display: grid; grid-template-columns: repeat(14, 1fr); gap: 5px; }
.cal div { aspect-ratio: 1; border-radius: 4px; background: rgba(239,230,214,.06); position: relative; }
.cal div.l1 { background: rgba(201,162,77,.35); } .cal div.l2 { background: rgba(201,162,77,.65); } .cal div.l3 { background: var(--gold); }
.cal div.today { outline: 1px solid var(--cream-2); }

/* modal ----------------------------------------------------------------- */
.modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(5,10,8,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .25s; }
.modal { width: min(520px, 100%); max-height: 90vh; overflow-y: auto; background: var(--bg-2); border: 1px solid var(--gold-dim); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); animation: rise .35s var(--ease); }
.modal h2 { font-size: 36px; margin-bottom: 10px; }
.modal h3 { font-size: 24px; }
.modal p { color: var(--cream-2); white-space: pre-line; }
.modal .row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.modal .row .abtn { padding: 11px 16px; font-size: 14px; }
.field { display: grid; gap: 6px; margin: 12px 0; }
.field label { font-size: 11px; text-transform: uppercase; letter-spacing: .14em; color: var(--cream-3); }
.field input, .field select { background: rgba(0,0,0,.2); border: 1px solid var(--gold-line); border-radius: 8px; padding: 10px 12px; color: var(--cream); outline: none; }
.field input:focus { border-color: var(--gold-dim); }
.modal hr { border: 0; border-top: 1px solid var(--gold-line); margin: 18px 0; }
.levelup { text-align: center; }
.levelup .big { font-family: var(--serif); font-size: 96px; line-height: 1; color: var(--gold-2); text-shadow: 0 0 40px rgba(230,199,122,.45); font-weight: 600; }
.levelup .gem-css { display: block; margin: 10px auto 16px; transform: scale(.8); }

/* toasts / confetti ------------------------------------------------------ */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; pointer-events: none; }
.toast { background: var(--cream); color: #1a1409; padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0,0,0,.45); animation: toast 2.8s var(--ease) forwards; display: flex; gap: 10px; align-items: center; white-space: nowrap; }
.toast .txp { font-family: var(--serif); color: var(--red-2); font-size: 16px; }
.toast.gold { background: linear-gradient(120deg, var(--gold-2), var(--gold)); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 55; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 7px; height: 12px; border-radius: 1px; animation: fall 2.4s linear forwards; }

/* keyframes ------------------------------------------------------------- */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes toast { 0% { opacity: 0; transform: translateY(16px); } 10%, 85% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }

/* responsive ------------------------------------------------------------ */
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; }
  .gem-wrap { min-height: 260px; }
  .hud { border-left: 0; border-top: 1px solid var(--gold-line); padding: 26px 24px 30px; }
  .profile { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(5, 230px); }
}
@media (max-width: 720px) {
  .top { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .brand i { display: none; }
  .tabs { order: 3; width: 100%; margin: 0; justify-content: space-between; border-top: 1px solid var(--gold-line); padding-top: 4px; }
  .tabs button { padding: 8px 6px; font-size: 13px; flex: 1; justify-content: center; }
  #app { padding: 16px 14px 90px; }
  .grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; padding: 18px 16px 48px; }
  .d-kv { grid-template-columns: 1fr; }
  .money .result { margin-left: 0; }
  .kanban { grid-template-columns: 1fr; overflow: visible; }
  .kcol { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .001s !important; transition-duration: .001s !important; } }

/* application template (v4) ------------------------------------------- */
.tpl { margin: 18px 0 8px; padding: 16px; border: 1px solid var(--gold-dim); border-radius: 12px; background: linear-gradient(160deg, rgba(201,162,77,.10), rgba(74,12,26,.18)); }
.tpl-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.tpl-head h4 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 500; color: var(--cream); }
.tpl-head small { color: var(--cream-2); font-size: 12.5px; }
.tpl-head .xp { margin-left: auto; }
.tpl-body { width: 100%; min-height: 230px; resize: vertical; background: rgba(0,0,0,.25); border: 1px solid var(--gold-line); border-radius: 10px; padding: 12px 14px; color: var(--cream); outline: none; font-family: var(--sans); font-size: 14px; line-height: 1.55; }
.tpl-body:focus { border-color: var(--gold-dim); }
.tpl-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tpl-acts .abtn { padding: 10px 14px; font-size: 13.5px; text-decoration: none; }
.d-stage .abtn { padding: 6px 10px; font-size: 12px; }
.c-top .tier { color: var(--gold-2); }

/* setup wizard + sticky bar (v5) --------------------------------------- */
.wiz-steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.wiz-steps span { flex: 1; height: 2px; background: rgba(255,255,255,.1); }
.wiz-steps span.on { background: var(--gold); box-shadow: 0 0 8px rgba(226,180,88,.5); }
.wiz-steps span.done { background: var(--green-3); }
.wiz-label { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.wiz ol { margin: 8px 0 12px; padding-left: 20px; color: var(--cream-2); font-size: 14px; line-height: 1.6; }
.drop { border: 1px dashed var(--gold-dim); border-radius: 12px; padding: 22px; text-align: center; color: var(--cream-2); cursor: pointer; transition: .2s; margin: 12px 0; }
.drop:hover, .drop.over { border-color: var(--gold); background: rgba(201,162,77,.06); }
.drop.ok { border-style: solid; border-color: rgba(47,111,82,.6); color: var(--cream); }
.drop b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 500; }
.drop small { color: var(--cream-3); }
.setup-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 45; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 14px; background: rgba(15,31,24,.92); border: 1px solid var(--gold-dim); backdrop-filter: blur(14px); box-shadow: 0 20px 50px rgba(0,0,0,.5); max-width: calc(100% - 28px); animation: rise .5s var(--ease); }
.setup-bar[hidden] { display: none; }
.setup-bar .txt { font-size: 13.5px; color: var(--cream); }
.setup-bar .steps { display: flex; gap: 10px; font-size: 12px; color: var(--cream-3); white-space: nowrap; }
.setup-bar .steps i { font-style: normal; display: inline-flex; align-items: center; gap: 5px; }
.setup-bar .steps i.ok { color: var(--green-3); }
.send-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: center; margin-top: 10px; }
.send-row input { background: rgba(0,0,0,.25); border: 1px solid var(--gold-line); border-radius: 8px; padding: 10px 12px; color: var(--cream); outline: none; font-size: 13.5px; min-width: 0; }
.send-row input:focus { border-color: var(--gold-dim); }
.sent-ok { color: var(--green-3); font-size: 13px; margin-top: 8px; }
@media (max-width: 720px) {
  .setup-bar { flex-wrap: wrap; gap: 8px; bottom: 10px; padding: 12px 14px; }
  .setup-bar .txt { width: 100%; }
  .send-row { grid-template-columns: 1fr; }
}
