.pz:not(.pz-touch) {
  --desk-edge: clamp(12px, 1.3vw, 26px);
  --desk-header-height: 88px;
  --desk-dock-width: min(590px, calc(100% - 20px));
  --desk-dock-bottom: 15px;
  --desk-chat-bottom: 20px;
  --desk-ink: #243d69;
  --desk-gold: #d5b278;
  --desk-glass: linear-gradient(145deg, #fffefb, #eaf2fe 55%, #d7e4f9);
  --desk-city: url('/assets/interface/desktop-plaza-city.webp');
  --desk-dock: url('/assets/interface/desktop-dock-porcelain.webp');
}

.pz:not(.pz-touch) > .pz-loc {
  inset: var(--desk-edge) var(--desk-edge) auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
  pointer-events: none;
  transform: none;
  zoom: 1;
}
.pz:not(.pz-touch) .pz-loc > * {
  pointer-events: auto;
  box-sizing: border-box;
  border: 1px solid var(--desk-gold);
  border-radius: 15px;
  color: var(--desk-ink);
  text-align: start;
  box-shadow: inset 0 0 0 2px #fffae8b0, 0 3px 10px #15294758;
}
.pz:not(.pz-touch) .pz-hud-character {
  --pz-hud-portrait-size: 56px;
  display: grid;
  justify-self: start;
  width: min(338px, 100%);
  min-height: var(--desk-header-height);
  gap: 11px;
  padding: 9px 12px 9px 9px;
  background: linear-gradient(95deg, #f4f8ffd9, #edf4fff2 56%, #e2eaffad), var(--desk-city) right 54% / cover;
}
.pz:not(.pz-touch) .pz-hud-details { gap: 4px; }
.pz:not(.pz-touch) .pz-hud-career { font-size: 14px; gap: 6px; }
.pz:not(.pz-touch) .pz-hud-career strong { font-size: 16px; }
.pz:not(.pz-touch) .pz-hud-levels { font-size: 11px; gap: 4px; flex-wrap: wrap; }
.pz:not(.pz-touch) .pz-hud-levels > span { padding-inline: 6px; min-height: 18px; }
.pz:not(.pz-touch) .pz-hud-hp { min-height: 20px; grid-template-columns: 23px minmax(0, 1fr); font-size: 11px; }
.pz:not(.pz-touch) .pz-hud-hp img { width: 16px; height: 16px; }
.pz:not(.pz-touch) .pz-hud-avatar:hover { box-shadow: 0 0 0 2px #fff5d0, 0 0 10px #9fbcf2; }
.pz:not(.pz-touch) .pz-loc-meta {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  grid-template-columns: auto 1fr auto;
  gap: 3px 9px;
  padding: 7px 10px;
  background: var(--desk-glass);
}
.pz:not(.pz-touch) .pz-loc-meta::after {
  content: '';
  position: absolute;
  width: 58px;
  height: 12px;
  left: 50%;
  bottom: -7px;
  transform: translateX(-50%);
  pointer-events: none;
  background: url('/assets/interface/plaza-dock-jewel.webp') center / contain no-repeat;
}
.pz:not(.pz-touch) .pz-loc-meta h1 { grid-area: 1 / 1 / 2 / 3; font-size: 16px; padding-left: 2px; }
.pz:not(.pz-touch) .pz-loc-meta .pz-loc-place { grid-area: 2 / 1; padding-left: 2px; }
.pz:not(.pz-touch) .pz-loc-meta [data-online] { grid-area: 2 / 2; }
.pz:not(.pz-touch) .pz-loc-meta [data-online]:not(:empty)::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-inline-end: 4px;
  border-radius: 50%;
  background: #39976a;
  vertical-align: 1px;
}
.pz:not(.pz-touch) .pz-loc-meta [data-guides] { grid-area: 1 / 3; min-height: 21px; font-size: 11px; }
.pz:not(.pz-touch) .pz-hud-channel { grid-area: 2 / 3; min-height: 22px; font-size: 11px; }
.pz:not(.pz-touch) .pz-hud-wallet {
  grid-area: 1 / 3;
  display: grid;
  justify-self: end;
  width: min(168px, 100%);
  gap: 4px;
  padding: 6px;
  background: var(--desk-glass);
  font: 750 12px/1.2 system-ui, 'Microsoft JhengHei', sans-serif;
  font-variant-numeric: tabular-nums;
}
.pz:not(.pz-touch) .pz-hud-wallet > span { min-height: 22px; padding-inline: 6px; gap: 5px; }
.pz:not(.pz-touch) .pz-hud-wallet img { width: 18px; height: 18px; }

.pz:not(.pz-touch) > .pz-actions {
  box-sizing: border-box;
  left: 50%;
  top: auto;
  right: auto;
  bottom: var(--desk-dock-bottom);
  z-index: 4;
  width: var(--desk-dock-width);
  min-height: 76px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 9px clamp(24px, 4.2vw, 60px) 12px;
  transform: translateX(-50%);
  isolation: isolate;
  zoom: 1;
}
.pz:not(.pz-touch) > .pz-actions::before {
  content: '';
  position: absolute;
  inset: 3px 0 0;
  z-index: -1;
  pointer-events: none;
  background: var(--desk-dock) center / 100% 100% no-repeat;
  filter: drop-shadow(0 5px 5px #1228547a);
}
.pz:not(.pz-touch) .pz-actions button {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  position: relative;
  min-width: 0;
  min-height: 49px;
  padding: 2px 4px 4px;
  border: 1px solid #a6bde4;
  border-radius: 12px;
  background: var(--desk-glass);
  box-shadow: inset 0 0 0 1px #fff9ed, inset 0 -2px #b7cbed, 0 2px 4px #273f6c49;
  color: var(--desk-ink);
  font: 800 12px/1.14 system-ui, 'Microsoft JhengHei', sans-serif;
}
.pz:not(.pz-touch) .pz-actions button:hover:not(:disabled) { background: #f6faff; border-color: #d4ad6c; }
.pz:not(.pz-touch) .pz-actions button:active:not(:disabled) { transform: translateY(1px); }
.pz:not(.pz-touch) .pz-actions [data-mobile-team] { display: grid; }
.pz:not(.pz-touch) .pz-actions :is(.pz-dock-icon, .pz-dock-settings-text) { display: block; }
.pz:not(.pz-touch) .pz-actions .pz-dock-icon {
  width: 44px;
  height: 28px;
  background: var(--pz-dock-icon) center / contain no-repeat;
}
.pz:not(.pz-touch) .pz-actions .pz-desktop-settings-mark { display: none; }
.pz:not(.pz-touch) .pz-actions kbd {
  position: absolute;
  top: 3px;
  right: 4px;
  padding: 0 3px;
  color: #40567d;
  background: #fffdfa;
  line-height: 13px;
}
.pz:not(.pz-touch) .pz-actions [data-gear] {
  margin: -5px -1px -2px;
  border: 2px solid #ebc881;
  color: #fff8df;
  background: radial-gradient(ellipse at top, #c9e5fd, #5394e8 43%, #2d62bd 75%, #22448e);
  box-shadow: inset 0 0 0 1px #fff1ac, inset 0 0 7px #b4dfffaa, 0 0 12px #5dabff7a;
  text-shadow: 0 1px 2px #163b81;
}
.pz:not(.pz-touch) .pz-actions [data-gear]:hover { background: radial-gradient(ellipse at top, #e4f3ff, #699fea 43%, #2855a8 80%); }
.pz:not(.pz-touch) .pz-actions [data-gear] .pz-dock-icon { height: 34px; width: 50px; }
.pz:not(.pz-touch) .pz-actions :is([data-on], [data-asks]) {
  position: absolute;
  inset: auto 4px 3px auto;
  line-height: 13px;
}
.pz:not(.pz-touch) .pz-actions [data-social]:has([data-asks]:not([hidden])) [data-on] { display: none; }

.pz:not(.pz-touch) > .pz-team-roster {
  --team-left: var(--desk-edge);
  --team-top: calc(var(--desk-edge) + var(--desk-header-height) + 9px);
  width: 252px;
  max-height: min(49dvh, calc(100dvh - var(--team-top) - 138px));
  border-color: var(--desk-gold);
  background: var(--desk-glass);
}
.pz:not(.pz-touch) > .pz-team-roster:not(:is([data-in-party], [data-roster-managing])) { width: 200px; }
.pz:not(.pz-touch) .pz-team-roster-head {
  background: linear-gradient(90deg, #243b68f0, #27426f8c), var(--desk-city) right 54% / cover;
}
.pz:not(.pz-touch) > .pz-stations {
  top: calc(var(--desk-edge) + 72px);
  right: 50%;
  transform: translateX(50%);
  bottom: auto;
  max-height: min(62dvh, 480px);
  zoom: 1;
}
.pz:not(.pz-touch) > .pz-mobile-notices { display: contents; }
.pz:not(.pz-touch) > .pz-mobile-notices .pz-notice-rail {
  position: absolute;
  z-index: 4;
  left: calc(var(--desk-edge) + 47px);
  bottom: calc(var(--desk-chat-bottom) + 9px);
  width: clamp(135px, calc((100% - var(--desk-dock-width)) / 2 - var(--desk-edge) - 55px), 335px);
  height: 26px;
  margin: 0;
  padding: 0 3px;
  visibility: hidden;
  pointer-events: none;
}
.pz:not(.pz-touch) > .pz-mobile-notices .pz-notice-rail:has(.plaza-chat-toast-line) { visibility: visible; }
.pz:not(.pz-touch) .plaza-mobile-text .plaza-chat-toast-line { font-size: 12px; }
.pz:not(.pz-touch) .pz-notice-tools {
  right: var(--desk-edge);
  bottom: calc(var(--desk-dock-bottom) + 78px);
  z-index: 4;
  gap: 2px;
}
.pz:not(.pz-touch) .pz-chat-launcher {
  position: absolute;
  z-index: 4;
  left: var(--desk-edge);
  bottom: var(--desk-chat-bottom);
  width: 43px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 12px;
  background: url('/assets/interface/plaza-chat-launcher-slime.webp') center / contain no-repeat;
  filter: drop-shadow(0 3px 4px #132b60aa);
}
.pz:not(.pz-touch) :is(.pz-chat-launcher, .pz-notice-tools button):hover { filter: drop-shadow(0 2px 6px #ffecc8); }
.pz:not(.pz-touch) .pz-chat-window {
  width: min(680px, calc(100vw - 36px));
  height: min(620px, calc(100dvh - 56px));
  border: 2px solid var(--desk-gold);
  border-radius: 18px;
}
.pz:not(.pz-touch) .pz-chat-window-head {
  min-height: 66px;
  padding-left: 17px;
  background: linear-gradient(90deg, #172a51c9, #172a5133 63%, transparent), var(--desk-city) center 50% / cover;
}
.pz:not(.pz-touch) .pz-chat-window .pz-chat-panel { --chat-rail-width: 124px; }
.pz:not(.pz-touch) .pz-chat-window-channels { margin: 9px 3px 8px 9px; }
.pz:not(.pz-touch) .pz-chat-window-channels button { justify-content: flex-start; padding-inline: 9px; }
.pz:not(.pz-touch) .pz-chat-window .pz-chatlog {
  margin: 9px 9px 8px 4px;
  background: linear-gradient(#fbfdff 15%, #f3f8fe 45%, #f4f9fd68),
    url('/assets/interface/plaza-chat-garden.webp') center bottom / 100% auto no-repeat, #f3f7fe;
}
.pz:not(.pz-touch) .pz-chat-window .pz-compose { padding: 8px 10px; }
.pz:not(.pz-touch) .pz-utility-head {
  background: linear-gradient(90deg, #1d3263db, #1d326346), var(--desk-city) center 46% / cover;
}
.pz:not(.pz-touch) .pz-utility-head h2 { color: #fff7e4; text-shadow: 0 2px 4px #163365; }
.pz:not(.pz-touch) :is(.pz-actions button, .pz-hud-avatar, .pz-chat-launcher, .pz-notice-tools button):focus-visible {
  outline: 2px solid #fff4c6;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px #30568b;
}

@media (max-width: 980px) {
  .pz:not(.pz-touch) { --desk-chat-bottom: calc(var(--desk-dock-bottom) + 78px); }
  .pz:not(.pz-touch) > .pz-mobile-notices .pz-notice-rail { width: min(290px, calc(100% - var(--desk-edge) - 104px)); }
}
@media (max-width: 830px) {
  .pz:not(.pz-touch) .pz-loc { gap: 7px; }
  .pz:not(.pz-touch) .pz-hud-character { --pz-hud-portrait-size: 46px; gap: 7px; padding-inline: 7px; }
  .pz:not(.pz-touch) .pz-hud-career strong { font-size: 14px; }
  .pz:not(.pz-touch) .pz-hud-levels > span { padding-inline: 3px; }
}
@media (max-width: 650px) {
  .pz:not(.pz-touch) { --desk-edge: 9px; --desk-dock-bottom: 8px; --desk-dock-width: calc(100% - 14px); }
  .pz:not(.pz-touch) .pz-loc { grid-template-columns: minmax(0, 1fr) auto; }
  .pz:not(.pz-touch) .pz-loc-meta { grid-area: 2 / 2; margin-top: -19px; }
  .pz:not(.pz-touch) .pz-hud-wallet { grid-area: 1 / 2; width: 140px; }
  .pz:not(.pz-touch) > .pz-stations { top: calc(var(--desk-edge) + 133px); right: var(--desk-edge); transform: none; }
  .pz:not(.pz-touch) .pz-actions { padding-inline: 27px; }
  .pz:not(.pz-touch) .pz-actions kbd { display: none; }
}
@media (max-width: 830px) and (max-height: 530px) {
  .pz:not(.pz-touch) > .pz-team-roster { max-height: calc(100dvh - var(--team-top) - 89px); }
}
@media (min-width: 1600px) and (min-height: 850px) {
  .pz:not(.pz-touch) { --desk-header-height: 98px; --desk-dock-width: 680px; }
  .pz:not(.pz-touch) .pz-hud-character { --pz-hud-portrait-size: 64px; width: min(370px, 100%); }
  .pz:not(.pz-touch) .pz-hud-career strong { font-size: 18px; }
  .pz:not(.pz-touch) .pz-hud-wallet { width: min(182px, 100%); }
  .pz:not(.pz-touch) > .pz-actions { min-height: 87px; padding-block: 11px 13px; }
  .pz:not(.pz-touch) .pz-actions button { min-height: 57px; font-size: 13px; }
  .pz:not(.pz-touch) .pz-actions .pz-dock-icon { height: 32px; }
  .pz:not(.pz-touch) .pz-notice-tools { bottom: calc(var(--desk-dock-bottom) + 90px); }
}

@media (min-width: 1000px) and (min-height: 560px) and (pointer: fine) {
  .expedition:not(.ex-touch) {
    --hud-panel: linear-gradient(155deg, #fffdf6f5, #dce9fcf6);
    --hud-title: linear-gradient(90deg, #233966ed, #2a4e88b3), url('/assets/interface/desktop-plaza-city.webp') right 52% / cover;
    --hud-border: #d3b276;
    --hud-shadow: 0 3px 9px #15244283, inset 0 0 0 1px #fffbe3;
  }
  .expedition:not(.ex-touch) .ex-portrait { border-color: #d0a55d; box-shadow: 0 0 0 1px #fff1b3, 0 3px 8px #171b33b3; }
  .expedition:not(.ex-touch) .ex-vitals .rb-who { border-bottom-color: #bda26a; }
  .expedition:not(.ex-touch) .ex-map { box-shadow: var(--hud-shadow); }
  .expedition:not(.ex-touch) .ex-map-heading { border-bottom-color: #bda26a; }
  .expedition:not(.ex-touch) .rb-stage time { color: #2a467b; }
  .expedition:not(.ex-touch) .ex-skillbar .ex-slot { border-color: #b6a27a; }
  .expedition:not(.ex-touch) .ex-skillbar .ex-empty { border-color: #abbfe8; background: #e5effacc; }
}
