:root {
  color-scheme: dark;
  --background: #0a090a;
  --text: #f6f4f2;
  --muted: #b4abaf;
  --line: #392f36;
  --accent: #ffd1bb;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  font: 15px/1.5 system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .48; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
p, h1, h2, h3 { margin: 0; }
h1 { font-size: clamp(2rem, 4.5vw, 3.35rem); line-height: 1.06; font-weight: 540; letter-spacing: -.065em; }
h2 { font-size: 1.1rem; font-weight: 590; }
h3 { font-size: .98rem; font-weight: 600; }
code, pre { font-family: var(--mono); }
code { overflow-wrap: anywhere; }
.header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; padding: .8rem clamp(1rem, 4vw, 3.75rem); min-height: 67px; border-bottom: 1px solid #282226; }
.wordmark, nav button { background: none; border: 0; padding: .45rem 0; min-height: 44px; }
.wordmark { display: flex; align-items: center; gap: 12px; justify-self: start; white-space: nowrap; font-weight: 650; font-size: 1.3rem; letter-spacing: -.055em; }
.mark { display:block; width:32px; height:32px; flex-shrink:0; background:currentColor; -webkit-mask:url('/site-assets/brand/portlift-mark.png') center / 145% no-repeat; mask:url('/site-assets/brand/portlift-mark.png') center / 145% no-repeat; }
nav { display: flex; flex-wrap: wrap; gap: 0 clamp(.6rem, 2vw, 2rem); }
nav button { position: relative; color: var(--muted); }
nav button:hover, nav button[aria-current] { color: var(--text); }
nav button[aria-current]::after { content: ''; position: absolute; inset: auto 0 3px; height: 1px; background: #d8c4c0; }
.local { justify-self: end; color: var(--muted); font: .73rem var(--mono); white-space: nowrap; }
.local span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: .35rem; background: #a4d5a3; }
main, footer { width: min(calc(100% - 2.25rem), 1216px); margin: auto; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: end; padding: clamp(1.75rem, 5vw, 3.3rem) 0 1.25rem; }
.section-head p { color: var(--muted); margin-top: .4rem; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 44px; padding: .45rem .83rem; border: 1px solid #655761; background: #161316; border-radius: 10px; white-space: nowrap; }
.button:hover:not(:disabled) { border-color: #e4cbca; }
.primary { background: #f6f0ee; border-color: #f6f0ee; color: #171215; font-weight: 640; }
.primary:hover:not(:disabled) { background: #ffe4d8; }
.status { margin-top: 1rem; padding: .65rem .85rem; border-left: 2px solid #e4b3a4; color: var(--accent); background: #21191d; }
.room { min-height: 475px; overflow: hidden; position: relative; isolation: isolate; border: 1px solid var(--line); border-radius: 13px; }
.planes { position: absolute; inset: 0; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, #3a2929, #191319 44%, #090809 80%); }
.planes::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse, transparent 42%, #080709d9); }
.planes > div { position: absolute; background-image: linear-gradient(90deg, #a28b8b32 1px, transparent 1px), linear-gradient(#a28b8b32 1px, transparent 1px); background-size: 72px 52px; }
.back-wall { inset: 16% 17% 20%; background-color: #120f13; border: 1px solid #50404a; }
.left-wall { inset: 0 80% 0 -10%; transform: perspective(240px) rotateY(32deg); transform-origin: left; }
.right-wall { inset: 0 -10% 0 80%; transform: perspective(240px) rotateY(-32deg); transform-origin: right; }
.ceiling { inset: -49% -18% 83%; transform: perspective(160px) rotateX(-49deg); transform-origin: bottom; mask-image: linear-gradient(transparent, black); }
.floor { inset: 79% -20% -64%; transform: perspective(200px) rotateX(53deg); transform-origin: top; mask-image: linear-gradient(black, transparent 88%); }
.room-label { position: relative; display: flex; justify-content: space-between; gap: .75rem; padding: .9rem 1.05rem; color: #e7d7d9; font: .72rem var(--mono); }
.room-card { position: absolute; display: grid; width: min(38%, 195px); min-height: 106px; align-content: end; gap: .15rem; padding: .85rem; border: 1px solid #76626e; border-radius: 8px; background: linear-gradient(145deg, #573d49, #261e27 60%, #171417); box-shadow: inset 0 1px #ffe0dc25, 0 8px 22px #0009; }
.room-card span { color: #e4d4d6; font: .66rem var(--mono); }
.room-card strong { font-size: 1.23rem; font-weight: 560; letter-spacing: -.04em; overflow-wrap: anywhere; }
.room-card small { color: #e0d4d8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.source-card { top: 12%; left: 10%; transform: perspective(330px) rotateY(12deg) rotate(-2deg); }
.destination-card { right: 9%; bottom: 5%; transform: perspective(330px) rotateY(-12deg) rotate(2deg); }
.path-form { position: absolute; width: min(77%, 575px); top: 37%; left: 50%; transform: translateX(-50%); }
.path-form select { margin-bottom: .65rem; }
.path-form label, .field label { display: block; color: #f1dce0; font-weight: 550; font-size: .82rem; margin-bottom: .3rem; }
.path-entry { display: flex; gap: .4rem; padding: .3rem; border: 1px solid #79656f; border-radius: 14px; background: #0d0b0d; box-shadow: 0 9px 30px #0009; }
.field .path-entry input { flex: 1; min-width: 0; padding: .45rem .55rem; background: none; border: 0; }
.source-picker { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 2rem; padding: 1rem 0 1.25rem; }
.field select, .field input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid #62545e; border-radius: 8px; background: #151216; padding: .4rem .6rem; }
.field p { margin-top: .25rem; color: var(--muted); font: .72rem/1.45 var(--mono); overflow-wrap: anywhere; }
.source-choice { margin-bottom: .75rem; }
.source-choice .button { margin-top: .4rem; }
.custom-source { align-self: start; padding: .45rem .7rem; border: 1px solid var(--line); border-radius: 8px; }
summary { cursor: pointer; min-height: 32px; padding: .18rem 0; }
.custom-source > .field { padding: .5rem 0; }
.field select + label, #copy-options, .field fieldset { margin-top: .75rem; }
.field fieldset { min-width: 0; padding: .45rem .65rem .25rem; border: 1px solid var(--line); border-radius: 8px; }
.field legend { padding: 0 .3rem; font-size: .8rem; color: var(--muted); }
.field .check { display: flex; align-items: baseline; gap: .45rem; margin: .4rem 0; }
.field .check input { width: auto; min-height: 0; accent-color: var(--accent); }
.input-row { display: flex; gap: .5rem; }
.content { border-top: 1px solid var(--line); padding: 1.25rem 0 2rem; }
.transfer { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.35rem; }
.transfer div { display: grid; gap: .2rem; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: 9px; background: #181318; }
.transfer span { color: var(--muted); font-size: .8rem; }
.transfer strong { font-size: 1.1rem; }
.transfer code, .muted { color: var(--muted); }
.transfer code { font-size: .78rem; }
.change-list { margin-top: .5rem; }
.change { border-top: 1px solid var(--line); padding: .5rem .15rem; }
.change summary { overflow-wrap: anywhere; }
.change code { font-size: .85rem; }
.change ul, .information ul { padding-left: 1.2rem; margin: .45rem 0; color: #e9dadc; }
.change pre { padding: .7rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .78rem; background: #1a1318; border: 1px solid var(--line); border-radius: 7px; margin: .25rem 0 .5rem; }
.badge { color: var(--accent); margin-left: .5rem; font: .73rem var(--mono); }
.information { padding-top: 1rem; }
.confirmation-list { display: grid; gap: .6rem; padding-top: 1rem; }
.confirmation-list label { display: flex; gap: .6rem; align-items: baseline; }
.confirmation-list input { accent-color: var(--accent); }
.actions { padding-top: 1.1rem; }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; padding-top: .65rem; }
.saved-section { border-top: 1px solid var(--line); padding-top: .85rem; margin-top: 1rem; }
.saved-section code { display: block; font-size: .78rem; color: var(--muted); }
.saved-section .input-row { flex-wrap: wrap; }
.saved-section select { flex: 1; min-width: 12rem; }
.saved-section .actions + .actions { padding-top: .4rem; }
.mcp-approvals { margin-bottom: 1rem; padding: .85rem 1rem; border: 1px solid #745747; border-radius: 9px; }
.key-row { display: flex; justify-content: space-between; align-items: center; gap: .65rem; border-top: 1px solid var(--line); padding: .55rem 0; }
.key-row code { color: var(--accent); }
.package-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.package-grid form { display: grid; justify-items: start; gap: .45rem; }
.package-grid label { margin-bottom: 0; }
.package-grid input[type=file] { padding: .52rem; }
.package-grid input[type=file]::file-selector-button { background: #272026; border: 1px solid #655761; color: var(--text); border-radius: 5px; margin-right: .45rem; }
.package-grid a { color: var(--accent); }
.activity { display: grid; grid-template-columns: minmax(220px, .65fr) minmax(0, 1.35fr); gap: 1.4rem; }
.history-item { width: 100%; border: 0; border-top: 1px solid var(--line); background: transparent; padding: .7rem .25rem; min-height: 44px; display: grid; gap: .1rem; text-align: left; }
.history-item:hover, .history-item[aria-pressed="true"] { background: #1b1519; }
.history-item small { color: var(--muted); }
.receipt { border: 1px solid var(--line); border-radius: 9px; padding: .9rem; overflow-wrap: anywhere; align-self: start; }
.receipt > p { margin: .3rem 0; }
footer { display: flex; gap: .8rem; justify-content: space-between; border-top: 1px solid var(--line); padding: 1rem 0; color: var(--muted); font-size: .78rem; }
@media (max-width: 620px) {
  .header { grid-template-columns: 1fr auto; gap: .15rem .7rem; padding: .45rem 1rem; }
  nav { grid-column: 1/-1; grid-row: 2; }
  .room { min-height: 460px; }
  .source-card { top: 12%; left: 7%; }
  .destination-card { right: 7%; bottom: 5%; }
  .path-form { top: 38%; width: 88%; }
  .path-entry .button { font-size: .8rem; padding-inline: .45rem; }
  .path-entry input { font-size: .88rem; }
  .source-picker, .activity, .transfer, .package-grid { grid-template-columns: 1fr; }
}

.awaiting-companion > :not(.connect-page) { display: none; }
.connect-page { max-width: 680px; padding: clamp(2rem, 8vw, 6rem) 0 3rem; }
.connect-page a { color: inherit; text-decoration: none; }
.connect-page > a:last-child { color: var(--accent); text-decoration: underline; }
.connect-panel { padding: clamp(1.25rem, 5vw, 2.6rem); margin: 1.25rem 0; border: 1px solid var(--line); background: #141014; }
.connect-panel > p, .connect-help p { color: var(--muted); margin: 1rem 0; }
.connect-panel p:empty { display: none; }
.connect-panel a.primary { color: #171215; }
.connect-help pre { padding: .65rem .8rem; margin: .75rem 0 1rem; border: 1px solid var(--line); white-space: pre-wrap; }
