/* h3apOS app: windows of an OS over the grain. */
.desktop { position: relative; z-index: 1; width: min(1180px, 92vw); margin: 0 auto; padding: calc(var(--k) * 96) 0 calc(var(--k) * 60); }
.win { border: 1px solid var(--outline); background: rgba(22, 22, 22, .8); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.win-bar { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--hair); font-size: 11.5px; color: var(--caption); }
.win-body { padding: 20px 20px 22px; }
.k { font-size: 12px; color: var(--dim); }
.v { margin-top: 8px; font-size: clamp(26px, 2.6vw, 40px); font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

.board { position: relative; }
.wins { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; transition: filter .4s ease-out, opacity .4s; }
.board[data-locked="true"] .wins { filter: blur(7px); opacity: .8; pointer-events: none; user-select: none; }
.w-heap { grid-column: 1; }
.w-empty { grid-column: 2; grid-row: span 2; }
.w-log { grid-column: 1; }
.w-stats { grid-column: 1 / -1; }

.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.meter-row { margin-top: 22px; }
.meter { position: relative; display: block; height: 16px; border: 1px solid var(--hair); }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width .4s; }
.meter .mark { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -2px; background: var(--coral); }
.gapline { margin-top: 14px; font-size: 13px; color: var(--dim); line-height: 1.6; }
.gapline b { color: var(--coral); font-weight: 500; }

.field { display: flex; flex-direction: column; gap: 8px; font-size: 12px; color: var(--dim); }
.field input { font: inherit; font-size: 20px; color: var(--ink); background: transparent; border: 1px solid var(--outline); padding: 10px 12px; outline: none; font-variant-numeric: tabular-nums; }
.field input:focus { border-color: var(--ink); }
.lines { margin-top: 16px; font-size: 13px; }
.lines > div { display: flex; justify-content: space-between; gap: 14px; padding: 10px 0; border-top: 1px solid var(--hair); }
.lines dt { color: var(--dim); }
.lines dd { text-align: right; font-variant-numeric: tabular-nums; }
.lines .strong dd { color: var(--coral); font-weight: 500; }
.run { margin-top: 20px; width: 100%; justify-content: center; }
.run:disabled { opacity: .45; cursor: not-allowed; }
.run:disabled:hover { background: transparent; color: var(--ink); border-color: var(--outline); }
.hint { margin-top: 12px; font-size: 12px; line-height: 1.6; color: var(--caption); }

.log { list-style: none; font-size: 12.5px; }
.log li { display: grid; grid-template-columns: 7em 1.3fr 1.1fr 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--hair); font-variant-numeric: tabular-nums; }
.log li:first-child { border-top: 0; }
.log li span:nth-child(2) { color: var(--coral); }
.log li span:first-child, .log li span:last-child { color: var(--caption); }
.log .empty-line { display: block; color: var(--caption); }

.gate-layer { position: absolute; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: clamp(30px, 8vh, 90px); transition: opacity .35s; }
.gate-layer.is-leaving { opacity: 0; }
.gate { width: min(440px, 90vw); background: rgba(24, 24, 24, .96); }
.gate h2 { font-size: 20px; font-weight: 500; line-height: 1.35; }
.gate p { margin-top: 8px; font-size: 13px; color: var(--dim); }
.wallets { list-style: none; display: grid; gap: 8px; margin: 20px 0 16px; }
.wallet { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 1px solid var(--outline); font-size: 14px; text-align: left; transition: background-color .25s, color .25s, border-color .25s; }
.wallet:hover { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.wallet img { width: 20px; height: 20px; }
.wallet[aria-busy="true"] { opacity: .6; }
.gate .none { color: var(--ink); margin-bottom: 14px; }

.notice { margin-bottom: 18px; }
.notice h2 { font-size: clamp(18px, 1.6vw, 24px); font-weight: 500; }
.notice p { margin-top: 8px; font-size: 13.5px; line-height: 1.6; color: var(--dim); }
.notice-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 16px; }

@media (max-width: 860px) {
  .desktop { padding-top: 80px; }
  .wins { grid-template-columns: minmax(0, 1fr); }
  .w-heap, .w-empty, .w-log, .w-stats { grid-column: 1; grid-row: auto; }
  .log li { grid-template-columns: 1fr 1fr; row-gap: 4px; }
}
.log li:has(.empty-line) { display: block; }
