:root {
  font-family:Arial,Helvetica,sans-serif;
  color:#183a60;
  font-synthesis:none
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  background:#16324e
}

button,a {
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation
}

button {
  font:inherit;
  cursor:pointer;
  color:inherit
}

button:focus-visible,a:focus-visible,summary:focus-visible {
  outline:3px solid #7fc0ff;
  outline-offset:4px
}

button:hover,a:hover {
  filter:brightness(1.08)
}

[hidden] {
  display:none!important
}

#app {
  height:100vh;
  height:100dvh;
  display:grid;
  grid-template-rows:68px minmax(0,1fr) 112px;
  overflow:hidden
}

.topbar {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:10px 25px;
  background:linear-gradient(#2e6caf,#194a80);
  border-bottom:2px solid #9acdf2;
  box-shadow:0 3px 15px #12365b77;
  z-index:3;
  color:white
}

.address {
  display:flex;
  align-items:center;
  gap:15px
}

.address strong {
  display:block;
  font-size:17px;
  letter-spacing:.2px
}

.address-text span {
  display:block;
  font-size:12px;
  color:#cae4fc;
  margin-top:4px
}

.diamond {
  display:inline-block;
  width:21px;
  height:34px;
  clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%);
  background:conic-gradient(from 30deg at 48% 48%,#81f03b,#2aad31,#06572c,#80ef35,#d3ff82,#81f03b);
  flex-shrink:0
}

.top-actions {
  display:flex;
  gap:9px
}

.top-actions button {
  background:linear-gradient(#5597d3,#24588f);
  border:1px solid #96c6ed;
  border-radius:20px;
  box-shadow:inset 0 1px 2px #d0eaff77,0 2px 4px #12355766;
  color:white;
  padding:9px 14px;
  font-size:12px;
  font-weight:bold
}

#help {
  font-size:17px;
  width:36px;
  height:36px;
  padding:0
}

#world {
  position:relative;
  overflow:hidden;
  background:#747e44;
  isolation:isolate
}

#scene {
  position:absolute;
  width:1536px;
  height:1024px;
  transform-origin:0 0;
  will-change:transform;
  pointer-events:none
}

#house {
  display:block;
  width:100%;
  height:100%
}

#stage {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  touch-action:none;
  outline-offset:-5px
}

#labels {
  position:absolute;
  inset:0;
  pointer-events:none
}

.label {
  position:absolute;
  transform:translate(-50%,-100%);
  display:flex;
  gap:8px;
  align-items:center;
  padding:7px 12px 7px 10px;
  white-space:nowrap;
  color:#eff7ff;
  background:linear-gradient(#4d87bb,#174274 75%);
  border:2px solid #a1d8ff;
  border-radius:17px;
  box-shadow:0 2px 5px #142d4466,inset 0 1px 2px #c9e9ff88;
  pointer-events:auto;
  text-align:left;
  line-height:1.1;
  min-height:42px;
  font-size:13px;
  font-weight:bold
}

.label:after {
  content:"";
  position:absolute;
  bottom:-7px;
  left:calc(50% - 5px);
  width:9px;
  height:9px;
  transform:rotate(45deg);
  background:#194676;
  border-bottom:2px solid #a1d8ff;
  border-right:2px solid #a1d8ff
}

.label small {
  display:block;
  font-size:10px;
  font-weight:normal;
  color:#d2e8ff;
  margin-top:3px
}

.label .diamond {
  width:12px;
  height:23px
}

.label.visited,.label.visited:after {
  border-color:#96d84b
}

.label.npc {
  padding:5px 10px;
  font-size:11px;
  min-height:32px;
  border-width:1px;
  border-radius:12px;
  background:linear-gradient(#5a85a6,#24445e)
}

.label.npc:after {
  border-width:1px;
  background:#24445e
}

.bubble {
  position:absolute;
  top:22px;
  left:24px;
  width:286px;
  background:linear-gradient(135deg,#f2f9ff,#d4eaff);
  border:2px solid #91bddd;
  border-radius:8px 28px 28px 28px;
  box-shadow:0 6px 25px #203b4940;
  padding:24px;
  z-index:2
}

.bubble h1 {
  font-size:29px;
  margin:7px 0 12px;
  font-weight:normal;
  letter-spacing:-1px
}

.bubble p {
  font-size:14px;
  line-height:1.5;
  margin:12px 0
}

.bubble .tip {
  font-size:12px;
  color:#526a7d;
  border-top:1px solid #a8c4db;
  padding-top:12px
}

.eyebrow {
  font-size:10px;
  letter-spacing:1.8px;
  font-weight:bold;
  color:#477ca8
}

#dismiss-help {
  position:absolute;
  right:12px;
  top:8px;
  border:0;
  background:none;
  color:#477ca8;
  font-size:24px
}

.primary {
  background:linear-gradient(#5090c9,#276198);
  border:1px solid #22538b;
  color:white;
  border-radius:7px;
  padding:11px 12px;
  font-size:12px;
  font-weight:bold;
  width:100%;
  text-align:left
}

.primary span {
  float:right
}

#action {
  position:absolute;
  bottom:18px;
  left:50%;
  transform:translateX(-50%);
  border:2px solid #e0f6c0;
  background:linear-gradient(#bce778,#7dc443);
  border-radius:20px;
  padding:9px 20px;
  box-shadow:0 2px 8px #102e2955;
  font-size:13px;
  font-weight:bold;
  color:#193d30
}

#toast {
  position:absolute;
  left:50%;
  top:14px;
  transform:translateX(-50%);
  max-width:min(90%,460px);
  padding:12px 18px;
  border-radius:20px;
  background:#f0f8ff;
  color:#244766;
  font-size:13px;
  box-shadow:0 3px 15px #234a6555;
  z-index:4
}

#loading {
  position:absolute;
  left:50%;
  top:50%;
  transform:translate(-50%,-50%);
  padding:14px 23px;
  color:#e1f3ff;
  background:#214d81;
  border-radius:20px
}

.hud {
  display:flex;
  gap:16px;
  align-items:center;
  background:linear-gradient(#8cbdf0 0,#4a8dcd 12%,#3272b5 60%,#205994);
  border:2px solid #86c6ff;
  border-radius:24px 24px 0 0;
  box-shadow:0 -3px 0 #20518c,0 -5px 12px #16395666;
  z-index:3;
  padding:9px 18px;
  color:white;
  min-width:0
}

#portrait {
  background:linear-gradient(#3678b8,#164a85);
  border:2px solid #91c9fc;
  border-radius:40px 12px 12px 40px;
  padding:0 12px 0 0;
  display:flex;
  align-items:center;
  gap:9px;
  height:84px;
  min-width:242px;
  box-shadow:inset 0 2px 3px #092f6277;
  text-align:left
}

#face {
  width:74px;
  height:88px;
  align-self:flex-end;
  border-radius:50%
}

#portrait strong {
  display:block;
  font-size:19px;
  white-space:nowrap
}

#portrait small {
  display:block;
  font-size:11px;
  color:#d8ecff;
  margin:4px 0 8px
}

.mood {
  display:flex;
  align-items:center;
  gap:5px;
  font-size:10px;
  color:#deffb9;
  letter-spacing:.4px
}

.mood i {
  width:7px;
  height:7px;
  border-radius:50%;
  background:#a0e35a;
  box-shadow:0 0 6px #7de551
}

#rail {
  display:flex;
  gap:6px;
  flex:1;
  min-width:0;
  justify-content:center
}

#rail button,#rail a {
  border:1px solid #a1cefa;
  background:linear-gradient(#5196d7,#245c9a 80%);
  box-shadow:inset 0 1px 3px #daf0ff77,0 2px 3px #164b8e77;
  border-radius:13px;
  min-width:78px;
  flex:1;
  max-width:113px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:7px;
  text-decoration:none;
  color:#f2f7ff;
  font-size:11px;
  font-weight:bold;
  padding:10px 6px;
  height:77px;
  white-space:nowrap
}

#rail button>span,#rail a>span {
  font-size:25px;
  line-height:24px;
  color:#c6e6ff;
  height:26px;
  font-weight:normal
}

.portfolio-button {
  border:0;
  border-left:1px solid #9bc8f6;
  background:none;
  text-align:left;
  color:white;
  padding:10px 0 10px 19px;
  font-size:13px;
  font-weight:bold;
  white-space:nowrap
}

.portfolio-button small {
  display:block;
  color:#cde5fc;
  font-weight:normal;
  font-size:10px;
  margin-top:8px
}

.portfolio-button>span {
  margin-left:9px
}

dialog {
  padding:0;
  color:#24415f;
  border:2px solid #94c9f2;
  box-shadow:0 12px 65px #071b37aa;
  background:#eef6ff;
  border-radius:20px;
  width:min(830px,calc(100% - 28px));
  max-height:calc(100dvh - 48px)
}

dialog::backdrop {
  background:#081d3c80;
  backdrop-filter:blur(3px)
}

#modal[open] {
  display:flex;
  flex-direction:column
}

.modal-bar {
  background:linear-gradient(#5395d5,#22568f);
  color:white;
  padding:21px 27px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-shrink:0
}

.modal-bar .eyebrow {
  color:#c4e3ff;
  font-size:9px
}

.modal-bar h2 {
  font-size:24px;
  margin:7px 0 0;
  font-weight:normal
}

#close-panel,#end-dialogue { font-size:0; }
#close-panel::before,#end-dialogue::before {
  content:"";
  width:13px;
  height:13px;
  transform:rotate(45deg);
  background:
    linear-gradient(currentColor,currentColor) center/100% 2px no-repeat,
    linear-gradient(currentColor,currentColor) center/2px 100% no-repeat;
}

.modal-bar button:not(.traffic),#end-dialogue {
  display:grid;
  place-items:center;
  padding:0;
  width:34px;
  height:34px;
  border:1px solid #a0cdf2;
  border-radius:50%;
  color:white;
  font-size:25px;
  background:#205893
}

#panel-tabs {
  display:flex;
  gap:5px;
  padding:10px 24px;
  background:#d6e8fb;
  border-bottom:1px solid #abc8e4;
  flex-wrap:wrap
}

#panel-tabs button {
  border:0;
  background:none;
  border-radius:7px;
  color:#416280;
  font-size:12px;
  padding:8px 12px
}

#panel-tabs button[aria-current="page"] {
  background:#2c68a6;
  color:white
}

#modal-body {
  overflow-y:auto;
  padding:26px;
  overscroll-behavior:contain;
  line-height:1.6;
  font-size:14px
}

#modal-body h3 {
  font-size:18px;
  margin:0;
  color:#164b7c
}

#modal-body h2 {
  font-size:24px;
  margin:24px 0 12px
}

#modal-body .lead {
  font-size:16px;
  line-height:1.65;
  margin:0 0 24px;
  color:#42627c
}

.card {
  background:#fff;
  border:1px solid #c6dced;
  border-radius:12px;
  margin-bottom:12px;
  overflow:hidden
}

.card summary {
  padding:19px 21px;
  cursor:pointer;
  list-style:none;
  position:relative
}

.card summary:after {
  content:"+";
  position:absolute;
  right:20px;
  top:18px;
  color:#698ba8;
  font-size:23px
}

.card[open] summary:after {
  content:"−"
}

.card summary h3 {
  padding-right:20px
}

.when {
  display:block;
  font-size:11px;
  color:#68849d;
  margin-top:5px
}

.body {
  padding:0 21px 21px
}

.body p {
  margin-top:0
}

.bullets {
  padding-left:19px;
  margin:16px 0
}

.bullets li {
  padding-left:3px;
  margin:10px 0;
  color:#3e5b74
}

.tags,.skills {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:15px 0
}

.tags span,.skills span {
  background:#e9f2fa;
  border:1px solid #d4e3ef;
  border-radius:5px;
  color:#3b668a;
  font-size:11px;
  padding:3px 9px
}

.links {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:18px
}

.links a,.contact-mail {
  display:inline-block;
  background:#2c6aa5;
  color:white;
  text-decoration:none;
  padding:9px 15px;
  border-radius:7px;
  font-size:12px;
  font-weight:bold
}

.links a.ghost {
  background:#e7f0f9;
  color:#2b6090
}

.contact-mail {
  font-size:clamp(14px,3.5vw,22px);
  padding:16px
}

.contact-alt {
  font-size:13px;
  margin-top:25px
}

.contact-alt a {
  color:#246ca4
}

.about-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px
}

.about-grid h3 {
  font-size:12px!important;
  letter-spacing:1px
}

.about-grid p {
  margin:9px 0
}

.plain-links {
  display:flex;
  gap:14px;
  flex-wrap:wrap
}

.plain-links a {
  color:#236ba4
}

#dialogue {
  position:fixed;
  top:auto;
  bottom:130px;
  margin:0 auto;
  padding:26px 29px 17px;
  width:min(680px,calc(100% - 28px));
  background:linear-gradient(#c8e5ff,#99c2ec);
  border:5px double #4c87c2;
  border-radius:22px
}

#dlg-who {
  position:absolute;
  top:-1px;
  left:23px;
  transform:translateY(-50%);
  background:linear-gradient(#baf77a,#7ac741);
  border:2px solid #427eae;
  border-radius:17px;
  color:#184b62;
  padding:5px 18px;
  font-size:16px;
  font-weight:bold
}

#end-dialogue {
  position:absolute;
  right:10px;
  top:8px;
  width:27px;
  height:27px;
  font-size:19px
}

#dlg-text .unsaid { color: transparent; }

#dlg-text {
  font-size:16px;
  line-height:1.5;
  margin:6px 22px 20px 0;
  min-height:48px
}

#next-line {
  float:right;
  border:0;
  border-radius:15px;
  padding:7px 14px;
  background:#548fc9;
  color:white;
  font-size:12px
}

.no-script {
  position:fixed;
  inset:0;
  z-index:9;
  background:#edf6ff;
  padding:40px;
  overflow:auto
}

@media(min-width:1500px) {
  .hud {
    padding-left:30px;
    padding-right:30px;
    gap:30px
  }
  #rail {
    gap:10px
  }
  #rail button,#rail a {
    max-width:125px
  }
}

@media(max-width:1100px) {
  .portfolio-button {
    display:none
  }
  .hud {
    gap:12px;
    padding:9px 12px
  }
  #portrait {
    min-width:212px
  }
  #portrait strong {
    font-size:17px
  }
  #rail button,#rail a {
    min-width:68px
  }
  .bubble {
    width:248px;
    padding:20px;
    left:16px;
    top:16px
  }
}

@media(max-width:760px) {
  #app {
    grid-template-rows:56px minmax(0,1fr) 146px
  }
  .topbar {
    padding:8px 14px
  }
  .address {
    gap:10px
  }
  .address strong {
    font-size:13px
  }
  .address-text span {
    font-size:10px
  }
  .address .diamond {
    height:28px;
    width:17px
  }
  .top-actions button {
    padding:8px 10px
  }
  .top-actions #sound {
    font-size:16px
  }
  .top-actions #sound span {
    display:none
  }
  #help {
    height:33px;
    width:33px
  }
  .hud {
    display:grid;
    grid-template-columns:1fr auto;
    grid-template-rows:43px 72px;
    gap:8px;
    padding:8px 10px 10px;
    border-radius:19px 19px 0 0;
    padding-bottom:max(10px,env(safe-area-inset-bottom))
  }
  #portrait {
    min-width:0;
    height:43px;
    border:0;
    background:none;
    box-shadow:none;
    border-radius:0;
    gap:7px
  }
  #face {
    height:48px;
    width:43px
  }
  #portrait strong {
    font-size:14px
  }
  #portrait small {
    font-size:10px;
    margin:3px 0
  }
  #portrait .mood {
    display:none
  }
  .portfolio-button {
    display:block;
    border:1px solid #a6cef3;
    border-radius:15px;
    padding:7px 12px;
    font-size:11px;
    background:#2b639e
  }
  .portfolio-button small {
    display:none
  }
  #rail {
    grid-row:2;
    grid-column:1/-1;
    gap:4px
  }
  #rail button,#rail a {
    min-width:0;
    max-width:none;
    padding:8px 2px;
    height:67px;
    font-size:9px;
    border-radius:10px;
    gap:6px
  }
  #rail button>span,#rail a>span {
    font-size:22px;
    height:23px
  }
  .label {
    font-size:11px;
    padding:6px 9px;
    min-height:39px;
    gap:5px
  }
  .label small {
    font-size:9px
  }
  .label .diamond {
    width:10px;
    height:20px
  }
  .label.npc {
    font-size:10px;
    min-height:29px
  }
  .bubble {
    top:12px;
    left:12px;
    width:235px;
    padding:19px;
    border-radius:9px 22px 22px 22px
  }
  .bubble h1 {
    font-size:25px;
    margin:7px 0
  }
  .bubble p {
    font-size:12px;
    margin:9px 0
  }
  .bubble .tip {
    font-size:11px
  }
  .bubble .eyebrow {
    font-size:9px
  }
      #action {
    bottom:51px;
    font-size:12px;
    max-width:90%;
    white-space:nowrap
  }
  #dialogue {
    bottom:164px;
    padding:25px 18px 16px
  }
  #dlg-text {
    font-size:14px;
    min-height:60px
  }
  .modal-bar {
    padding:18px
  }
  .modal-bar h2 {
    font-size:23px
  }
  #modal-body {
    padding:18px;
    font-size:13px
  }
  #panel-tabs {
    padding:8px 12px;
    gap:1px
  }
  #panel-tabs button {
    font-size:11px;
    padding:7px 9px
  }
  .card summary {
    padding:16px
  }
  .body {
    padding:0 16px 17px
  }
  #modal-body h3 {
    font-size:16px
  }
  .about-grid {
    grid-template-columns:1fr;
    gap:14px
  }
  dialog {
    max-height:calc(100dvh - 24px)
  }
}

@media(max-height:580px) and (min-width:761px) {
  #app {
    grid-template-rows:52px minmax(0,1fr) 91px
  }
  .hud {
    padding:7px 12px
  }
  #portrait {
    height:68px
  }
  #face {
    height:73px;
    width:63px
  }
  #rail button,#rail a {
    height:65px
  }
  .bubble {
    width:225px;
    padding:16px;
    top:10px
  }
  .bubble h1 {
    font-size:23px
  }
  .bubble p {
    font-size:12px
  }
  .bubble .tip {
    display:none
  }
}

@media(prefers-reduced-motion:reduce) {
  * {
    scroll-behavior:auto!important;
    transition:none!important
  }
}


#dialogue {
  overflow: visible;
}

#dialogue::backdrop {
  background: #081d3c30;
  backdrop-filter: none;
}

#app {
  display: block;
  position: relative;
}

#world {
  position: absolute;
  inset: 0;
  background: #8da76b;
}

.topbar {
  position: absolute;
  top: 14px;
  left: 18px;
  right: 18px;
  height: auto;
  padding: 0;
  border: 0;
  box-shadow: none;
  background: transparent;
  pointer-events: none;
  z-index: 5;
}

.address {
  gap: 10px;
  padding: 8px 16px 8px 12px;
  background: linear-gradient(#d6edf2ee, #a6cbd9ee);
  border: 2px solid #55769f;
  border-radius: 28px 13px 13px 28px;
  color: #263f58;
  box-shadow: inset 0 1px #f5ffff, 0 2px 4px #15325455;
  pointer-events: auto;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.address strong {
  font-size: 16px;
}

.address-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.address-text span {
  color: #365b73;
  font-size: 10px;
}

.address:hover, .address:focus-visible {
  background: linear-gradient(#e4f6faee, #b6d9e6ee);
}

.address .diamond {
  width: 16px;
  height: 30px;
}

.top-actions {
  pointer-events: auto;
  align-items: center;
}

.top-actions button {
  color: #203b59;
  border: 2px solid #52779c;
  background: linear-gradient(#e6f8f9, #a7cadf 55%, #82afd0);
  box-shadow: inset 0 1px 2px #fff, 0 2px 3px #24446966;
}

.bubble {
  top: 86px;
  left: 20px;
  width: 275px;
  background: linear-gradient(#f3fcff, #d5e9f3);
  border-color: #678cad;
  border-radius: 14px 25px 25px 25px;
  padding: 21px;
}

.label {
  background: linear-gradient(#edf8ff, #c0dae9 48%, #a4c5df);
  color: #244567;
  border: 2px solid #5478a1;
  border-radius: 16px;
  box-shadow: inset 0 1px 2px white, 0 2px 4px #243f5966;
  font-size: 12px;
  padding: 6px 11px;
}

.label small {
  color: #49697b;
  font-size: 10px;
}

.label:after {
  background: #a5c6de;
  border-color: #5478a1;
}

.label.npc {
  background: #e5f4f6;
  color: #294a68;
  border: 1px solid #6283a8;
}

.label.npc:after {
  background: #e5f4f6;
}

.label.npc small {
  display: none;
}

#action {
  bottom: 202px;
  z-index: 4;
  border-color: #557997;
  color: #24445b;
  background: linear-gradient(#edffd7, #badc87);
}

#toast {
  top: 82px;
}

.hud {
  position: absolute;
  left: 12px;
  bottom: 10px;
  width: 846px;
  height: 170px;
  display: grid;
  grid-template-columns: 106px 244px 160px 1fr;
  gap: 8px;
  padding: 9px;
  background: linear-gradient(120deg, #cce9f3, #a5cce0 39%, #a6b6e6 88%);
  border: 3px solid #3e588e;
  border-radius: 39px 13px 13px 28px;
  box-shadow: inset 0 0 0 2px #e4faff, inset 0 -8px 12px #6473b166, 0 3px 8px #12284c88;
  color: #24435d;
  align-items: stretch;
  z-index: 5;
}

.world-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 0;
}

.mode-label,
.hud-heading {
  font-size: 9px;
  letter-spacing: .8px;
  font-weight: bold;
  color: #425779;
}

.mode-label {
  padding: 3px 9px;
  white-space: nowrap;
  border: 1px solid #7e9cae;
  border-radius: 8px;
  background: #ecf4ee;
  cursor: pointer;
  font-family: inherit;
}

.mode-label[aria-pressed="true"] {
  color: #f1f8ff;
  background: #4d6994;
  border-color: #35507a;
}

.mode-label:hover { border-color: #3f6288; }

.compass {
  display: grid;
  grid-template-columns: repeat(3, 29px);
  grid-template-rows: repeat(3, 29px);
  background: radial-gradient(#a9bedc, #314f83 65%, #203b6a);
  border: 2px solid #e0f4ff;
  border-radius: 50%;
  padding: 3px;
  margin-top: 8px;
  box-shadow: 0 0 0 2px #576d9a;
}

.compass button {
  background: none;
  border: 0;
  color: #d2e6f4;
  font-size: 21px;
  padding: 0;
}

#zoom-in {
  grid-column: 2;
}

#rotate-left {
  grid-column: 1;
  grid-row: 2;
}

#camera-home {
  grid-column: 2;
  grid-row: 2;
}

#rotate-right {
  grid-column: 3;
  grid-row: 2;
}

#zoom-out {
  grid-column: 2;
  grid-row: 3;
}

#camera-home .diamond {
  width: 13px;
  height: 24px;
  vertical-align: middle;
}

.portfolio-controls {
  border: 2px solid #748ab8;
  border-radius: 11px 11px 5px 5px;
  background: linear-gradient(#9dc5d8, #a3bed3);
  padding: 7px;
  box-shadow: inset 0 1px 3px #41608677, 0 1px 1px #edf8ff;
}

.hud-heading {
  display: block;
  text-align: center;
  margin-bottom: 5px;
}

#rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 54px);
  gap: 4px;
}

#rail button,
#rail a {
  min-width: 0;
  max-width: none;
  width: auto;
  height: auto;
  padding: 3px;
  border: 1px solid #52749b;
  border-radius: 5px;
  gap: 3px;
  font-size: 9px;
  color: #284765;
  background: linear-gradient(125deg, #e4f7f5, #b6d4dc 55%, #91b6d0);
  box-shadow: inset 0 0 0 1px #dcf4f6, 0 1px 2px #26486a55;
}

#rail button > span,
#rail a > span {
  font-size: 24px;
  line-height: 27px;
  height: 27px;
  color: #355b84;
}

.sim-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

#portrait {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  min-width: 0;
  height: 113px;
  border: 0;
  border-bottom: 2px solid #779cc1;
  border-radius: 0;
  padding: 0 0 8px;
  gap: 3px;
  box-shadow: none;
  background: transparent;
  text-align: center;
}

#face {
  position: absolute;
  bottom: 43px;
  width: 91px;
  height: 96px;
  align-self: center;
  border: 2px solid #6e8faf;
  border-radius: 20px 20px 6px 6px;
  box-shadow: 0 1px 3px #365b8655;
}

#portrait strong {
  font-size: 14px;
  color: #243e5b;
}

#portrait small {
  font-size: 9px;
  color: #476076;
  margin: 3px 0 0;
}

.mood-panel {
  border: 3px solid #7783b9;
  border-radius: 12px;
  background: linear-gradient(120deg, #c5e8ef, #9fbada 50%, #a7abe4);
  box-shadow: inset 0 0 0 2px #d6f3f8, 0 1px 2px #4e659577;
  padding: 10px;
}

.mood-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  font-size: 11px;
  font-weight: bold;
}

.mood-indicator {
  height: 9px;
  flex: 1;
  border: 1px solid #638781;
  border-radius: 6px;
  background: linear-gradient(#b7ed7c, #65b443);
  box-shadow: inset 0 1px 1px #edffbc;
}

.moodlets {
  display: flex;
  gap: 5px;
  margin-top: 13px;
}

.moodlets button {
  display: flex;
  flex-direction: column;
  flex: 1;
  align-items: center;
  gap: 5px;
  border: 0;
  background: none;
  padding: 0;
  font-size: 9px;
}

.moodlets button > span {
  display: block;
  font-size: 25px;
  line-height: 36px;
  width: 40px;
  height: 40px;
  border: 1px solid #7b967b;
  border-radius: 6px;
  background: linear-gradient(#eefed3, #b5d8a3);
  box-shadow: inset 0 0 0 2px #f3ffe0;
}

#activity-status {
  margin: 11px 0 0;
  font-size: 9px;
  color: #466185;
  text-align: center;
}

dialog::backdrop,
#dialogue::backdrop {
  background: transparent;
  backdrop-filter: none;
}

#dialogue {
  bottom: 206px;
  width: min(590px, calc(100% - 28px));
  background: linear-gradient(#edfaff, #c3ddeb);
  border: 2px solid #6685ae;
  box-shadow: inset 0 0 0 2px #edfaff, 0 4px 14px #24476844;
  border-radius: 17px;
  padding: 27px 23px 16px;
}

#dlg-who {
  border-color: #6c89a9;
  background: linear-gradient(#e5f9c9, #b8d593);
  color: #2d4c6a;
}

#speech {
  position: absolute;
  transform: translate(-50%, -100%);
  max-width: 285px;
  padding: 15px 20px;
  background: #f6fdff;
  border: 2px solid #7a8eab;
  border-radius: 27px;
  color: #2d425d;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 3px 8px #28456433;
  z-index: 4;
  text-align: center;
  pointer-events: none;
}

#speech::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 45%;
  width: 12px;
  height: 12px;
  transform: rotate(45deg);
  border-right: 2px solid #7a8eab;
  border-bottom: 2px solid #7a8eab;
  background: #f6fdff;
}

@media (max-width: 1100px) {
  .hud {
    width: 728px;
    grid-template-columns: 96px 222px 136px 1fr;
  }

  .moodlets button > span {
    width: 34px;
    height: 35px;
    font-size: 21px;
    line-height: 32px;
  }

  .mood-heading {
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  .topbar {
    top: 9px;
    left: 10px;
    right: 10px;
    gap: 5px;
    align-items: flex-start;
  }

  .address {
    padding: 7px 10px;
    border-radius: 20px 9px 9px 20px;
    gap: 7px;
  }

  .address strong {
    font-size: 13px;
  }

  .address-text span {
    font-size: 8px;
  }

  .address .diamond {
    width: 13px;
    height: 26px;
  }

  .top-actions {
    gap: 4px;
  }

  .top-actions button {
    font-size: 10px;
    padding: 8px 9px;
    min-height: 36px;
  }

  .top-actions #sound {
    font-size: 14px;
    width: 34px;
    padding: 5px;
  }

  .top-actions #sound span {
    display: none;
  }

  #help {
    width: 32px;
    height: 36px;
    min-height: 36px;
    padding: 0;
  }

  .bubble {
    top: 73px;
    left: 12px;
    width: 232px;
    padding: 18px;
  }

  .hud {
    left: 5px;
    right: 5px;
    bottom: max(5px, env(safe-area-inset-bottom));
    width: auto;
    height: 151px;
    grid-template-columns: 1fr 125px;
    grid-template-rows: 54px 74px;
    padding: 8px;
    gap: 4px;
    border-radius: 24px 13px 13px 16px;
  }

  .world-controls,
  .mood-panel,
  .hud-heading {
    display: none;
  }

  .sim-panel {
    display: contents;
  }

  #portrait {
    grid-column: 1;
    grid-row: 1;
    height: 50px;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    padding: 0;
    gap: 9px;
    border: 0;
  }

  #face {
    position: static;
    height: 52px;
    width: 52px;
    border-radius: 12px 12px 4px 4px;
  }

  #portrait strong {
    font-size: 13px;
  }

  #portrait small {
    font-size: 9px;
  }

  .portfolio-controls {
    grid-column: 1 / -1;
    grid-row: 2;
    background: none;
    border: 0;
    padding: 0;
    box-shadow: none;
  }

  #rail {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 68px;
    gap: 3px;
  }

  #rail button,
  #rail a {
    height: 68px;
    font-size: 8px;
    gap: 5px;
    padding: 2px;
  }

  #rail button > span,
  #rail a > span {
    font-size: 23px;
    height: 27px;
  }

      #action {
    bottom: 215px;
    font-size: 11px;
  }

  #dialogue {
    bottom: 224px;
  }

  .label {
    font-size: 10px;
    padding: 5px 9px;
    min-height: 37px;
  }

  .label small {
    font-size: 9px;
  }
}

#rotate-left, #rotate-right {
  color: #b9d7eb;
  text-align: center;
  font-size: 21px;
  line-height: 29px;
}
@media (max-width: 1100px) and (min-width: 761px) {
  }
