.hud.top .name {
  font: 500 clamp(21px, 2.5vw, 37px)/1.05 Georgia, "Times New Roman", serif;
  text-transform: none;
  letter-spacing: -.035em;
  color: #fff0de;
  text-shadow: 0 1px 4px #150c08;
}
.hud.top nav.menu a {
  border-radius: 2px;
  font: 600 13px/1.2 system-ui, sans-serif;
  letter-spacing: .08em;
  color: #f0dfd3;
  text-shadow: 0 1px 4px #150c08;
}
.hud.top nav.menu a[aria-current="page"] {
  background: #eadecf;
  color: #352722;
  text-shadow: none;
}
.portfolio-panel {
  --paper: #f1e6d6;
  --paper-ink: #32231e;
  --paper-accent: #793d36;
  top: 50%;
  right: clamp(18px, 3vw, 56px);
  width: min(440px, 43vw);
  max-height: min(70dvh, 650px);
  display: flex;
  flex-direction: column;
  transform: translateY(-50%);
  z-index: 8;
  border-radius: 2px;
  background: var(--paper);
  color: var(--paper-ink);
  box-shadow: 0 16px 52px #1d0e0c90;
  font: 400 15px/1.7 system-ui, sans-serif;
}
.portfolio-panel[data-view="about"] { background-color: #f1e6d0; background-size: 420px auto; }
.portfolio-panel header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  padding: 22px 24px 14px;
}
.portfolio-panel h2 {
  margin: 0;
  font: 500 clamp(25px, 3vw, 38px)/1.12 Georgia, "Songti SC", serif;
  letter-spacing: -.025em;
}
.portfolio-panel h2:focus { outline: none; }
.portfolio-panel h3 { margin: 0 0 10px; font-size: 16px; }
.portfolio-panel button {
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid currentColor;
  border-radius: 2px;
  color: var(--paper-accent);
  background: transparent;
  font: 600 13px/1.1 system-ui, sans-serif;
  cursor: pointer;
}
.portfolio-body { overflow: auto; overscroll-behavior: contain; padding: 0 24px 24px; }
.portfolio-body p { margin: 0 0 14px; }
.portfolio-body .portfolio-intro { font-size: 18px; line-height: 1.55; }
.portfolio-body details { padding: 5px 0; }
.portfolio-body details > p { margin: 2px 0 10px; }
.portfolio-body summary { padding-block: 7px; font-weight: 650; cursor: pointer; }
.portfolio-links { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.portfolio-links li { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.portfolio-links a { color: var(--paper-accent); overflow-wrap: anywhere; }
.portfolio-panel :is(a,button,summary):focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
body:has(#portfolio-panel[data-view="work"]:not([hidden])) #panel { visibility: hidden; }
body:has(#gl:not(.ready)) #portfolio-panel { visibility: hidden; }
@media (max-width: 760px) {
  .hud.top nav.menu { gap: 4px; }
  .hud.top nav.menu a { font-size: 11px; letter-spacing: .025em; padding-inline: 6px; white-space: nowrap; }
  .portfolio-panel {
    inset: auto 12px calc(13px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: 50dvh;
    transform: none;
  }
  .portfolio-panel header { padding: 15px 18px 10px; }
  .portfolio-body { padding: 0 18px 18px; }
  .portfolio-panel button { min-height: 44px; }
}
.portfolio-work { margin: 6px 0 16px; }
.portfolio-work img { width: min(120px, 36%); max-height: 130px; object-fit: contain; float: right; margin: 0 0 10px 12px; }
.portfolio-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.portfolio-work::after { content: ""; display: block; clear: both; }
.portfolio-empty { color: #6c5549; }
#computer-link {
  left: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 7;
  border-color: #d29c71;
  font: 600 13px/1.15 system-ui, sans-serif;
  min-height: 34px;
}
body:has(#gl:not(.ready)) #computer-link,
body:is(.paneled,.pcnear,.zoomed,.liteup,.calcup) #computer-link { display: none; }
@media (max-width: 760px) {
  #computer-link { left: 50%; transform: translateX(-50%); bottom: calc(117px + env(safe-area-inset-bottom, 0px)); min-height: 44px; }
  body.tphone:has(#tstrip:not([hidden])) #computer-link { display: none; }
}
#experience {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  box-sizing: border-box;
  transform-origin: 0 0;
  overflow: hidden;
  border-radius: 4% / 5%;
  color: #f7e9dd;
  background: #171318;
  font: 16px/1.4 VT323, "Fusion Pixel", "PingFang SC", "Microsoft YaHei", monospace;
}
#experience:not([hidden]) { display: grid; grid-template-rows: auto minmax(0, 1fr); }
#experience[data-device="pc"] { background: #07120c; color: #bff0bc; }
#experience > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-bottom: 1px solid currentColor;
  border-bottom-color: color-mix(in srgb, currentColor 23%, transparent);
}
#experience h2 { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; margin: 0; font-size: 23px; font-weight: 600; line-height: 1.05; }
.experience-controls { display: flex; gap: 4px; flex-shrink: 0; }
#experience button {
  min-height: 25px;
  padding: 1px 5px;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-size: 11px;
  cursor: pointer;
}
#experience[data-cream] { background: #efe3c9; color: #493223; }
#experience[data-cream] > header { background: #e9dbbf; border-bottom-color: #ae9877; }
#experience[data-cream] button { background: #f2e7d0; border-color: #987c5d; color: #493223; }
#experience[data-cream] button:hover { background: #e2d1b0; }
#experience[data-cream] .experience-loading { background: #efe3c9; color: #493223; }
#experience button:disabled { opacity: .5; }
#experience button:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }
.experience-stage { min-width: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.experience-stage iframe { display: block; width: 100%; height: 100%; border: 0; }
#experience[data-loading] .experience-stage { visibility: hidden; }
.experience-loading { grid-row: 2; grid-column: 1; display: grid; align-content: center; justify-items: center; padding: 18px; text-align: center; }
.experience-loading[hidden] { display: none; }
.experience-loading p { margin: 0 0 8px; }
.tape-dinosaur { width: clamp(64px, 25%, 120px); height: auto; margin-bottom: 10px; image-rendering: pixelated; }
.experience-stage { grid-row: 2; grid-column: 1; }
.experience-guide {
  grid-row: 2;
  grid-column: 1;
  z-index: 1;
  overflow: auto;
  padding: 10px clamp(10px, 3vw, 24px);
  color: #d4f2cc;
  background: #0c1a12;
}
.experience-guide[hidden] { display: none; }
.experience-guide h3 { margin: 0 0 4px; font: inherit; font-size: 20px; }
.experience-guide dl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 3px 12px; margin: 0 0 8px; }
.experience-guide dt, .experience-guide dd { margin: 0; line-height: 1.25; }
.experience-guide dt { color: #9ad1a7; }
#experience .experience-guide button { border: 1px solid #8eb89c; }
#experience [data-controls][aria-expanded="true"] { background: #ffffff16; }
@media (max-width: 550px) {
  #experience[data-island] > header { display: grid; justify-content: stretch; }
  #experience[data-island] .experience-controls { flex-wrap: wrap; }
}
.experience-details { margin: auto; padding: clamp(12px, 3vw, 28px); font-size: 15px; }
.experience-details p:first-child { margin-top: 0; }
.experience-stage :is(video, img, audio) { display: block; max-width: 100%; margin: 8px auto; }
#experience[data-artwork] .experience-stage > img,
.experience-stage > video { width: 100%; height: calc(100% - 16px); object-fit: contain; }
#experience[data-film-fill]:not([hidden]) { grid-template-rows: minmax(0, 1fr); }
#experience[data-film-fill] > :is(.experience-stage, .experience-loading, header) { grid-row: 1; grid-column: 1; }
#experience[data-film-fill] > header { align-self: start; z-index: 1; background: #171318cf; }
#experience[data-film-fill] .experience-stage { overflow: hidden; }
#experience[data-film-fill] .experience-stage > video { width: 100%; height: 100%; margin: 0; object-fit: cover; }
.experience-stage audio { width: min(420px, 100%); }
#experience video::cue { color: #fff8e8; background: #151115d9; font: 600 15px/1.3 system-ui, sans-serif; }
.experience-details a { color: inherit; }
#experience .experience-artwork-toggle { border: 1px solid currentColor; padding: 4px 10px; }
.experience-artwork :is(img, video) { max-height: min(62vh, 640px); object-fit: contain; }
.experience-artwork.is-zoomed { overflow: auto; max-height: 68vh; }
.experience-artwork.is-zoomed img { width: max(1150px, 160%); max-width: none; max-height: none; margin: 0; }
.experience-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(6px, 1.7vw, 18px); }
.experience-gallery[hidden], .experience-gallery-detail[hidden] { display: none; }
#experience .experience-gallery button {
  display: grid;
  align-content: start;
  min-width: 0;
  gap: 5px;
  padding: 6px;
  border: 1px solid #806c67;
  text-align: center;
}
.experience-gallery button img { width: 100%; aspect-ratio: 4 / 5; margin: 0; object-fit: contain; background: #0e0d12; }
.experience-details.is-gallery-detail { display: flex; flex-direction: column; height: 100%; }
.experience-gallery-detail { display: grid; grid-template-rows: auto minmax(0, 1fr); flex: 1; min-height: 0; }
.experience-gallery-detail > div { display: flex; align-items: center; flex-wrap: wrap; gap: 5px 12px; }
.experience-gallery-detail h3 { margin: 0; font: inherit; }
.experience-gallery-detail figure { position: relative; min-height: 0; margin: 8px 0 0; }
.experience-gallery-detail img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; margin: 0; }


body.screen-content .hint { visibility: hidden; }
#experience[data-immersive]::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .16;
  background: url("../scene/crt-grain.png"), repeating-linear-gradient(transparent 0 2px,#0002 2px 3px);
}
#experience[data-immersive] button { font-size: 16px; }
#experience button:hover { background: #ffffff16; }
@media (max-width: 550px) {
  #experience[data-immersive] button { font-size: 13px; }
  #experience[data-immersive] h2 { font-size: 16px; }
}
@media (pointer: coarse) {
  #experience button { min-height: 34px; }
}
.vcr-actions {
  top: calc(63px + env(safe-area-inset-top, 0px));
  right: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.vcr-actions button { font-size: 14px; }
.vcr-actions button:disabled { opacity: .5; cursor: default; }
body.sheet .vcr-actions, body:has(#gl:not(.ready)) .vcr-actions { display: none; }
.desk-notes { margin: 0 0 12px; padding: 0; list-style: none; }
.desk-notes h3 { margin: 0 0 4px; }
@media (max-width: 760px) {
  .vcr-actions { right: 12px; }
  .vcr-actions button { min-height: 35px; }
}
