/* CAELIS · The Ticket — gaya app. Token warna & huruf dari /js/shared/shared.css (tanpa emas). */
.app { --app-max: 1240px; --card: rgba(18, 20, 24, .72); --card-2: rgba(27, 30, 35, .78); --ok: #c9ced5; }
.app code { font: 12.5px var(--f-mono); color: var(--frost); background: rgba(201, 206, 213, .07); padding: 1px 5px; }
.muted { color: var(--fog); }
.muted-d { color: #4a4f57; font-weight: 500; }
.lbl { font: 400 10.5px/1 var(--f-mono); letter-spacing: .22em; text-transform: uppercase; color: var(--fog); }
.lbl em { font-style: normal; letter-spacing: .04em; text-transform: none; margin-left: 6px; }
.eyebrow { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font: 400 10.5px/1 var(--f-mono); letter-spacing: .24em; text-transform: uppercase; color: var(--fog); }
.crack { width: 22px; height: 7px; background: var(--blood); filter: drop-shadow(0 0 6px var(--blood-glow));
  clip-path: polygon(0 60%, 22% 30%, 38% 70%, 55% 10%, 70% 65%, 84% 35%, 100% 55%, 100% 75%, 84% 60%, 70% 95%, 55% 40%, 38% 100%, 22% 60%, 0 85%); }
.row-sp { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lnk { font-size: 12px; color: var(--fog); border-bottom: 1px solid var(--hair-2); padding-bottom: 1px; }
.lnk:hover { color: var(--frost); }

/* ===== langit di belakang kepala ===== */
.sky { position: absolute; inset: 0 0 auto; height: 640px; overflow: hidden; z-index: -1; pointer-events: none; }
.sky img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 26%; opacity: .5;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.6) 45%, transparent 100%); }
.sky::after { /* vinyet + penggelap kiri agar judul tetap tegas di atas tokoh dari belakang */
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5, 5, 7, .78) 0%, rgba(5, 5, 7, .2) 45%, rgba(5, 5, 7, .45) 100%), radial-gradient(120% 100% at 50% 20%, transparent 50%, rgba(5, 5, 7, .6)); }

.wrap { max-width: var(--app-max); margin: 0 auto; padding: 112px var(--pad) 40px; position: relative; }

/* ===== kepala ===== */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 26px; }
.head h1 { margin: 0; padding-bottom: .05em; font: 500 clamp(52px, 7vw, 104px)/.92 var(--f-display); letter-spacing: -.03em; }
.lede { margin: 14px 0 0; max-width: 520px; color: var(--silver); font-size: 15.5px; }
.head-r { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.netline { display: flex; gap: 18px; font-size: 12px; color: var(--fog); }
.net { display: inline-flex; align-items: center; gap: 7px; }
.net b { color: var(--silver); font-weight: 400; }
.net i { width: 6px; height: 6px; border-radius: 50%; background: var(--ash); }
.net i.on { background: var(--silver); box-shadow: 0 0 0 3px rgba(201, 206, 213, .12); }
.wallet { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border: 1px solid rgba(201, 206, 213, .3); background: linear-gradient(180deg, rgba(26, 28, 33, .85), rgba(9, 10, 12, .85)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 0 0 3px rgba(9, 10, 12, .8), inset 0 0 0 4px rgba(201, 206, 213, .07);
  font: 500 13px/1 var(--f-body); color: var(--frost); transition: border-color .3s, background-color .3s; }
.wallet:hover { border-color: var(--silver); }
.wallet-dot { width: 7px; height: 7px; border-radius: 50%; border: 1px solid var(--fog); }
.wallet.on .wallet-dot { background: var(--blood); border-color: var(--blood); box-shadow: 0 0 8px var(--blood-glow); }

.modeline { display: flex; align-items: center; gap: 14px; padding: 11px 16px; margin-bottom: 22px; border: 1px solid var(--hair); border-left: 2px solid var(--blood);
  background: rgba(10, 11, 13, .75); font-size: 13px; color: var(--silver); }
.mode-tag { flex: none; font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; color: var(--frost); }

/* ===== gerbang: lengkung gotik ===== */
.gates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.gate { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 32px 18px 18px; min-height: 160px; text-align: left;
  background: radial-gradient(100% 70% at 50% 0%, rgba(140, 148, 160, .1), transparent 70%), linear-gradient(180deg, rgba(24, 26, 31, .9), rgba(9, 10, 12, .92)); border: 1px solid rgba(201, 206, 213, .16);
  box-shadow: inset 0 0 0 4px rgba(9, 10, 12, .6), inset 0 1px 0 rgba(255, 255, 255, .05), 0 24px 40px -26px rgba(0, 0, 0, .9);
  border-radius: 120px 120px 3px 3px / 70px 70px 3px 3px; transition: border-color .35s, transform .45s var(--ease), background-color .35s; overflow: hidden; }
.gate::after { content: ''; position: absolute; left: 50%; top: 0; width: 1px; height: 22px; background: var(--hair-2); }
.gate:hover { border-color: var(--hair-2); transform: translateY(-2px); }
.gate[aria-pressed="true"] { border-color: rgba(214, 218, 224, .5); background: radial-gradient(80% 60% at 50% 0%, rgba(200, 24, 46, .2), transparent 70%), linear-gradient(180deg, rgba(30, 32, 37, .95), rgba(9, 10, 12, .95)); }
.gate[aria-pressed="true"]::after { background: var(--blood); box-shadow: 0 0 10px var(--blood-glow); height: 30px; }
.gate .num { font: 400 10.5px/1 var(--f-mono); letter-spacing: .3em; color: var(--fog); text-align: center; }
.gate[aria-pressed="true"] .num { color: #ff8492; }
.gate .name { font: 500 24px/1.1 var(--f-display); color: var(--frost); text-align: center; letter-spacing: -.01em; }
.gate .mix { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.gate .mix span { font: 11px/1 var(--f-mono); color: var(--silver); padding: 5px 7px; border: 1px solid var(--hair); }

/* ===== grid utama ===== */
.composer, .stubcol { min-width: 0; }
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 22px; align-items: start; }
.block { /* panel berlapis: gradasi grafit + garis terang tipis di atas, tanpa backdrop-filter */
  position: relative; background: linear-gradient(180deg, rgba(22, 24, 28, .92), rgba(12, 13, 16, .92)); border: 1px solid rgba(201, 206, 213, .14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 30px 60px -40px rgba(0, 0, 0, .9); padding: 22px; margin-bottom: 14px; }
.block::before { content: ''; position: absolute; left: 22px; right: 22px; top: -1px; height: 1px; background: var(--hair-metal); pointer-events: none; }

.paybox { display: flex; align-items: baseline; gap: 12px; margin: 14px 0 10px; border-bottom: 1px solid var(--hair-2); padding-bottom: 8px; }
.amount { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--frost); font-size: clamp(36px, 4.6vw, 54px); line-height: 1.1; padding: 0; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.unit { font: 500 16px/1 var(--f-display); letter-spacing: .14em; color: var(--fog); }
.bal { font-size: 12px; color: var(--fog); cursor: pointer; }
.sub { font-size: 13px; }
.quick { display: flex; gap: 6px; }
.quick button { font: 12px/1 var(--f-mono); padding: 7px 10px; border: 1px solid var(--hair); color: var(--silver); transition: border-color .25s, color .25s; }
.quick button:hover { border-color: var(--silver); color: var(--frost); }

/* ===== kaki ===== */
.legs-head { margin-bottom: 12px; }
.legs-tools { display: flex; align-items: center; gap: 14px; }
.sum { font-size: 12px; color: var(--silver); }
.sum.bad { color: #ff6b78; }
.legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.leg { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 14px 14px 12px;
  background: var(--card-2); border: 1px solid var(--hair); }
.leg.warn { border-color: rgba(200, 24, 46, .5); }
.sigil { grid-row: span 2; width: 52px; height: 52px; display: grid; place-items: center; position: relative;
  font: 500 10.5px/1 var(--f-mono); letter-spacing: .04em; color: var(--frost);
  background: radial-gradient(circle at 50% 35%, rgba(201, 206, 213, .16), rgba(201, 206, 213, .02) 70%);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.sigil::before { content: ''; position: absolute; inset: 1px; clip-path: inherit; border: 0; background: transparent; box-shadow: inset 0 0 0 1px var(--hair-2); }
.sigil[data-fam="xstock"] { background: radial-gradient(circle at 50% 35%, rgba(150, 160, 175, .2), rgba(150, 160, 175, .03) 70%); }
.leg-id { min-width: 0; }
.leg-id b { font: 600 15px/1.2 var(--f-body); color: var(--frost); }
.leg-id small { display: block; margin-top: 3px; font-size: 12px; color: var(--fog); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.leg-out { text-align: right; }
.leg-out b { display: block; font: 15px/1.2 var(--f-mono); color: var(--frost); }
.leg-out small { font: 11.5px/1.3 var(--f-mono); color: var(--fog); }
.leg-ctl { grid-column: 2 / 4; display: flex; align-items: center; gap: 12px; }
.leg-ctl input[type="range"] { flex: 1; min-width: 0; accent-color: var(--blood); height: 18px; }
.pct { width: 58px; flex: none; display: flex; align-items: center; border: 1px solid var(--hair); padding: 0 6px; }
.pct input { width: 100%; background: none; border: 0; outline: 0; color: var(--frost); font: 13px/28px var(--f-mono); text-align: right; padding: 0; }
.pct span { font: 12px var(--f-mono); color: var(--fog); margin-left: 2px; }
.leg-hype { flex: none; width: 92px; text-align: right; font: 12px var(--f-mono); color: var(--silver); }
.leg-x { flex: none; width: 26px; height: 26px; display: grid; place-items: center; color: var(--fog); }
.leg-x:hover { color: var(--frost); }
.leg-x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.leg-meter { grid-column: 1 / 4; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; margin-top: 4px; }
.meter { position: relative; height: 4px; background: rgba(201, 206, 213, .08); }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--silver); transition: width .5s var(--ease), background-color .3s; }
.meter.hot i { background: var(--blood); box-shadow: 0 0 8px var(--blood-glow); }
.meter::after { content: ''; position: absolute; left: 75%; top: -3px; bottom: -3px; width: 1px; background: var(--blood); opacity: .8; } /* garis 3% (skala 0–4%) */
.meter-k { font: 11.5px/1.3 var(--f-mono); color: var(--fog); white-space: nowrap; }
.meter-k b { color: var(--silver); font-weight: 400; }
.leg-warn { grid-column: 1 / 4; margin: 4px 0 0; font-size: 12.5px; color: #ff8a94; }
.leg-warn button { color: var(--frost); border-bottom: 1px solid rgba(255, 138, 148, .5); margin-left: 4px; }
.leg-err { grid-column: 1 / 4; margin: 2px 0 0; font-size: 12.5px; color: #ff8a94; }

.addrow[hidden] { display: none; }
.addrow { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--hair); }
.selectwrap { position: relative; flex: 1; max-width: 320px; }
.selectwrap select { width: 100%; appearance: none; -webkit-appearance: none; background: var(--ink); color: var(--frost); border: 1px solid var(--hair-2); padding: 10px 34px 10px 12px; font: 13px var(--f-body); border-radius: 0; }
.selectwrap::after { content: ''; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px; border-right: 1px solid var(--fog); border-bottom: 1px solid var(--fog); transform: translateY(-70%) rotate(45deg); pointer-events: none; }

.floorset { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--fog); max-width: 420px; }
.seg { display: flex; border: 1px solid var(--hair-2); flex: none; }
.seg button { font: 12.5px/1 var(--f-mono); padding: 10px 13px; color: var(--fog); transition: background-color .25s, color .25s; }
.seg button[aria-checked="true"] { background: var(--metal); color: #0b0b0d; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 -1px 0 rgba(0, 0, 0, .25); }

/* ===== stub tiket: tepi berlubang ===== */
.stubcol { position: sticky; top: 86px; }
.stub { position: relative; padding: 24px 24px 20px; border: 1px solid rgba(201, 206, 213, .26);
  background: radial-gradient(90% 50% at 100% 0%, rgba(200, 24, 46, .07), transparent 60%), linear-gradient(180deg, #17191d, #0b0c0f);
  box-shadow: inset 0 0 0 6px #0e0f12, inset 0 0 0 7px rgba(201, 206, 213, .08), 0 50px 90px -40px rgba(0, 0, 0, .95); }
.stub::before, .stub::after { content: ''; position: absolute; top: 0; bottom: 0; width: 8px;
  background: radial-gradient(circle at 50% 50%, var(--void) 3px, transparent 3.5px) 0 0 / 8px 14px repeat-y; }
.stub::before { left: -4px; } .stub::after { right: -4px; }
.stub-h { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; }
.stub-h img { width: 40px; height: auto; filter: drop-shadow(0 0 8px rgba(200, 24, 46, .3)); }
.stub-h small { font-size: 10.5px; letter-spacing: .16em; color: var(--fog); }
.stub-h b { display: block; font: 500 24px/1.12 var(--f-display); color: var(--frost); letter-spacing: -.01em; }
.stub-state { font-size: 10.5px; letter-spacing: .14em; color: var(--fog); padding: 5px 7px; border: 1px solid var(--hair); }
.stub-state.ok { color: var(--frost); border-color: var(--silver); }
.stub-state.bad { color: #ff8a94; border-color: rgba(200, 24, 46, .6); }
.stub-kv { margin: 16px 0 0; display: grid; gap: 7px; }
.stub-kv div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.stub-kv dt { color: var(--fog); } .stub-kv dt em { font-style: normal; color: var(--ash); margin-left: 4px; }
.stub-kv dd { margin: 0; color: var(--frost); text-align: right; }
.perf { height: 1px; margin: 16px -24px; background: repeating-linear-gradient(90deg, var(--hair-2) 0 6px, transparent 6px 11px); }
.stub-legs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.stub-legs li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; font-size: 13px; }
.stub-legs .s { color: var(--frost); font-weight: 600; }
.stub-legs .s small { font-weight: 400; color: var(--fog); margin-left: 6px; }
.stub-legs .o { font-family: var(--f-mono); color: var(--frost); text-align: right; }
.stub-legs .f { grid-column: 1 / 3; font: 11.5px var(--f-mono); color: var(--fog); }
.stub-legs li.short .o, .stub-legs li.short .f { color: #ff8a94; }
.stub-legs li.undone .o { text-decoration: line-through; color: var(--fog); }
.stub-time { margin: 12px 0 0; font-size: 11px; color: var(--ash); }
.result { margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--hair-2); font-size: 13px; line-height: 1.5; }
.result b { display: block; font: 500 10.5px/1 var(--f-mono); letter-spacing: .16em; margin-bottom: 7px; }
.result.ok { border-color: rgba(201, 206, 213, .45); background: rgba(201, 206, 213, .04); }
.result.bad { border-color: rgba(200, 24, 46, .55); background: rgba(126, 11, 25, .14); }
.result.bad b { color: #ff8a94; }
.result a { border-bottom: 1px solid var(--hair-2); }
.result .mono { font-size: 12px; color: var(--fog); }
.acts { display: grid; gap: 8px; }
.acts .btn { justify-content: center; width: 100%; }
.act-sign { background: transparent; color: var(--fog); box-shadow: inset 0 0 0 1px var(--hair-2); clip-path: none; }
.act-sign:not(:disabled) { background: var(--blood); color: var(--frost); box-shadow: none; }
.act-sign:not(:disabled):hover { background: #d81d34; }
.act-sign:disabled, .act-sim:disabled { cursor: not-allowed; opacity: .75; }
.act-sim[aria-busy="true"] { opacity: .6; }
.stub-note { margin: 12px 0 0; font-size: 12px; color: var(--fog); line-height: 1.5; }
.facts { margin: 14px 0 0; padding: 4px 16px; border: 1px solid var(--hair); background: rgba(10, 11, 13, .6); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--hair); font-size: 12.5px; }
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--fog); flex: none; } .facts dd { margin: 0; color: var(--silver); text-align: right; overflow-wrap: anywhere; }
.facts a { border-bottom: 1px solid var(--hair-2); }

/* ===== struk ===== */
.ledger { margin-top: 70px; }
.ledger-h { display: grid; grid-template-columns: auto minmax(0, 520px); justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.ledger-h h2 { margin: 0; font: 400 clamp(40px, 4.6vw, 60px)/1 var(--f-display); color: var(--frost); letter-spacing: -.025em; }
.ledger-h p { margin: 0; font-size: 13.5px; }
.ledger-list { background: var(--hair-metal) 0 0 / 100% 1px no-repeat; }
.ledger-empty { padding: 26px 0; color: var(--fog); font-size: 14px; }
.rc { display: grid; grid-template-columns: 120px minmax(0, 1fr) auto; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--hair); font-size: 13px; }
.rc .tag { font: 11px var(--f-mono); letter-spacing: .12em; color: var(--frost); }
.rc .legs-l { color: var(--silver); font-family: var(--f-mono); font-size: 12px; }
.rc a { color: var(--fog); font: 12px var(--f-mono); border-bottom: 1px solid var(--hair); }
.fine { margin: 50px 0 0; max-width: 820px; font-size: 12.5px; color: var(--fog); line-height: 1.6; }
.fine a { color: var(--silver); border-bottom: 1px solid var(--hair-2); }
.fine strong { color: var(--silver); }

/* ===== modal & toast ===== */
.modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.scrim { position: absolute; inset: 0; background: rgba(3, 3, 5, .76); backdrop-filter: blur(3px); }
.sheet { position: relative; width: min(420px, 100%); background: var(--ink); border: 1px solid var(--hair-2); padding: 20px; }
.sheet-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sheet-h h2 { margin: 0; font: 500 24px/1 var(--f-display); color: var(--frost); }
.x { width: 32px; height: 32px; display: grid; place-items: center; color: var(--fog); }
.x svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.wl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.wl button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--hair); text-align: left; font-size: 14px; color: var(--frost); }
.wl button:hover { border-color: var(--silver); }
.wl img { width: 26px; height: 26px; }
.wl .none { padding: 12px 0; color: var(--fog); font-size: 13.5px; }
.sheet-note { margin: 14px 0 0; font-size: 12px; color: var(--fog); }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; max-width: calc(100% - 32px); padding: 11px 16px;
  background: var(--ink); border: 1px solid var(--hair-2); border-left: 2px solid var(--blood); font-size: 13px; color: var(--frost); }

/* ===== responsif ===== */
@media (max-width: 1080px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .stubcol { position: static; }
  .gates { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .wrap { padding-top: 92px; }
  .head { flex-direction: column; align-items: stretch; gap: 18px; }
  .head-r { flex-direction: row; align-items: center; justify-content: space-between; }
  .netline { flex-direction: column; gap: 4px; }
  .modeline { flex-direction: column; align-items: flex-start; gap: 6px; }
  .gates { gap: 8px; }
  .gate { min-height: 132px; padding: 24px 10px 12px; border-radius: 90px 90px 3px 3px / 56px 56px 3px 3px; }
  .gate .name { font-size: 17px; }
  .gate .mix span { font-size: 10px; padding: 4px 5px; }
  .block { padding: 16px 14px; }
  .leg { grid-template-columns: 42px minmax(0, 1fr) auto; padding: 12px 10px; gap: 6px 10px; }
  .sigil { width: 42px; height: 42px; font-size: 9.5px; }
  .leg-ctl { grid-column: 1 / 4; }
  .leg-hype { width: auto; min-width: 74px; }
  .leg-meter { grid-template-columns: 1fr; }
  .floorset { flex-direction: column; align-items: stretch; }
  .seg button { flex: 1; }
  .stub { padding: 20px 16px 18px; }
  .perf { margin: 14px -16px; }
  .ledger-h { grid-template-columns: 1fr; }
  .rc { grid-template-columns: 1fr; gap: 6px; }
  .addrow { flex-direction: column; align-items: stretch; }
  .selectwrap { max-width: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
