/* The console: inside the computer. Three glass panes over the mountain, one tab bar on phones. */

body.console { min-height: 100svh; background: #e3e6e9; overflow-x: hidden; }
.c-bg { position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden; }
.c-bg .img { position: absolute; inset: -4%; background: url('../img/everest-blur.webp') center / cover no-repeat; opacity: .9; filter: saturate(.9); }
.c-bg .img.sharp { background-image: url('../img/everest-960.webp'); opacity: 0; transition: opacity 1s; filter: blur(14px) saturate(.9); }
.c-bg .img.sharp.ready { opacity: .85; }
.c-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(236, 238, 240, .5), rgba(226, 230, 233, .74) 40%, rgba(220, 224, 228, .9)); }
.c-bg .fog { opacity: .35; bottom: 0; height: 45%; }

.ctop { position: sticky; top: 0; z-index: 40; background: rgba(240, 242, 244, .62); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); border-bottom: 1px solid rgba(255, 255, 255, .6); }
.ctop .bar { display: flex; align-items: center; gap: 10px; height: 62px; padding: 0 clamp(12px, 2vw, 22px); }
.ctop .brand { margin-right: 6px; }
.ctop .crumbs { font-family: var(--mono); font-size: 12px; color: var(--stone); margin-right: auto; }
.pill { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 12px; border-radius: 99px; font-size: 13px; white-space: nowrap; border: 1px solid rgba(12, 14, 17, .08); background: rgba(255, 255, 255, .55); }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: var(--stone); }
.pill.ok i { background: #3fae7a; box-shadow: 0 0 0 3px rgba(63, 174, 122, .18); }
.pill.warn i { background: var(--warn); }
.pill.bad i { background: var(--bad); }
button.pill { cursor: pointer; }
.wallet-btn img { width: 18px; height: 18px; border-radius: 5px; }
@media (max-width: 760px) { .ctop .crumbs, .ctop .net { display: none; } .ctop .brand small { display: none; } .ctop .bar { height: 56px; } }

.prelim-bar { display: none; align-items: center; gap: 10px; padding: 9px clamp(12px, 2vw, 22px); font-size: 13px; color: #6b4a14; background: linear-gradient(90deg, rgba(255, 214, 160, .55), rgba(255, 228, 196, .35)); border-bottom: 1px solid rgba(215, 154, 58, .25); }
.prelim-bar b { font-family: var(--mono); font-weight: 600; letter-spacing: .06em; font-size: 11.5px; padding: 2px 7px; border-radius: 6px; background: rgba(215, 154, 58, .22); }
body.prelim .prelim-bar { display: flex; }

/* the three panes */
.cgrid { display: grid; grid-template-columns: minmax(270px, 320px) minmax(0, 1fr) minmax(300px, 380px); gap: 14px; padding: 14px clamp(12px, 2vw, 22px) 22px; height: calc(100svh - 62px); }
body.prelim .cgrid { height: calc(100svh - 62px - 38px); }
.pane { min-height: 0; display: flex; flex-direction: column; border-radius: 20px; }
.pane > .ph { display: flex; align-items: center; gap: 10px; padding: 14px 16px 10px; }
.pane > .ph h2 { font-size: 15px; letter-spacing: -.01em; font-weight: 620; line-height: 1.2; }
.pane > .ph .carved { font-size: 10px; opacity: .55; margin-left: auto; }
.pane > .pb { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 16px 16px; overscroll-behavior: contain; }
.pane .pb::-webkit-scrollbar { width: 8px; } .pane .pb::-webkit-scrollbar-thumb { background: rgba(12, 14, 17, .12); border-radius: 8px; }

/* cards inside panes */
.card { border-radius: 14px; padding: 14px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(12, 14, 17, .06); margin-bottom: 10px; }
.card h3 { font-size: 14.5px; letter-spacing: -.01em; margin: 0 0 4px; }
.card p { margin: 0; font-size: 13.5px; color: var(--slate); }
.card .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; }
.card .row span:first-child { color: var(--stone); }
.card .row b { font-family: var(--mono); font-weight: 520; font-size: 12.5px; text-align: right; overflow: hidden; text-overflow: ellipsis; }
.card .actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.card.hero-card { padding: 20px; background: linear-gradient(140deg, rgba(255, 255, 255, .75), rgba(255, 255, 255, .4)); }
.card.hero-card h3 { font-size: 18px; margin-bottom: 6px; }
.card.sample { position: relative; }
.card.sample::before { content: 'sample'; display: table; margin: 0 0 8px auto; font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; background: rgba(215, 154, 58, .18); color: #8a5a12; }
.addr { font-family: var(--mono); font-size: 12px; }
.addr a { text-decoration: none; border-bottom: 1px dotted currentColor; }
.btn-xs { --h: 32px; padding: 0 12px; font-size: 13px; }
.btn-danger { color: #fff; background: linear-gradient(180deg, #d9685f, #b8463f); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn[disabled], .btn.is-off { opacity: .5; cursor: not-allowed; filter: grayscale(.4); }
.seg-l { display: inline-flex; padding: 3px; border-radius: 12px; background: rgba(12, 14, 17, .06); gap: 2px; }
.seg-l button { border: 0; background: none; height: 30px; padding: 0 11px; border-radius: 9px; font-size: 13px; color: var(--slate); }
.seg-l button[aria-pressed='true'] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .3); }

.holds { display: grid; gap: 6px; }
.hrow { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .45); border: 1px solid rgba(12, 14, 17, .05); }
.hrow .tk { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #fff; background: linear-gradient(140deg, #5b6470, #20252c); }
.hrow b { font-size: 13.5px; font-weight: 600; } .hrow small { display: block; font-size: 11.5px; color: var(--stone); }
.hrow .v { text-align: right; font-family: var(--mono); font-size: 12.5px; }
.hrow .v small { font-family: var(--sans); }
.total { font-size: 26px; font-weight: 620; letter-spacing: -.03em; margin: 2px 0 10px; }
.total small { font-size: 13px; font-weight: 450; color: var(--stone); letter-spacing: 0; margin-left: 4px; }

/* the session (dark glass: the computer's own screen) */
.session { color: var(--snow); background: linear-gradient(160deg, rgba(24, 30, 40, .86), rgba(10, 13, 20, .9)); border: 1px solid rgba(255, 255, 255, .1); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 30px 70px -30px rgba(0, 0, 0, .6); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); position: relative; overflow: hidden; }
.session::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: url('../img/topo.svg') center / cover no-repeat; filter: invert(1); opacity: .04; }
.session > .ph { border-bottom: 1px solid rgba(255, 255, 255, .07); }
.session > .ph img { width: 30px; height: 30px; }
.session > .ph small { display: block; font-family: var(--mono); font-size: 11px; color: rgba(244, 245, 246, .55); font-weight: 400; }
.session .live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #55c690; margin-right: 6px; box-shadow: 0 0 0 3px rgba(85, 198, 144, .2); }
.feed { display: flex; flex-direction: column; gap: 12px; padding: 16px 18px; }
.m { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: start; }
.m .av { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: rgba(255, 255, 255, .1); }
.m .av img { width: 30px; height: 30px; border-radius: 50%; }
.m .who { font-size: 12.5px; font-weight: 600; color: rgba(244, 245, 246, .9); }
.m .who small { font-weight: 400; color: rgba(244, 245, 246, .45); margin-left: 6px; font-family: var(--mono); font-size: 11px; }
.m .txt { font-size: 14.5px; line-height: 1.55; color: rgba(244, 245, 246, .88); margin-top: 2px; }
.m .txt p { margin: 0 0 6px; } .m .txt p:last-child { margin: 0; }
.m.me .av { background: linear-gradient(140deg, #e7e9ec, #b9bfc6); color: var(--ink); }
.steps { margin-top: 8px; font-family: var(--mono); font-size: 12px; line-height: 1.75; color: rgba(244, 245, 246, .62); padding: 8px 12px; border-radius: 10px; background: rgba(0, 0, 0, .25); border: 1px solid rgba(255, 255, 255, .06); }
.steps .k { color: #b7a8ff; } .steps .n { color: #ffbe9a; } .steps .s { color: #7fdcae; } .steps .w { color: #f3c97a; }
.draft { margin-top: 10px; border-radius: 14px; overflow: hidden; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); }
.draft .dh { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid rgba(255, 255, 255, .08); font-size: 13.5px; font-weight: 600; }
.draft .dh .chip { margin-left: auto; font-family: var(--mono); font-size: 10.5px; font-weight: 500; padding: 2px 8px; border-radius: 99px; background: rgba(255, 255, 255, .1); color: rgba(244, 245, 246, .7); }
.draft .dh .chip.merged { background: rgba(124, 102, 214, .35); color: #e0d8ff; }
.draft .dh .chip.open { background: rgba(63, 174, 122, .3); color: #bff0d6; }
.draft .dd { font-family: var(--mono); font-size: 12.5px; }
.draft .dd div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 12px; }
.draft .dd .minus { background: rgba(212, 96, 90, .14); color: #ffb3ad; }
.draft .dd .plus { background: rgba(63, 174, 122, .14); color: #9fe6c1; }
.draft .dd .meta { color: rgba(244, 245, 246, .55); font-size: 11.5px; }
.draft .ck { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 12px 0; }
.ckp { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 9px; border-radius: 99px; background: rgba(255, 255, 255, .07); color: rgba(244, 245, 246, .8); }
.ckp i { width: 8px; height: 8px; border-radius: 50%; background: var(--stone); }
.ckp.ok i { background: #55c690; } .ckp.no i { background: #e27d76; } .ckp.wait i { background: var(--warn); }
.draft .da { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; align-items: center; }
.draft .da small { color: rgba(244, 245, 246, .5); font-size: 12px; }
.session .btn-glass { color: var(--snow); background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .16); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12); }
.session .btn-glass:hover { background: rgba(255, 255, 255, .14); }
.composer { padding: 12px 14px 14px; border-top: 1px solid rgba(255, 255, 255, .07); position: relative; z-index: 1; }
.composer .chips { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
.composer .chips::-webkit-scrollbar { display: none; }
.composer .chips button { flex: none; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .06); color: rgba(244, 245, 246, .82); border-radius: 99px; padding: 6px 11px; font-size: 12.5px; }
.composer form { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); }
.composer form:focus-within { border-color: rgba(169, 214, 255, .55); box-shadow: 0 0 0 4px rgba(169, 214, 255, .12); }
.composer .at { font-family: var(--mono); font-size: 13px; color: #a9d6ff; }
.composer input { flex: 1; min-width: 0; height: 40px; border: 0; background: none; color: var(--snow); font: inherit; font-size: 15px; outline: none; }
.composer input::placeholder { color: rgba(244, 245, 246, .4); }
.composer form button { width: 40px; height: 40px; border-radius: 12px; border: 0; display: grid; place-items: center; color: var(--ink); background: linear-gradient(180deg, #fff, #d6dbe0); }
.composer form button svg { width: 16px; height: 16px; }

/* pull requests */
.prlist { display: grid; gap: 6px; }
.pr-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, .5); border: 1px solid rgba(12, 14, 17, .05); cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit; }
.pr-row:hover { background: rgba(255, 255, 255, .78); }
.pr-row[aria-current='true'] { border-color: rgba(111, 183, 233, .7); box-shadow: 0 0 0 3px rgba(111, 183, 233, .18); }
.pr-row .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: #3fae7a; }
.pr-row .ic.merged { background: #7c66d6; } .pr-row .ic.closed { background: #9aa1a9; }
.pr-row .ic svg { width: 14px; height: 14px; }
.pr-row b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-row small { font-size: 11.5px; color: var(--stone); }
.pr-row .id { font-family: var(--mono); font-size: 11.5px; color: var(--stone); }
.empty { text-align: center; padding: 28px 12px; color: var(--stone); font-size: 13.5px; }
.empty svg { width: 28px; height: 28px; margin: 0 auto 8px; opacity: .5; }
.prd { margin-top: 12px; }
.prd .diff { margin: 10px 0; }
.prd .checks { padding: 0; }
.prd .checks li { font-size: 13px; }

/* dialogs */
dialog.sheet { border: 0; padding: 0; width: min(460px, calc(100vw - 24px)); max-height: calc(100svh - 40px); border-radius: 22px; color: var(--ink); background: linear-gradient(150deg, rgba(250, 251, 252, .96), rgba(236, 239, 242, .94)); box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .55), inset 0 1px 0 #fff; overflow: auto; }
dialog.sheet::backdrop { background: rgba(12, 16, 24, .42); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet .sh { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; }
.sheet .sh h3 { font-size: 18px; letter-spacing: -.02em; margin: 0; }
.sheet .sh button { margin-left: auto; width: 34px; height: 34px; border-radius: 10px; border: 0; background: rgba(12, 14, 17, .06); display: grid; place-items: center; }
.sheet .sh button svg { width: 14px; height: 14px; }
.sheet .sb { padding: 6px 20px 20px; }
.sheet .sb > p { margin: 0 0 14px; color: var(--slate); font-size: 14px; }
.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; color: var(--slate); }
.field small { font-size: 12px; color: var(--stone); }
.field input, .field select, .field textarea { height: 44px; border-radius: 12px; border: 1px solid rgba(12, 14, 17, .12); background: rgba(255, 255, 255, .8); padding: 0 12px; font: inherit; font-size: 15px; color: var(--ink); width: 100%; }
.field textarea { height: auto; min-height: 70px; padding: 10px 12px; font-family: var(--mono); font-size: 12.5px; }
.field .inline { display: flex; gap: 8px; }
.wlist { display: grid; gap: 8px; }
.wopt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 14px; border: 1px solid rgba(12, 14, 17, .08); background: rgba(255, 255, 255, .7); font: inherit; text-align: left; cursor: pointer; }
.wopt:hover { background: #fff; border-color: rgba(111, 183, 233, .6); }
.wopt .wi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(160deg, #cfeb3a, #8fc41f); color: #0c0e11; font-weight: 800; font-size: 13px; flex: none; }
.wopt .wi.other { background: rgba(12, 14, 17, .08); color: var(--slate); }
.wopt .wi img { width: 36px; height: 36px; border-radius: 10px; }
.wopt b { display: block; font-size: 14.5px; font-weight: 600; }
.wopt small { font-size: 12.5px; color: var(--stone); }
.qr-box { display: grid; justify-items: center; gap: 10px; padding: 6px 0 4px; }
.qr-box .qr { width: 220px; height: 220px; padding: 10px; border-radius: 16px; background: #f4f5f6; box-shadow: inset 0 0 0 1px rgba(12, 14, 17, .08); }
.qr-box .qr svg { width: 100%; height: 100%; }
.note { font-size: 12.5px; color: var(--stone); margin-top: 10px; }
.status-line { font-size: 13px; margin-top: 10px; min-height: 18px; color: var(--slate); }
.status-line.err { color: #b0413b; }
.status-line.ok { color: #227a50; }
.tx-link { font-family: var(--mono); font-size: 12px; }

/* toasts */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none; }
.toast { pointer-events: auto; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; color: var(--snow); background: rgba(14, 18, 26, .92); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); animation: toast-in .3s cubic-bezier(.2, .8, .2, 1); }
.toast a { color: #a9d6ff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* phones: one pane at a time, a tab bar at the bottom */
.tabbar { display: none; }
@media (max-width: 1100px) and (min-width: 761px) {
  .cgrid { grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); }
  .pane.prs { grid-column: 1 / -1; height: auto; max-height: none; }
  .cgrid { height: auto; }
  .pane.session { height: calc(100svh - 92px); }
}
@media (max-width: 760px) {
  .cgrid { display: block; height: auto; padding: 10px 10px calc(78px + env(safe-area-inset-bottom)); }
  body.prelim .cgrid { height: auto; }
  .pane { display: none; }
  .pane.on { display: flex; }
  .pane.session.on { height: calc(100svh - 56px - 20px - 70px - env(safe-area-inset-bottom)); }
  body.prelim .pane.session.on { height: calc(100svh - 56px - 20px - 70px - 52px - env(safe-area-inset-bottom)); }
  .tabbar { display: grid; grid-template-columns: repeat(3, 1fr); position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 60; padding: 6px; border-radius: 20px; background: rgba(250, 251, 252, .82); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); border: 1px solid rgba(255, 255, 255, .8); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .45); }
  .tabbar button { border: 0; background: none; height: 48px; border-radius: 14px; display: grid; place-items: center; gap: 2px; font-size: 11.5px; font-weight: 560; color: var(--stone); position: relative; }
  .tabbar button svg { width: 18px; height: 18px; }
  .tabbar button[aria-selected='true'] { background: #fff; color: var(--ink); box-shadow: 0 4px 12px -6px rgba(0, 0, 0, .3); }
  .tabbar .badge { position: absolute; top: 5px; right: calc(50% - 20px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #3fae7a; color: #fff; font-size: 10px; line-height: 16px; }
  .prelim-bar { font-size: 12px; }
  .composer input { font-size: 16px; } /* no zoom on focus */
  .field input, .field select { font-size: 16px; }
  .toasts { bottom: calc(86px + env(safe-area-inset-bottom)); }
  body.console .companion { display: none; }
}
