/* Desktop frames share the same dividers; each long pane owns its scroll. */
.world-layout, .signup-layout {
  --frame-background: #dcdcdc;
  --chat-paper: #f2efec;
  --player-paper: #f5eeec;
  --frame-link: #173d77;
  --frame-title: #821c19;
  --frame-bevel: inset 1px 1px #f5f4ee, inset -1px -1px #8e8e8a;
  color-scheme: light;
}
.world-layout {
  --dock-size: clamp(min(90px,40%),var(--chat-height,28%),70%);
  --text: #161716;
  --quiet: #444644;
  --light-gold: var(--frame-link);
  background: #bcbdb9;
  font-family: Arial, sans-serif;
  font-size: .875rem;
}
.world-layout .topbar { background: #40413e; }
.world-layout .topbar-inner {
  display: grid;
  grid-template: 18px 19px / minmax(145px,1fr) auto;
  gap: 0;
  align-items: stretch;
  padding: 0;
  background: linear-gradient(#9c9d98 0, #b9b9b3 17px, #4a4c45 18px, #454741 36px);
}
.world-layout .brand {
  grid-row: 1 / 3;
  padding: 0 7px;
  font-size: 1rem;
  letter-spacing: .09em;
  background: #57594d var(--stone-trim) repeat-x left bottom / auto 17px;
  text-shadow: 1px 1px #222;
}
.world-layout .brand-mark, .signup-bar .brand-mark { background: #264944; color: #cde7d9; }
.world-layout .top-nav { grid-row: 2; grid-column: 2; }
.world-layout .top-nav button {
  min-height: 0;
  padding: 0 9px;
  border: 0;
  border-inline-start: 1px solid #888986;
  border-bottom: 1px solid #6a6c67;
  background: linear-gradient(#e2e0d9, #afafaa);
  color: #272726;
  font-size: .77rem;
  font-weight: bold;
  line-height: 1;
}
.world-layout .top-nav button:is(:hover,[aria-current]) { background: #efeee7; color: var(--frame-link); }
.world-layout .top-status {
  grid-area: 1 / 2;
  justify-content: flex-end;
  gap: 0;
  margin: 0;
  padding-inline: 4px;
  background: linear-gradient(#6d6d66, #3a3b36);
  font-size: .73rem;
}
.world-layout .top-status > * {
  border: 0;
  min-height: 0;
  padding: 0 7px;
  color: #fffdf6;
  text-decoration: none;
  white-space: nowrap;
}
.world-layout .top-status .dev-label { font-size: .62rem; }
.world-layout .top-status .health-link { display: none; }
.world-layout .top-status .button { border: 0; min-height: 0; font-size: inherit; box-shadow: none; }
.world-layout .top-status button:hover { text-decoration: underline; }
.world-layout .topbar::after { height: 3px; background-position: left bottom; }

.world-layout .shell { padding: 1px 2px 5px; gap: 0; }
.world-layout .shell::after { inset-inline: 2px; height: 5px; }
.world-layout .game-stage {
  background: var(--frame-background);
  box-shadow: var(--frame-bevel);
  border-color: #8a8b85;
}
.world-layout .game-stage :is(h1,h2,h3) { font-family: Arial, sans-serif; letter-spacing: normal; }
.world-layout .game-stage :is(.section-heading h1,.room-dialogue h1,.city-interior h1,.shop-heading h1,.trial-room h1),
.signup-scene h1 {
  color: var(--frame-title);
  font: 700 clamp(1.05rem,1.5vw,1.36rem)/1.15 Arial,sans-serif;
  letter-spacing: normal;
}
.world-layout .game-stage .overline { font-size: .68rem; }
.world-layout .game-stage .button {
  min-height: 24px;
  padding: 2px 6px;
  border-color: #969691;
  border-radius: 0;
}
.world-layout .game-stage .button.ghost { background: #efeeeb; color: var(--frame-link); box-shadow: var(--frame-bevel); }
.world-layout .game-stage .button[aria-pressed="true"] { color: #fff; background: #515956; }

.dock-divider {
  display: grid;
  grid-row: 2;
  height: 10px;
  place-items: center;
  background: #c1c1ba;
  border-top: 1px solid #f1f1ed;
  border-bottom: 1px solid #898a84;
  cursor: ns-resize;
  touch-action: none;
}
.dock-divider::after {
  content: "";
  width: 42px;
  height: 4px;
  border-block: 1px solid #55534c;
}
.dock-divider:is(:hover,:focus-visible) { background: #d8c8a9; }
.dock-divider:focus-visible { outline-offset: -2px; }
.world-layout .shell[data-resizing-chat] { cursor: ns-resize; user-select: none; }
.world-layout .room-dock {
  grid-row: 3;
  grid-template-columns: minmax(0,1fr) clamp(150px,16%,285px);
  grid-template-rows: minmax(0,1fr) auto;
  border: 1px solid #878883;
  border-top: 1px solid #878883;
  background: var(--chat-paper);
  box-shadow: var(--frame-bevel);
}
.world-layout .dock-main { grid-template-rows: auto minmax(0,1fr); }
.world-layout .dock-tabs {
  padding: 0 2px;
  gap: 0;
  justify-content: end;
  background: transparent;
  border: 0;
}
.world-layout .dock-tabs button {
  min-height: 22px;
  min-width: 0;
  margin: 0;
  padding: 1px 12px 2px;
  border: 0;
  background: linear-gradient(#92938d,#737471);
  color: white;
  box-shadow: inset 0 1px #4b4b48, inset 0 -1px #4b4b48;
  clip-path: polygon(0 0,100% 0,calc(100% - 6px) 100%,6px 100%);
  font-size: .81rem;
}
.world-layout .dock-tabs button[aria-pressed="true"] { background: #e0ddd5; color: #171915; }
.world-layout .dock-tabs button:focus-visible { outline-offset: -3px; }
.world-layout .dock-messages {
  height: 100%;
  min-height: 0;
  max-height: none;
  padding: 3px 6px;
  overscroll-behavior: contain;
}
.world-layout .dock-messages li { font-size: .88rem; }
.dock-messages time { color: #21691c; font: .81rem ui-monospace,monospace; }
.world-layout .dock-messages li strong { color: var(--frame-link); margin-right: 0; }
.world-layout .dock-presence {
  grid-template-rows: auto minmax(0,1fr);
  background: var(--player-paper);
  border-left: 4px ridge #c9c6bf;
}
.world-layout .dock-presence header { text-align: center; padding: 5px 0 0; }
.world-layout .dock-presence header .button {
  border: 1px solid #a6a6a4;
  min-height: 20px;
  padding: 1px 6px;
  background: #f0efed;
  text-decoration: none;
}
.world-layout .dock-presence h2, .dock-mobile-presence h2 {
  justify-content: start;
  min-height: auto;
  padding: 2px 5px 3px;
  color: var(--frame-title);
  background: transparent;
  border: 0;
  font: 700 .96rem Arial,sans-serif;
}
.world-layout .dock-presence ul { max-height: none; padding: 2px 5px 4px; overscroll-behavior: contain; }
.world-layout :is(.dock-presence,.dock-mobile-presence) li {
  display: flex;
  justify-content: start;
  align-items: baseline;
  column-gap: 2px;
  padding-block: 1px;
}
.world-layout :is(.dock-presence,.dock-mobile-presence) li::before { content: none; }
.world-layout :is(.dock-presence,.dock-mobile-presence) li .button {
  color: var(--frame-link);
  font: 700 .88rem Arial,sans-serif;
  text-decoration: none;
}
.world-layout :is(.dock-presence,.dock-mobile-presence) li .button:hover { text-decoration: underline; }
.world-layout :is(.dock-presence,.dock-mobile-presence) .roster-info {
  padding-inline: 3px;
  background: #204986;
  color: white;
  font: 700 .7rem/1.1 Arial,sans-serif;
}
.world-layout .dock-input-row {
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
  padding: 2px 5px 4px;
  gap: 7px;
  border-top: 2px ridge #b5b5aa;
  background: var(--stone-trim) repeat-x bottom / auto 2px, linear-gradient(#dbdbd4,#a2a39a);
}
.world-layout .dock-form { align-items: center; gap: 3px; }
.world-layout .dock-form .field {
  width: 0;
  min-width: 0;
  min-height: 25px;
  height: 25px;
  padding: 2px 6px;
  border: 1px solid #7f8282;
  box-shadow: inset 1px 1px #dededa, 0 1px #e7e7df;
  border-radius: 0;
  background: #fcfcf9;
  color: #222d36;
  font: .85rem Arial,sans-serif;
}
.dock-chat-tools, .dock-world-tools {
  display: flex;
  align-items: center;
  gap: 3px;
  padding-inline-start: 6px;
  border-inline-start: 2px groove #c1c0b9;
}
.world-layout .dock-key {
  --dock-key-rim: #7c8796;
  --dock-key-lip: #f3f6f9;
  --dock-key-light: #e5ebf1;
  --dock-key-mid: #c3cedb;
  --dock-key-shade: #a5b4c6;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 29px;
  height: 27px;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--dock-key-rim);
  border-radius: 6px;
  background:
    radial-gradient(ellipse at 44% 8%, var(--dock-key-lip), transparent 72%),
    linear-gradient(var(--dock-key-light), var(--dock-key-mid) 48%, var(--dock-key-shade));
  box-shadow: inset 0 1px 2px var(--dock-key-lip), inset 0 -2px 3px #29313f45,
              0 1px 1px #34343866;
}
.world-layout .dock-world-tools .dock-key {
  --dock-key-rim: #a48274;
  --dock-key-lip: #fff4ef;
  --dock-key-light: #f1dad1;
  --dock-key-mid: #e5c4b8;
  --dock-key-shade: #c9a697;
}
.world-layout .dock-key:hover {
  filter: brightness(1.08);
}
.world-layout .dock-key:is(:active,[aria-pressed="true"]) {
  border-color: #5c6470;
  background: linear-gradient(var(--dock-key-shade), var(--dock-key-light));
  box-shadow: inset 0 2px 4px #2029356e, 0 1px 1px #f5f4eea0;
}
.dock-key .dock-icon {
  display: block;
  width: 24px;
  height: 24px;
  filter: drop-shadow(0 1px .35px #f5f5f0d9);
  pointer-events: none;
}
.dock-clock-panel {
  flex: 0 0 84px;
  display: grid;
  grid-template-rows: auto auto;
  justify-items: center;
  align-content: center;
  min-height: 31px;
  padding: 0 2px 1px;
  border: 1px solid #b1afa6;
  background: linear-gradient(#eeede7,#d5d1c8);
  box-shadow: inset 1px 1px #ffffff94;
}
.dock-clock {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 3px;
  color: #29365f;
  font: 700 20px/.94 ui-monospace,monospace;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.dock-clock-seconds { color: #9b2026; font-size: 13px; }
.dock-clock-controls { display: flex; gap: 2px; }
.dock-clock-controls button {
  min-width: 36px;
  padding: 0 2px;
  border: 1px solid #737b9b;
  background: #e3e3e2;
  color: #29365f;
  font: 700 9px/10px ui-monospace,monospace;
  letter-spacing: .04em;
}
.dock-clock-controls button[aria-pressed="true"] {
  border-color: #973338;
  background: #f3dfda;
  color: #941c22;
}
.dock-clock-controls button:disabled { opacity: .67; }
.dock-clock-controls button:hover:not(:disabled) { background: #f6f1ea; }
.world-layout .dock-clock-controls button:focus-visible { outline-offset: 0; }

.world-layout .stage--gear:has(.shop-scroll) { grid-template-rows: minmax(0,1fr); padding: 0; }
.world-layout .shop-scroll {
  border: 0;
  background: var(--frame-background);
  scrollbar-gutter: stable;
  color: #151616;
}
.shop-layout {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(175px,20%);
  column-gap: clamp(9px,1.3vw,20px);
  row-gap: 5px;
  padding: 9px 10px 12px;
}
.shop-heading { text-align: center; }
.world-layout .shop-heading h1 { margin: 0; }
.shop-status { text-align: right; min-width: 0; font-size: .82rem; }
.world-layout .shop-status p { margin: 4px 0 0; line-height: 1.25; }
.shop-status strong { color: #287b13; }
.shop-stock, .shop-sidebar { min-width: 0; }
.shop-stock-header { background: #a8a9a7; padding: 2px 5px 5px; }
.world-layout .shop-stock-header h2, .world-layout .shop-departments h2 {
  text-align: center;
  font-size: .97rem;
  margin: 0;
  padding: 2px;
}
.shop-filters { align-items: center; gap: 3px 7px; }
.shop-filters strong { font-size: .86rem; }
.shop-filters label { display: inline-flex; align-items: center; gap: 4px; color: #171716; font-size: .8rem; }
.world-layout .shop-filters .field { width: auto; min-height: 22px; padding: 0 3px; color: #192f66; background: white; }
.world-layout .shop-filters input[type="search"] { width: clamp(85px,13vw,175px); }
.shop-filters .shop-search { flex: 0 1 auto; }
.shop-filters .shop-suitable input { width: auto; margin: 0; }
.world-layout .shop-filters .button { min-height: 22px; padding-block: 0; }
.shop-count { padding: 0; align-self: center; }
.world-layout .shop-note { padding: 4px 6px; margin: 0; }
.shop-utilities { display: flex; flex-wrap: wrap; gap: 3px; margin-bottom: 3px; }
.world-layout .shop-departments h2 { background: #a8a9a7; }
.world-layout .shop-departments h3 { font: 700 .88rem/1.2 Arial,sans-serif; margin: 3px 0 0; }
.shop-departments ul { margin: 0; padding-left: .8rem; list-style: none; }
.shop-departments button, .shop-row-data h4 button {
  padding: 0;
  border: 0;
  color: var(--frame-link);
  background: none;
  font-weight: bold;
  text-align: start;
}
.shop-departments button { width: 100%; font-size: .88rem; }
.shop-departments button:hover, .shop-row-data h4 button:hover { text-decoration: underline; }
.shop-departments button[aria-current] { color: #85430d; background: #c9c9c7; }
.shop-crutches { margin-top: 8px; display: grid; justify-items: start; gap: 2px; font-size: .82rem; }

.world-layout .shop-section > h3 {
  margin: 0;
  padding: 2px 5px;
  color: #303232;
  background: #b6b7b4;
  font-size: .82rem;
}
.world-layout .shop-row {
  grid-template-columns: minmax(75px,12%) minmax(0,1fr);
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin: 0;
  border: 1px solid #a5a6a3;
  border-bottom: 0;
  background: #ccc;
  font-size: .89rem;
  line-height: 1.19;
  contain-intrinsic-block-size: auto 176px;
}
.world-layout .shop-row:last-child { border-bottom: 1px solid #a5a6a3; }
.world-layout .shop-row:nth-child(even) { background: #d3d3d3; }
.shop-row-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-inline-end: 1px solid #a5a6a3;
}
.shop-row-icon :is(.stock-icon,.gear-art) {
  width: min(62px,100%);
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  border: 1px solid #94948e;
}
.world-layout .shop-row-icon .button { border: 0; background: none; box-shadow: none; text-decoration: underline; }
.shop-row-data { padding: 4px 5px; overflow-wrap: anywhere; }
.shop-row-data header { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 7px; }
.shop-row-data h4 { margin: 0; font-size: .97rem; }
.shop-row-data h4 button { color: #235a66; }
.shop-row-data .shop-price { color: #a62119; }
.shop-row-data ul { margin: 0; padding-inline-start: 1.1em; }
.shop-row-data .missing, .shop-effect-note { color: #a62119; }

.world-layout .stage--city:has(.welcome-scene) { grid-template-rows: auto minmax(0,1fr); }
.welcome-scene, .world-layout .welcome-scene {
  grid-template-columns: minmax(115px,17.5%) minmax(0,1fr) minmax(115px,17.5%);
  min-height: 0;
  gap: 6px;
}
.welcome-scene .room-fighter {
  display: grid;
  grid-template-rows: auto minmax(0,1fr) auto;
  min-height: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.welcome-scene .room-fighter-head { padding: 1px 0; color: #171814; text-align: center; }
.welcome-scene .room-fighter-head h2 { margin: 0; font: 700 .98rem Arial,sans-serif; }
.welcome-scene .room-fighter-head h2 small { font-weight: normal; }
.welcome-scene .room-fighter-head .meter { height: 7px; margin: 0; }
.welcome-scene .room-health { justify-content: center; font-size: .76rem; }
.welcome-scene .room-health strong { color: #275e2d; }
.welcome-scene .equipment-effigy { background: #131412; }
.welcome-scene .gear-slot:not(.equipped) .gear-art { opacity: .62; }
.signup-scene .meter.hp span { background: linear-gradient(#398748,#226a28); }
.welcome-scene .room-location { border: 0; min-height: 0; background: transparent; box-shadow: none; overflow: auto; }
.welcome-scene .room-dialogue { padding: 4px 8px; }
.welcome-scene .room-dialogue h1 { text-align: center; margin: 0 0 .65rem; }
.welcome-scene .room-dialogue > p:not(.room-speaker) { max-width: none; font-size: .89rem; color: #161716; }
.welcome-scene .room-choices { display: grid; justify-items: start; gap: 2px; }
.world-layout .welcome-scene .room-choices .button,
.signup-layout .room-choices .button {
  min-height: 0;
  padding: 0;
  border: 0;
  text-align: left;
  background: none;
  box-shadow: none;
  color: var(--frame-link);
  font: 700 .91rem/1.3 Arial,sans-serif;
}
.welcome-scene .room-choices .button:hover { text-decoration: underline; }

.world-layout .stage--trial { grid-template-rows: minmax(0,1fr); }
.trial-room { display: grid; grid-template-columns: minmax(0,1fr) minmax(320px,44%); gap: 5px; }
.trial-fighter { display: flex; align-items: center; flex-wrap: wrap; place-content: start; gap: 4px; }
.trial-health { position: relative; width: clamp(70px,14vw,180px); }
.world-layout .trial-health .meter { height: 14px; margin: 0; }
.trial-health strong { position: absolute; inset: 0 0 0 4px; color: white; font: 700 .74rem/14px Arial,sans-serif; }
.trial-scene { display: grid; grid-template-rows: auto minmax(0,1fr); min-height: 0; }
.trial-scene header { display: flex; justify-content: end; align-items: center; gap: 7px; }
.world-layout .trial-scene h1 { margin: 0; }
.trial-passage {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(87px,25%);
  min-height: 0;
  border: 3px ridge #656762;
  background: #444642;
}
.trial-passage img { width: 100%; height: 100%; object-fit: contain; background: #201c18; }
.trial-controls { display: grid; align-content: start; gap: 4px; padding: 5px; }

.signup-layout { background: var(--frame-background); color: #161716; font: .88rem Arial,sans-serif; }
.signup-layout .shell { display: block; padding: 0; }
.signup-world { height: 100%; display: grid; grid-template-rows: 36px minmax(0,1fr) 47%; }
.signup-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 7px;
  background: #515649 var(--stone-trim) repeat-x center bottom / auto 18px;
  color: white;
}
.signup-bar .brand { color: white; font-size: 1rem; }
.signup-scene { padding: 7px; }
.signup-chat { background: var(--chat-paper); border-top: 4px ridge #c6c4bc; padding: 5px; color: #62635e; }
.signup-layout .signup-profile { margin: 4px 0; }
.signup-layout .signup-profile summary { color: var(--frame-link); cursor: pointer; }
.signup-layout .signup-profile .registry-fields { max-width: 400px; margin-top: 4px; }
.signup-layout .signup-profile .field {
  background: #fbfaf6;
  border: 1px solid #a0a09a;
  color: #151616;
  min-height: 26px;
  padding: 2px 5px;
}
.signup-layout .signup-profile textarea { min-height: 46px; height: 48px; resize: vertical; }
#signup-confirm {
  padding: 0;
  width: min(360px, calc(100% - 24px));
  color: #181916;
  background: #f7f1df;
  border: 1px solid #a9a18a;
  border-radius: 0;
  box-shadow: 1px 3px 11px #0004;
  font-family: Arial,sans-serif;
}
#signup-confirm::backdrop { background: #14161022; }
.signup-confirm-bar { display: flex; align-items: center; justify-content: space-between; background: #c9c2ab; padding-left: 7px; }
.signup-confirm-bar h2 { margin: 0; font: 700 1rem Arial,sans-serif; }
.signup-confirm-bar button { border: 0; background: transparent; font-size: 1.18rem; padding: 1px 7px; }
.signup-confirm-body { padding: 7px; }
.signup-confirm-body .button { background: #ece7d6; color: var(--frame-link); border-color: #9d988a; min-height: 24px; padding: 2px 7px; }

.world-layout .battle-console { overflow-y: auto; overscroll-behavior: contain; }
@media (min-width: 761px) {
  #signup-confirm { inset: max(62px,20dvh) auto auto 7.5vw; margin: 0; }
}
@media (max-width: 760px), (max-height: 575px) {
  .world-layout:not(.dock-expanded) { --dock-size: 26px; }
  .world-layout:not(.dock-expanded) .dock-divider { display: none; }
  .world-layout .dock-divider { height: 13px; }
  .world-layout .room-dock { grid-template-columns: minmax(0,1fr); }
  .world-layout .dock-tabs { justify-content: start; }
  .world-layout .dock-tabs button { padding-inline: 8px; }
  .world-layout .dock-expanded .dock-input-row { grid-column: 1; }
}
@media (max-width: 760px) {
  .world-layout .topbar-inner { grid-template: 25px auto / minmax(0,1fr) auto; }
  .world-layout .brand { grid-area: 1 / 1; background: none; }
  .world-layout .brand-mark { width: 20px; }
  .world-layout .top-nav { grid-column: 1 / -1; grid-template-columns: repeat(5,minmax(0,1fr)); }
  .world-layout .top-nav button { min-height: 24px; padding-inline: 1px; font-size: clamp(.63rem,2.9vw,.78rem); }
  .world-layout .top-status > * { padding-inline: 3px; }
  .shop-layout { grid-template-columns: minmax(0,1fr); padding: 5px; gap: 4px; }
  .shop-status { grid-area: 1 / 1; justify-self: end; }
  .shop-heading { grid-area: 1 / 1; justify-self: start; }
  .shop-sidebar { grid-row: 2; }
  .shop-departments { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 7px; }
  .world-layout .shop-departments h2 { width: 100%; }
  .shop-departments :is(.shop-department,ul), .shop-departments li { display: contents; }
  .world-layout .shop-departments h3 { display: none; }
  .shop-departments button { width: auto; font-size: .79rem; }
  .shop-row-icon :is(.stock-icon,.gear-art) { width: min(48px,100%); }
  .world-layout .shop-row { grid-template-columns: minmax(62px,16%) minmax(0,1fr); }
  .world-layout .shop-filters .field { height: 25px; }
  .shop-filters .shop-search { order: 0; }
  .welcome-scene, .world-layout .welcome-scene { grid-template: minmax(118px,.9fr) minmax(0,1fr) / repeat(2,minmax(0,1fr)); }
  .welcome-scene .room-location { grid-area: 2 / 1 / 3 / -1; }
  .welcome-scene .room-mentor { grid-area: 1 / 2; }
  .signup-world { grid-template-rows: 30px minmax(0,1fr) 30px; }
  .trial-room { grid-template: auto minmax(0,1fr) / minmax(0,1fr); }
  .trial-scene header { justify-content: space-between; }
}
.world-layout .dock-labeled {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 3px;
  width: auto;
  padding-inline: 5px;
  color: #282624;
  font: 700 .72rem/1 Arial, sans-serif;
  white-space: nowrap;
}
.dock-labeled .dock-icon { width: 18px; height: 18px; }
#dock-dialog { max-height: calc(100dvh - 24px); overflow: auto; }
#dock-dialog[data-tool="map"] { width: min(720px, calc(100% - 24px)); }
.dock-map-frame { margin-top: 6px; }
.world-layout button.chat-author {
  min-height: 0;
  padding: 0;
  border: 0;
  background: none;
  color: #274b6d;
  font: inherit;
  font-weight: 700;
  box-shadow: none;
  cursor: pointer;
}
.chat-author:hover, .chat-author:focus-visible { text-decoration: underline; }
.world-layout .dock-messages .chat-private, .world-layout .chat-private button.chat-author { color: #91282d; }
.chat-menu {
  position: fixed;
  z-index: 8;
  min-width: 108px;
  padding: 3px;
  border: 1px solid #8a744e;
  background: #eee6d5;
  box-shadow: 0 3px 10px #241a1466;
}
.chat-menu .chat-menu-item {
  display: block;
  width: 100%;
  min-height: 22px;
  padding: 2px 7px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #332819;
  text-align: left;
  font: .81rem Arial, sans-serif;
}
.chat-menu .chat-menu-item:is(:hover,:focus-visible) { background: #665239; color: #fff7e6; }
.chat-profile { display: grid; grid-template-columns: minmax(64px, 27%) minmax(0,1fr); gap: 12px; }
.chat-profile img { max-width: 100%; max-height: 160px; object-fit: contain; }
.chat-profile dt { font-weight: bold; }
.chat-profile dd { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-records { margin: 0; padding-inline-start: 18px; overflow-wrap: anywhere; }
.chat-records li { margin-bottom: 8px; }
#dock-dialog blockquote { padding: 6px 9px; margin: 6px 0 10px; border-inline-start: 2px solid #aa8a60; white-space: pre-wrap; overflow-wrap: anywhere; }
#chat-report-form textarea { display: block; width: 100%; }
#chat-report-error { color: #91282d; }
#trade-dialog { width: min(680px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto; }
.trade-offers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.trade-offer { padding: 10px; border: 2px solid #9e9483; overflow-wrap: anywhere; }
.trade-offer[data-confirmed="true"] { border-color: #3b8c43; box-shadow: inset 0 0 0 1px #64a56a; }
.trade-mark { font-size: .78rem; }
.trade-offer[data-confirmed="true"] .trade-mark { color: #286231; font-weight: 700; }
.trade-offer ul { padding-inline-start: 18px; }
.trade-offer input[type="number"] { display: block; width: 100%; }
.trade-offer fieldset { min-width: 0; margin: 0; padding: 4px 6px; }
.trade-offer .trade-item { display: flex; align-items: baseline; gap: 4px; }
.trade-actions { margin-top: 8px; }
#trade-error, #dock-player-error { color: #9c2a26; }
@media (max-width: 960px) {
  .world-layout .dock-input-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 3px 5px;
  }
  .dock-world-tools { flex-wrap: wrap; padding-inline-start: 0; border-inline-start: 0; }
}
@media (max-width: 515px) {
  .dock-labeled .dock-icon { display: none; }
}
