:root {
  --ink: #30443b;
  --muted: #78816d;
  --paper: #f3ead2;
  --edge: #b8a981;
  --gold: #d8b573;
  --green: #375c4b;
  --dark: #233b32;
  --red: #a76758;
  --nav: 70px;
  --top: 65px;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", "Yu Gothic",
    sans-serif;
  color: var(--ink);
  font-size: 14px;
  background: var(--dark);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overscroll-behavior: none;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  min-height: 42px;
  border: 1px solid #b8aa86;
  border-radius: 6px;
  background: #eee3c8;
  color: var(--ink);
  padding: 9px 14px;
  font-weight: 650;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 2px 0 #6c614522;
  transition:
    background 0.15s,
    transform 0.15s;
}
button:hover {
  background: #f9edcb;
}
button:active {
  transform: translateY(1px);
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #81b8c1;
  outline-offset: 3px;
}
.primary {
  background: var(--green);
  color: #fbefd1;
  border-color: #274a3a;
  box-shadow: 0 3px 0 #233f34;
}
.primary:hover {
  background: #456e59;
}
.large {
  min-height: 48px;
  width: 100%;
  font-size: 15px;
}
.small {
  min-height: 36px;
  padding: 7px 10px;
  font-size: 12px;
}
.icon-button {
  padding: 9px;
  min-width: 42px;
  flex-shrink: 0;
}
.text-link {
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
  color: #4a7260;
  font-size: 12px;
  justify-content: flex-start;
}
.text-link:hover {
  background: transparent;
  color: #162f25;
}
.icon {
  height: 20px;
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
  vertical-align: middle;
}
p {
  line-height: 1.85;
  margin: 10px 0 16px;
}
h1,
h2,
h3 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", Georgia, serif;
  margin: 0;
  line-height: 1.35;
}
h1 {
  font-size: 30px;
  font-weight: 750;
  letter-spacing: 0.05em;
}
h2 {
  font-size: 22px;
}
h3 {
  font-size: 16px;
}
small {
  font-size: 11px;
  line-height: 1.65;
  color: var(--muted);
}
b {
  font-weight: 700;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 0.17em;
  font-weight: 700;
  color: #9d875d;
  display: block;
  margin-bottom: 7px;
}
.paper {
  background: linear-gradient(110deg, #f8efd9ed, #eae0c6f5);
  border: 1px solid var(--edge);
  box-shadow:
    0 6px 24px #1b332933,
    inset 0 0 0 3px #f6ecd64d;
  border-radius: 8px;
}
.row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.wrap {
  flex-wrap: wrap;
}
.spread {
  justify-content: space-between;
}
.tag {
  display: inline-flex;
  align-items: center;
  border: 1px solid #c8b894;
  background: #e6d9b6;
  color: #7d6745;
  font-size: 10px;
  border-radius: 4px;
  padding: 4px 7px;
  white-space: nowrap;
}
.tag.green {
  background: #d4e1c7;
  color: #3f664c;
  border-color: #9fb491;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}
.section-heading > span {
  font-size: 11px;
  color: var(--muted);
}
.progress {
  height: 6px;
  background: #cec8ac;
  border-radius: 3px;
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  background: #6e9670;
  transition: width 0.4s;
}
.empty {
  padding: 24px 12px;
  color: var(--muted);
  text-align: center;
  line-height: 1.9;
  font-size: 13px;
}
.hint {
  font-size: 12px;
  line-height: 1.85;
  background: #ded7be77;
  border-left: 3px solid #b9a673;
  padding: 10px 12px;
  color: #746c52;
}
.disabled-reason {
  font-size: 12px;
  margin: 8px 0;
  color: #956454;
}
.lead {
  font-size: 18px;
  line-height: 1.9;
}
.loading {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: #e9d8ae;
}
.game {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.topbar {
  height: var(--top);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 25px;
  gap: 16px;
  background: linear-gradient(#2e493d, #263e34);
  color: #eddfbc;
  border-bottom: 1px solid #8d886153;
  z-index: 5;
}
.brand {
  border: none;
  background: none;
  color: #eddfbc;
  box-shadow: none;
  padding: 0;
  gap: 12px;
  text-align: left;
}
.brand:hover {
  background: none;
}
.brand > span:last-child {
  font-family: "Hiragino Mincho ProN", serif;
  font-size: 20px;
  letter-spacing: 0.07em;
}
.brand small {
  display: block;
  color: #a5b19a;
  font-family: system-ui;
  font-size: 10px;
  letter-spacing: 0.02em;
  font-weight: 400;
}
.lantern {
  font-size: 30px;
  color: #e8c581;
}
.top-meta {
  display: flex;
  gap: 22px;
  align-items: center;
}
.top-meta .icon-button {
  color: #d3c8a8;
  border-color: #73806c6b;
  background: transparent;
  min-width: 35px;
  min-height: 35px;
  padding: 6px;
}
.connection {
  font-size: 9px;
  color: #9abe97;
}
.connection.offline {
  color: #d49b85;
}
.time-badge {
  font-size: 10px;
  color: #a6b598;
  padding: 4px 8px;
  border: 1px solid #7180695a;
  border-radius: 4px;
}
.money {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  color: #eccc86;
  font-family: Georgia, serif;
  font-variant-numeric: tabular-nums;
}
.money small {
  color: #a9b192;
  font-size: 11px;
}
.main {
  flex: 1;
  position: relative;
  min-height: 0;
  overflow: hidden;
}
.bottom-nav {
  height: var(--nav);
  padding: 5px max(20px, env(safe-area-inset-right))
    max(6px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-shrink: 0;
  z-index: 5;
  background: linear-gradient(#2f4739, #263c32);
  border-top: 1px solid #b1a37380;
}
.bottom-nav button {
  position: relative;
  min-width: 100px;
  background: transparent;
  border: 0;
  color: #adbaa3;
  border-radius: 5px;
  box-shadow: none;
  gap: 12px;
  font-size: 13px;
  padding: 8px 23px;
}
.bottom-nav .icon {
  width: 23px;
  height: 23px;
}
.bottom-nav button.active {
  color: #f6e8bd;
  background: #6876513b;
  box-shadow: inset 0 2px #dfbe77;
}
.bottom-nav i {
  width: 5px;
  height: 5px;
  border-radius: 5px;
  background: #e4bd72;
  position: absolute;
  top: 6px;
  right: 17px;
}
#scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.scene-title {
  position: absolute;
  top: 25px;
  left: 28px;
  pointer-events: none;
  text-shadow:
    0 2px 12px #1c3329,
    0 1px 3px #1c3329;
  color: #fcf2d5;
}
.scene-title .eyebrow {
  color: #e4d8ac;
}
.scene-title h1 {
  font-size: 29px;
}
.scene-title p {
  font-size: 11px;
  color: #d6dec0;
  margin: 8px 0;
}
.scene-title.map-title {
  top: 22px;
}
.map-controls {
  position: absolute;
  left: 25px;
  bottom: 28px;
  display: flex;
  gap: 6px;
}
.map-controls button {
  background: #ecdfbfe8;
}
.city-shortcuts {
  position: absolute;
  top: 27px;
  right: 25px;
  display: flex;
  gap: 6px;
}
.city-shortcuts button {
  font-size: 11px;
  min-height: 35px;
  background: #f0e6cbd9;
}
.city-paper {
  position: absolute;
  right: 25px;
  top: 94px;
  width: 312px;
  padding: 23px;
}
.city-paper h2 {
  font-size: 22px;
}
.city-paper p {
  font-size: 13px;
  margin: 13px 0 18px;
}
.city-paper .primary {
  width: 100%;
}
.report-callout {
  margin-top: 15px;
  display: flex;
  width: 100%;
  text-align: left;
  padding: 12px 10px;
  background: #dccd9d42;
  border: 1px solid #c7b78c6b;
  gap: 10px;
  justify-content: flex-start;
}
.report-callout span {
  flex: 1;
}
.report-callout b {
  font-size: 12px;
  display: block;
}
.report-callout small {
  font-size: 10px;
  display: block;
}
.fleet {
  position: absolute;
  left: 25px;
  bottom: 82px;
  width: 355px;
  padding: 7px 15px;
}
.squad-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
}
.squad-strip + .squad-strip {
  border-top: 1px solid #c8b99766;
}
.squad-strip > div:nth-child(2) {
  flex: 1;
  min-width: 0;
}
.squad-strip b {
  font-size: 13px;
}
.squad-strip small {
  display: block;
  max-width: 185px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 10px;
}
.tiny-party {
  display: flex;
  align-items: end;
}
.tiny-party .portrait {
  height: 39px;
  width: 28px;
  margin-left: -5px;
}
.tiny-party .portrait:first-child {
  margin: 0;
}
.news-ribbon {
  position: absolute;
  bottom: 25px;
  left: 260px;
  right: 25px;
  min-height: 41px;
  background: #223e32ce;
  border: 1px solid #a3aa7970;
  color: #e9e4c9;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 13px;
  border-radius: 5px;
}
.news-ribbon > span {
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}
.news-ribbon .small {
  min-height: 28px;
  background: none;
  border-color: #9eac8455;
  color: #e9e3c6;
}
.news-ribbon > .icon {
  color: #d3c285;
}
.dungeon-picker {
  position: absolute;
  top: 115px;
  left: 28px;
  font-size: 12px;
}
.dungeon-picker span {
  font-size: 10px;
  border-radius: 50%;
  background: #ddd0a8;
  padding: 3px 5px;
}
.expedition {
  position: absolute;
  right: 18px;
  top: 18px;
  bottom: 18px;
  width: 365px;
  overflow: auto;
  padding: 23px;
}
.expedition > .eyebrow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: 0;
  font-size: 10px;
}
.expedition h2 {
  font-size: 25px;
  margin: 12px 0;
}
.dungeon-progress {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin: 15px 0 8px;
}
.dungeon-progress span {
  color: #8f7e51;
}
.node-path {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  margin: 20px -5px 16px;
  position: relative;
}
.node-path:before {
  content: "";
  position: absolute;
  height: 2px;
  background: #bdad83;
  left: 24px;
  right: 24px;
  top: 19px;
}
.node {
  border: 0;
  background: transparent;
  box-shadow: none;
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  padding: 0;
  gap: 3px;
}
.node > span {
  height: 36px;
  width: 36px;
  border: 1px solid #af9e76;
  border-radius: 50%;
  background: #e2d5ad;
  display: grid;
  place-items: center;
  font-size: 15px;
}
.node.selected > span {
  background: #385c49;
  color: #f0deae;
  border-color: #37583f;
  box-shadow: 0 0 0 3px #b9c7a4;
}
.node.cleared > span {
  background: #8fa680;
}
.node > b {
  font-size: 11px;
}
.node > small {
  font-size: 9px;
}
.node:hover {
  background: none;
}
.node-detail {
  border-top: 1px solid #cbbb966b;
  padding-top: 17px;
}
.node-detail p {
  font-size: 12px;
  line-height: 1.85;
  margin: 8px 0 11px;
}
.node-detail .section-heading {
  margin-bottom: 7px;
}
.node-detail .objective {
  display: flex;
  gap: 5px;
  align-items: center;
  font-weight: 600;
  color: #44694f;
}
.objective > .icon {
  height: 16px;
  width: 16px;
}
.objective > span {
  font-weight: 400;
  margin-left: auto;
}
.enemy-intel {
  padding: 10px;
  background: #dcd5bd65;
  border-radius: 5px;
  border: 1px dashed #b7ac8a;
  margin: 10px 0;
}
.unknown-enemies {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7e8168;
  font-size: 12px;
}
.unknown-enemies small {
  display: block;
  font-size: 10px;
}
.enemy-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}
.enemy-tags span {
  font-size: 10px;
  display: flex;
  gap: 3px;
  align-items: center;
  background: #e9dfc5;
  padding: 3px 5px;
  border-radius: 3px;
}
.enemy-tags .icon {
  width: 13px;
  height: 13px;
}
.enemy-intel > small {
  font-size: 9px;
}
.node-detail > .row {
  font-size: 11px;
  color: #807557;
}
.reward-preview {
  display: flex;
  gap: 8px;
  margin: 15px 0 4px;
}
.reward-preview > span {
  width: 50%;
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 0 8px;
  align-items: center;
}
.reward-preview .item-art,
.reward-preview .icon {
  grid-row: span 2;
  width: 31px;
  height: 37px;
}
.reward-preview b {
  font-size: 12px;
}
.reward-preview small {
  font-size: 9px;
}
.departure {
  border-top: 1px solid #c6b99099;
  margin-top: 14px;
  padding-top: 15px;
}
.team-tabs {
  display: flex;
  gap: 5px;
}
.team-tabs button {
  flex: 1;
  font-size: 12px;
  min-height: 36px;
  padding: 7px 12px;
  gap: 8px;
}
.team-tabs button.selected,
.market-tabs button.selected {
  background: #d3ddbd;
  color: #325841;
  border-color: #8f9c77;
}
.team-tabs small {
  font-size: 9px;
}
.preview-party {
  justify-content: center;
  padding: 10px 0;
}
.preview-party > span {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.preview-party .portrait {
  height: 53px;
  width: 46px;
  margin: 0 10px;
}
.preview-party small {
  font-size: 9px;
}
.departure-cost {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.departure-cost > span {
  font-size: 11px;
  white-space: nowrap;
}
.departure-cost > b {
  font-size: 16px;
}
.departure-cost > small {
  font-size: 9px;
  max-width: 160px;
}
.departure > .primary {
  min-height: 46px;
}
.departure > small {
  font-size: 10px;
  display: block;
  text-align: center;
  margin-top: 7px;
}
.room {
  height: 100%;
  overflow: auto;
  padding: 28px 40px 35px;
  background:
    radial-gradient(ellipse at top, #4e604567, #203b3155),
    url("/assets/guild.png") center 44% / cover fixed;
}
.room-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  max-width: 1300px;
  margin: 0 auto 22px;
  color: #f1e9cf;
  text-shadow: 0 2px 5px #20342980;
}
.room-heading .eyebrow {
  color: #c6c69a;
}
.room-heading h1 {
  font-size: 29px;
}
.room-heading p {
  font-size: 12px;
  margin: 7px 0 0;
  color: #d0d7bd;
}
.room-heading button {
  text-shadow: none;
}
.hero-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.3fr) minmax(300px, 0.9fr);
  gap: 25px;
  max-width: 1140px;
  margin: auto;
}
.formation-wrap > .row {
  color: #e8dfc2;
}
.formation-wrap > .row > b {
  font-size: 13px;
}
.formation-board {
  background: linear-gradient(#4e6654, #314c3e);
  border: 5px solid #9c9371;
  box-shadow:
    inset 0 0 0 2px #bfc29d,
    0 7px 15px #17302550;
  padding: 18px 25px;
  margin: 17px 0;
  border-radius: 8px;
  position: relative;
}
.board-direction {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-align: center;
  color: #c8c5a5;
  padding: 4px 0 16px;
}
.formation-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.formation-cell {
  position: relative;
  min-height: 127px;
  border: 1px solid #9dae8e;
  background: linear-gradient(145deg, #aec19950, #7e9a7d);
  box-shadow: 0 5px #233e3444;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 10px 5px;
  color: #f0e7ca;
}
.formation-cell:hover {
  background: #98ae86;
}
.formation-cell.selected {
  outline: 3px solid #dfbd75;
  border-color: #f2dfae;
  background: linear-gradient(145deg, #98ae7d, #637b56);
}
.formation-cell .portrait {
  width: 67px;
  height: 75px;
}
.formation-cell > .icon {
  width: 25px;
  height: 25px;
  margin: 25px 0;
  color: #b6c2a1;
}
.formation-cell > b {
  font-size: 13px;
}
.formation-cell > small {
  color: #d0d8bb;
  font-size: 9px;
}
.formation-board > p {
  font-size: 10px;
  text-align: center;
  color: #becaad;
  margin: 18px 0 1px;
}
.traits {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}
.trait {
  background: #e0d9be96;
  border: 1px solid #b4aa8677;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 75px;
  font-size: 11px;
  padding: 7px 11px;
}
.trait span {
  font-size: 9px;
  color: #777b63;
}
.trait.on {
  background: #e6d4a2;
  border-color: #e0c483;
}
.reserve {
  padding: 17px 20px;
}
.reserve h3 {
  font-size: 16px;
}
.reserve p {
  font-size: 12px;
}
.reserve-list {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.reserve-list > button {
  display: flex;
  flex-direction: column;
  background: #eee4c8;
  min-width: 87px;
  padding: 7px 9px;
  gap: 0;
}
.reserve-list .portrait {
  height: 50px;
  width: 45px;
}
.reserve-list b {
  font-size: 12px;
}
.reserve-list small {
  font-size: 9px;
}
.reserve > small {
  display: block;
  margin-top: 12px;
  font-size: 10px;
}
.hero-detail {
  padding: 22px 24px;
  align-self: start;
}
.hero-name {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hero-name > .portrait {
  width: 78px;
  height: 88px;
  background: #d0d8bc;
  border: 2px solid #899879;
  border-radius: 5px;
}
.hero-name h2 {
  font-size: 26px;
  margin: 3px 0 10px;
}
.hero-name small {
  font-size: 14px;
  color: #8d7c52;
}
.hero-name .tag {
  margin-right: 4px;
}
.skill-text {
  font-size: 12px;
  margin: 18px 0;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 10px 0;
  gap: 10px 17px;
  border-top: 1px solid #c4b89188;
  border-bottom: 1px solid #c4b89188;
  margin-bottom: 9px;
}
.hero-stats > span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 10px;
  color: #7a7e63;
  gap: 8px;
}
.hero-stats b {
  font-size: 20px;
  font-family: Georgia, serif;
  color: #435541;
}
.hero-detail > small {
  font-size: 9px;
}
.equipment-slots {
  margin: 20px 0;
}
.equipment-row {
  display: flex;
  width: 100%;
  gap: 11px;
  text-align: left;
  padding: 10px;
  background: #eee3c757;
  box-shadow: none;
  min-height: 68px;
  margin-bottom: 8px;
  border-color: #c6b8958c;
}
.equipment-row .item-art {
  width: 43px;
  height: 43px;
  background: #ded4b7;
  border: 1px solid #b8b396;
  border-radius: 5px;
  padding: 4px;
}
.equipment-row > span {
  flex: 1;
  min-width: 0;
}
.equipment-row b {
  font-size: 12px;
  display: block;
}
.equipment-row small {
  font-size: 9px;
  display: block;
  line-height: 1.7;
}
.equipment-row > .icon {
  width: 16px;
  height: 16px;
}
.xp-line {
  margin: 15px 0 22px;
}
.xp-line > span {
  font-size: 10px;
  display: block;
  text-align: right;
  margin-bottom: 6px;
}
.xp-line > small {
  font-size: 9px;
  display: block;
  margin-top: 6px;
}
.hero-detail > .primary {
  width: 100%;
}
.forge-layout {
  display: grid;
  grid-template-columns: minmax(360px, 1.4fr) minmax(290px, 0.85fr);
  max-width: 1150px;
  gap: 24px;
  margin: auto;
}
.recipe-book {
  padding: 23px;
}
.book-category {
  font-size: 13px;
  color: #8c7b52;
  margin: 24px 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #bbac8866;
}
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}
.recipe {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  padding: 14px 8px;
  background: #e9dfc666;
  min-height: 132px;
  box-shadow: 0 2px 0 #af9e7555;
}
.recipe.selected {
  background: #d9dfbd;
  border: 2px solid #738965;
  padding: 13px 7px;
  box-shadow: 0 0 0 2px #dfd3a6;
}
.recipe .item-art {
  width: 48px;
  height: 48px;
}
.recipe > b {
  font-size: 11px;
  text-align: center;
}
.recipe > small {
  font-size: 9px;
  line-height: 1.7;
  text-align: center;
}
.craft-desk {
  padding: 24px;
  align-self: start;
  position: sticky;
  top: 0;
  text-align: center;
}
.craft-object {
  height: 142px;
  margin: -5px -5px 15px;
  display: grid;
  place-items: center;
  position: relative;
  background: radial-gradient(ellipse, #d6be793b 0%, transparent 65%);
  border-bottom: 1px solid #b7aa8166;
}
.craft-object > .item-art {
  height: 105px;
  width: 105px;
  filter: drop-shadow(4px 6px 0 #7b806134);
  animation: float 4s ease-in-out infinite;
}
.spark {
  position: absolute;
  color: #af9753;
  animation: twinkle 3s infinite;
}
.spark.s1 {
  top: 17px;
  left: 70px;
  font-size: 25px;
}
.spark.s2 {
  bottom: 40px;
  right: 65px;
  font-size: 18px;
  animation-delay: 1.5s;
}
.craft-desk > h2 {
  font-size: 26px;
}
.craft-effect {
  text-align: left;
  font-size: 13px;
  margin: 17px 0;
}
.materials {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 15px 0;
}
.material-cost {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #ded9bf7c;
  padding: 6px 9px;
  font-size: 12px;
  border-radius: 4px;
}
.material-cost > .item-art {
  width: 25px;
  height: 25px;
}
.material-cost b {
  margin-left: auto;
}
.material-cost small {
  min-width: 48px;
  text-align: right;
  font-size: 10px;
}
.material-cost.short {
  color: #ac6b54;
  background: #ecd6bd7c;
}
.craft-desk > .row {
  font-size: 12px;
}
.quality-explain {
  display: flex;
  gap: 6px;
  justify-content: center;
  flex-wrap: wrap;
  border-top: 1px solid #c5b69188;
  margin-top: 10px;
  padding-top: 15px;
  margin-bottom: 15px;
}
.quality-explain span {
  padding: 4px 8px;
  background: #d9d6bd;
  font-size: 10px;
  border-radius: 3px;
}
.quality-explain span:nth-child(2) {
  background: #c9dbca;
  color: #47775c;
}
.quality-explain span:nth-child(3) {
  background: #dbd1e6;
  color: #826694;
}
.quality-explain small {
  width: 100%;
  font-size: 9px;
}
.forge-own {
  border-top: 1px solid #c0b18777;
  margin-top: 22px;
  padding-top: 18px;
  text-align: left;
}
.forge-own h3 {
  font-size: 14px;
  margin-bottom: 10px;
}
.market-room {
  background-position: center 64%;
}
.market-room > .room-heading,
.market-bar,
.market-info,
.offer-grid,
.order-board,
.trading-layout,
.market-footnote {
  max-width: 1260px;
  margin-left: auto;
  margin-right: auto;
}
.market-bar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding: 10px 13px;
}
.market-tabs {
  display: flex;
  gap: 5px;
}
.market-tabs button {
  font-size: 12px;
  padding: 8px 13px;
  min-height: 38px;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}
.search-controls {
  display: flex;
  gap: 7px;
  max-width: 390px;
  align-items: center;
}
.search-controls input {
  font-size: 12px;
  width: 220px;
  height: 38px;
}
.search-controls select {
  width: 125px;
  font-size: 11px;
  height: 38px;
}
.market-info {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #e4e2c7;
  padding: 17px 2px 13px;
}
.offer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}
.offer {
  padding: 16px;
}
.offer-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.offer-item > .item-art {
  width: 49px;
  height: 49px;
  padding: 5px;
  border: 1px solid #b6b69d;
  background: #d6d9bf;
  border-radius: 5px;
}
.offer-item > div {
  flex: 1;
}
.offer-item h3 {
  font-size: 14px;
  margin: 3px 0;
}
.offer-item small {
  font-size: 9px;
}
.offer-item .tag {
  font-size: 9px;
  padding: 3px 6px;
}
.offer p {
  font-size: 11px;
  line-height: 1.8;
  min-height: 40px;
  margin: 14px 0;
  color: #7b7b60;
}
.seller {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 9px;
  color: #929075;
  border-bottom: 1px solid #c0b48c66;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.offer-price {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.offer-price > b {
  font-family: Georgia, serif;
  font-size: 23px;
  color: #8c754a;
}
.offer-price small {
  font-family: system-ui;
  font-size: 9px;
}
.offer-price button {
  padding: 7px 10px;
  min-height: 36px;
  font-size: 11px;
}
.q1 .item-art,
.item-art.q1 {
  background: #d0dfc8;
  border-color: #83a586;
}
.q2 .item-art,
.item-art.q2 {
  background: #e1d3e3;
  border-color: #b49abf;
}
.order-board {
  padding: 12px 20px;
}
.order-heading,
.order-row {
  display: grid;
  grid-template-columns: 1fr 115px 120px 120px;
  gap: 15px;
  align-items: center;
  padding: 13px 8px;
}
.order-heading {
  font-size: 10px;
  color: #9b8860;
  border-bottom: 1px solid #bbaa7e88;
}
.order-row {
  border-bottom: 1px solid #c2b79455;
  min-height: 81px;
}
.order-product {
  display: flex;
  gap: 15px;
  align-items: center;
}
.order-product > .item-art {
  width: 46px;
  height: 46px;
}
.order-product h3 {
  font-size: 15px;
}
.order-product small {
  font-size: 10px;
}
.order-row > b {
  font-family: Georgia, serif;
  font-size: 21px;
  color: #8e724b;
}
.order-row > span {
  font-size: 13px;
}
.order-row > span > small {
  display: block;
  font-size: 10px;
}
.order-row > button {
  font-size: 12px;
  min-height: 38px;
}
.trading-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.trading-layout > section {
  padding: 24px;
}
.trading-layout h2 {
  font-size: 20px;
  margin-bottom: 13px;
}
.trading-layout h2:not(:first-child) {
  margin-top: 30px;
}
.delivery {
  display: flex;
  gap: 15px;
  align-items: center;
  margin: 15px 0;
}
.delivery > .item-art {
  width: 38px;
  height: 38px;
}
.delivery b {
  font-size: 12px;
}
.delivery small {
  display: block;
}
.mine-row {
  grid-template-columns: 1fr 75px 85px;
}
.mine-row > b {
  font-size: 16px;
}
.journal-line {
  font-size: 12px;
  line-height: 1.8;
  border-bottom: 1px solid #c3b89466;
  padding-bottom: 13px;
  margin-bottom: 14px;
}
.market-footnote {
  font-size: 10px;
  text-align: center;
  line-height: 1.8;
  color: #d6ddc4;
  margin-top: 22px;
  margin-bottom: 6px;
}
.veil {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #142d27ad;
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 25px;
}
.modal {
  width: min(590px, 100%);
  max-height: calc(100dvh - 50px);
  border: 2px solid #b9a778;
  border-radius: 10px;
  background: linear-gradient(130deg, #f7efd9, #e9dfc4);
  box-shadow: 0 18px 80px #0e271b77;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 19px 23px;
  border-bottom: 1px solid #bcad8866;
  flex-shrink: 0;
}
.modal > header .eyebrow {
  font-size: 9px;
  margin-bottom: 3px;
}
.modal > header h2 {
  font-size: 22px;
}
.modal > header .icon-button {
  border: 0;
  background: none;
  box-shadow: none;
}
.modal-body {
  overflow: auto;
  padding: 22px 25px 27px;
  overscroll-behavior: contain;
}
.modal-body > p {
  font-size: 13px;
}
.modal-body > small {
  font-size: 10px;
  display: block;
  line-height: 1.85;
  margin-top: 16px;
}
.modal-body > h3 {
  margin: 20px 0 12px;
}
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 21px 0 8px;
}
.modal-actions > button {
  flex: 1;
  font-size: 12px;
  white-space: nowrap;
}
.wide-modal {
  width: min(820px, 100%);
}
.battle-modal {
  width: min(880px, 100%);
}
.battle-heading {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  margin-bottom: 15px;
}
.battle-heading > span {
  color: #8b7a57;
}
#battle-canvas {
  width: 100%;
  height: 360px;
  display: block;
  border: 4px solid #889278;
  border-radius: 5px;
  image-rendering: pixelated;
}
.battle-controls {
  display: flex;
  gap: 7px;
  align-items: center;
  margin: 13px 0;
}
.battle-controls > button {
  font-size: 11px;
  min-height: 34px;
  padding: 6px 10px;
}
.battle-controls > span {
  font-size: 10px;
  margin-left: auto;
  color: #898169;
}
#battle-end p {
  font-size: 12px;
}
#battle-end .primary {
  width: 100%;
}
.result-title {
  text-align: center;
  margin: 15px 0 20px !important;
  font-size: 32px;
  color: #5d7754;
}
.result-stats {
  display: flex;
  justify-content: center;
  gap: 37px;
  font-size: 10px;
  color: #8b8060;
  margin-bottom: 23px;
}
.result-stats b {
  display: block;
  text-align: center;
  font:
    22px Georgia,
    serif;
  color: #8b7849;
  margin-top: 6px;
}
.loot-row {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  background: #d3d5b73d;
  padding: 18px 12px;
  border: 1px solid #c4ba9455;
  border-radius: 6px;
}
.loot-row > span {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.loot-row .item-art {
  width: 50px;
  height: 50px;
}
.loot-row b {
  font-size: 12px;
}
.battle-stats {
  border-top: 1px solid #c2b28a88;
  margin-top: 18px;
  padding-top: 8px;
}
.battle-stats > div {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 65px;
  gap: 8px;
  font-size: 10px;
  padding: 9px 0;
  border-bottom: 1px solid #c9be9b55;
}
.battle-stats > div > span {
  color: #888068;
}
.item-reveal {
  text-align: center;
  margin: 5px 0 25px;
}
.item-reveal > .item-art {
  display: block;
  width: 105px;
  height: 105px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 7px 2px #a3a28066);
  background: none;
  border: 0;
  animation: float 4s infinite;
}
.item-reveal p {
  font-size: 13px;
  text-align: left;
}
.item-reveal .affix {
  padding: 13px;
  background: #d9debf;
  border: 1px solid #a8b68c;
  text-align: center;
  font-weight: 700;
  color: #5b7853;
}
.equipment-choice {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.choice-hero {
  display: flex;
  text-align: left;
  justify-content: flex-start;
  gap: 12px;
  padding: 12px;
}
.choice-hero .portrait {
  width: 53px;
  height: 61px;
}
.choice-hero > span {
  flex: 1;
}
.choice-hero small {
  display: block;
  font-size: 10px;
  line-height: 1.8;
}
.choice-hero strong {
  font-size: 11px;
  color: #6c8c59;
  display: block;
  margin-top: 6px;
}
.hire-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.hire-hero {
  display: flex;
  gap: 10px;
  border: 1px solid #bcac8555;
  flex-wrap: wrap;
  padding: 13px;
  border-radius: 5px;
}
.hire-hero > .portrait {
  width: 45px;
  height: 52px;
}
.hire-hero > div {
  flex: 1;
}
.hire-hero h3 {
  font-size: 14px;
}
.hire-hero p {
  font-size: 10px;
  margin: 6px 0;
}
.hire-hero small {
  font-size: 9px;
}
.hire-hero > button {
  margin-left: auto;
  min-height: 32px;
  font-size: 11px;
}
.stock-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.stock-grid > button {
  display: flex;
  flex-direction: column;
  padding: 12px;
  gap: 5px;
}
.stock-grid .item-art {
  height: 42px;
  width: 42px;
}
.stock-grid b {
  font-size: 11px;
}
.stock-grid span {
  font-size: 11px;
}
.source-section {
  padding-bottom: 22px;
}
.source-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
}
.source-section .item-art {
  width: 40px;
  height: 40px;
}
.source-section p {
  font-size: 12px;
}
.trade-item {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 17px;
}
.trade-item > .item-art {
  width: 70px;
  height: 70px;
}
.trade-item > h2 {
  font-size: 23px;
}
label {
  font-size: 12px;
  display: block;
  color: #7d7455;
  margin: 17px 0;
}
input,
select {
  display: block;
  border: 1px solid #b9ac89;
  background: #fff7e5;
  min-height: 43px;
  border-radius: 5px;
  width: 100%;
  padding: 8px 11px;
  color: #3d513f;
  margin-top: 7px;
}
#trade-total {
  padding: 12px;
  background: #dce0c5;
  font-weight: 700;
  border-radius: 5px;
}
.dungeon-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.dungeon-list > button {
  text-align: left;
  justify-content: flex-start;
  padding: 11px 13px;
}
.dungeon-list > button > span {
  flex: 1;
}
.dungeon-list b {
  font-size: 13px;
  display: block;
}
.dungeon-list small {
  font-size: 10px;
  display: block;
}
.leader-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 15px 0;
  border-bottom: 1px solid #b8ac8b77;
}
.help-steps section {
  margin-bottom: 24px;
}
.help-steps b {
  font-family: serif;
  font-size: 19px;
}
.help-steps p {
  font-size: 13px;
  margin: 8px 0;
}
.welcome {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 50px 10%;
  background: #314b37;
  position: relative;
  overflow: hidden;
}
.welcome-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent 30%, #1833269c),
    url("/assets/guild.png") 27% 47% / max(100%, 1100px) auto;
  filter: saturate(0.9);
}
.welcome-paper {
  position: relative;
  z-index: 1;
  width: 420px;
  max-width: 100%;
  padding: 43px;
  background: #f2e6cddd;
  border: 1px solid #d7c99e;
  border-radius: 8px;
  box-shadow: 0 18px 70px #16322766;
  backdrop-filter: blur(6px);
}
.welcome-paper > h1 {
  font-size: 55px;
  margin: 16px 0 27px;
}
.welcome-paper .lead {
  font-size: 17px;
}
.welcome-paper > p:not(.lead) {
  font-size: 13px;
}
.welcome-paper small {
  font-size: 10px;
  display: block;
  margin-top: 18px;
  line-height: 1.85;
}
.welcome-paper > .eyebrow {
  font-size: 9px;
}
#toast {
  position: fixed;
  z-index: 60;
  top: calc(var(--top) + 10px);
  left: 50%;
  transform: translate(-50%, -15px);
  background: #263e35f5;
  color: #f9e9bc;
  box-shadow: 0 4px 24px #193a3d44;
  border: 1px solid #b3aa76;
  padding: 14px 20px;
  border-radius: 7px;
  max-width: min(600px, 90vw);
  width: max-content;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s;
  font-size: 12px;
  line-height: 1.8;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
.saving {
  cursor: progress;
}
.saving button[data-action="craft"],
.saving button[data-action="dispatch"],
.saving form button {
  pointer-events: none;
  opacity: 0.65;
}
@keyframes float {
  50% {
    transform: translateY(-5px);
  }
}
@keyframes twinkle {
  50% {
    opacity: 0.3;
    transform: scale(0.7);
  }
}
@media (min-width: 1500px) {
  .city-paper {
    right: 45px;
    top: 105px;
    width: 345px;
    padding: 28px;
  }
  .expedition {
    right: 30px;
    width: 385px;
  }
  .scene-title {
    left: 40px;
  }
  .fleet {
    left: 40px;
    width: 385px;
  }
  .room {
    padding-top: 34px;
  }
  .offer-grid {
    gap: 20px;
  }
}
@media (max-width: 1100px) {
  .topbar {
    padding: 0 18px;
  }
  .room {
    padding: 23px;
  }
  .offer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .city-paper {
    width: 290px;
    right: 18px;
    padding: 20px;
  }
  .city-shortcuts {
    right: 18px;
  }
  .city-shortcuts button {
    font-size: 10px;
    padding: 6px 10px;
  }
  .market-bar {
    flex-wrap: wrap;
    gap: 6px;
  }
  .search-controls {
    max-width: none;
    width: 100%;
  }
  .search-controls input {
    flex: 1;
  }
  .market-bar .market-tabs {
    width: 100%;
  }
  .market-tabs button {
    flex: 1;
  }
  .hero-layout {
    gap: 17px;
    grid-template-columns: 1.1fr 1fr;
  }
  .hero-detail {
    padding: 19px;
  }
  .formation-board {
    padding: 15px;
  }
  .recipe-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .forge-layout {
    gap: 16px;
  }
  .craft-desk {
    padding: 20px;
  }
  .expedition {
    width: 340px;
    padding: 20px;
  }
  .map-title h1 {
    font-size: 24px;
  }
  .top-meta {
    gap: 16px;
  }
}
@media (max-width: 760px) {
  :root {
    --top: 57px;
    --nav: 68px;
  }
  .topbar {
    padding: 0 12px;
    gap: 7px;
  }
  .brand > span:last-child {
    font-size: 16px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand {
    gap: 7px;
  }
  .lantern {
    font-size: 25px;
  }
  .connection span {
    display: none;
  }
  .top-meta {
    gap: 10px;
  }
  .time-badge {
    font-size: 8px;
    padding: 3px 5px;
  }
  .money {
    font-size: 18px;
    gap: 5px;
  }
  .money > .icon {
    width: 16px;
    height: 16px;
  }
  .top-meta > .icon-button {
    padding: 5px;
    min-width: 31px;
    min-height: 32px;
  }
  .bottom-nav {
    gap: 0;
    padding-left: 3px;
    padding-right: 3px;
  }
  .bottom-nav button {
    min-width: 0;
    flex: 1;
    padding: 6px 3px;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
  }
  .bottom-nav .icon {
    width: 21px;
    height: 21px;
  }
  .bottom-nav i {
    right: 15px;
    top: 5px;
  }
  .scene-title {
    left: 17px;
    top: 20px;
  }
  .scene-title h1 {
    font-size: 23px;
  }
  .scene-title .eyebrow {
    font-size: 8px;
  }
  .scene-title p {
    font-size: 9px;
  }
  .city-shortcuts {
    top: 91px;
    left: 16px;
    right: auto;
    gap: 5px;
  }
  .city-shortcuts button {
    font-size: 10px;
    min-height: 31px;
    padding: 5px 9px;
    background: #f1e7c6df;
  }
  .city-paper {
    top: auto;
    bottom: 183px;
    right: 12px;
    width: 270px;
    padding: 16px;
  }
  .city-paper .eyebrow {
    font-size: 8px;
    margin-bottom: 4px;
  }
  .city-paper h2 {
    font-size: 20px;
  }
  .city-paper p {
    font-size: 11px;
    margin: 8px 0 12px;
    line-height: 1.75;
  }
  .city-paper > .primary {
    font-size: 12px;
    min-height: 39px;
  }
  .city-paper .report-callout {
    margin-top: 10px;
    padding: 9px 6px;
  }
  .fleet {
    left: 12px;
    right: 12px;
    width: auto;
    bottom: 55px;
    padding: 2px 12px;
  }
  .squad-strip {
    padding: 8px 0;
    gap: 10px;
  }
  .tiny-party .portrait {
    width: 25px;
    height: 31px;
    margin-left: -6px;
  }
  .squad-strip b {
    font-size: 11px;
  }
  .squad-strip small {
    max-width: 180px;
    font-size: 9px;
  }
  .squad-strip .small {
    min-height: 31px;
  }
  .squad-strip .icon-button {
    min-height: 32px;
    min-width: 32px;
    padding: 5px;
  }
  .news-ribbon {
    left: 12px;
    right: 12px;
    bottom: 9px;
    padding: 4px 9px;
    min-height: 36px;
    gap: 7px;
  }
  .news-ribbon > span {
    font-size: 9px;
  }
  .news-ribbon > .icon {
    width: 15px;
    height: 15px;
  }
  .map-controls {
    left: 13px;
    bottom: auto;
    top: 137px;
    gap: 4px;
  }
  .map-controls > .icon-button {
    min-width: 31px;
    min-height: 31px;
    padding: 6px;
  }
  .map-controls .icon {
    width: 16px;
    height: 16px;
  }
  .map-controls > .small {
    min-height: 31px;
    padding: 6px;
    font-size: 10px;
  }
  .map-main {
    overflow: auto;
    display: flex;
    flex-direction: column;
    background: #415a45;
  }
  .map-main > #scene {
    height: 340px;
    flex-shrink: 0;
    position: relative;
    display: block;
    min-height: 340px;
  }
  .map-title {
    top: 20px !important;
    left: 17px;
  }
  .map-title h1 {
    font-size: 23px;
  }
  .map-main > .map-controls {
    top: 270px;
  }
  .dungeon-picker {
    top: 97px;
    left: 17px;
    font-size: 11px;
    min-height: 35px;
  }
  .expedition {
    position: relative;
    inset: auto;
    margin: 0 10px 15px;
    width: auto;
    overflow: visible;
    padding: 22px;
    flex-shrink: 0;
    border-radius: 9px;
    box-shadow: 0 -6px 20px #29472f44;
  }
  .expedition h2 {
    font-size: 25px;
  }
  .node-path {
    margin-top: 20px;
  }
  .departure {
    margin-top: 20px;
  }
  .node-detail p {
    font-size: 12px;
  }
  .reward-preview small {
    font-size: 9px;
  }
  .room {
    padding: 20px 13px 25px;
    background-attachment: scroll;
  }
  .room-heading {
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 18px;
  }
  .room-heading h1 {
    font-size: 26px;
  }
  .room-heading p {
    font-size: 11px;
  }
  .room-heading .eyebrow {
    font-size: 8px;
  }
  .room-heading button {
    font-size: 11px;
    min-height: 36px;
    padding: 8px 10px;
  }
  .hero-layout {
    grid-template-columns: 1fr;
    gap: 17px;
  }
  .formation-wrap > .row {
    gap: 10px;
  }
  .formation-wrap > .row > b {
    font-size: 11px;
  }
  .formation-board {
    margin-top: 13px;
    padding: 14px 17px;
  }
  .formation-cell {
    min-height: 112px;
  }
  .formation-cell .portrait {
    width: 55px;
    height: 64px;
  }
  .formation-cell > .icon {
    margin: 20px 0;
  }
  .formation-cell > b {
    font-size: 12px;
  }
  .formation-board > p {
    font-size: 9px;
  }
  .traits {
    gap: 5px;
    margin-bottom: 13px;
  }
  .trait {
    min-width: 62px;
    padding: 6px 9px;
  }
  .trait b {
    font-size: 10px;
  }
  .reserve {
    padding: 14px 16px;
  }
  .reserve h3 {
    font-size: 15px;
  }
  .hero-detail {
    padding: 22px;
  }
  .hero-detail > .primary {
    min-height: 43px;
  }
  .hero-name > .portrait {
    width: 66px;
    height: 77px;
  }
  .forge-layout {
    display: flex;
    flex-direction: column;
  }
  .recipe-book {
    padding: 18px;
  }
  .recipe-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
  }
  .recipe {
    padding: 11px 5px;
    min-height: 113px;
  }
  .recipe.selected {
    padding: 10px 4px;
  }
  .recipe > .item-art {
    width: 39px;
    height: 39px;
  }
  .recipe > b {
    font-size: 10px;
  }
  .recipe > small {
    font-size: 8px;
  }
  .book-category {
    font-size: 12px;
  }
  .craft-desk {
    position: static;
    width: 100%;
    padding: 22px;
  }
  .craft-object {
    height: 115px;
  }
  .craft-object > .item-art {
    width: 85px;
    height: 85px;
  }
  .craft-desk h2 {
    font-size: 26px;
  }
  .recipe-book .section-heading h2 {
    font-size: 21px;
  }
  .recipe-book .section-heading > span {
    font-size: 9px;
  }
  .market-room > .room-heading > .row {
    width: 100%;
    justify-content: flex-end;
  }
  .market-bar {
    padding: 8px;
    gap: 6px;
  }
  .market-tabs button {
    font-size: 10px;
    padding: 7px 5px;
    min-height: 37px;
  }
  .search-controls input {
    font-size: 11px;
    width: 60%;
    min-width: 0;
    margin-top: 0;
  }
  .search-controls select {
    width: 112px;
    font-size: 10px;
    min-height: 38px;
    margin-top: 0;
  }
  .market-info {
    font-size: 9px;
    gap: 10px;
    line-height: 1.7;
  }
  .offer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
  }
  .offer {
    padding: 12px 10px;
  }
  .offer-item {
    gap: 6px;
    flex-wrap: wrap;
  }
  .offer-item > .item-art {
    width: 37px;
    height: 37px;
  }
  .offer-item > div {
    min-width: 75px;
  }
  .offer-item h3 {
    font-size: 12px;
  }
  .offer-item > .tag {
    display: none;
  }
  .offer-item small {
    font-size: 8px;
  }
  .offer p {
    font-size: 10px;
    min-height: 52px;
    line-height: 1.75;
    margin: 12px 0;
  }
  .seller {
    flex-direction: column;
    gap: 1px;
    font-size: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
  }
  .offer-price {
    gap: 5px;
    flex-wrap: wrap;
  }
  .offer-price > b {
    font-size: 22px;
  }
  .offer-price small {
    font-size: 8px;
  }
  .offer-price button {
    min-height: 35px;
    font-size: 10px;
    flex: 1;
    padding: 6px 5px;
  }
  .order-board {
    padding: 6px 10px;
  }
  .order-heading {
    display: none;
  }
  .order-row {
    grid-template-columns: 1fr 85px;
    gap: 8px;
    padding: 15px 0;
  }
  .order-product {
    gap: 8px;
  }
  .order-product > .item-art {
    width: 34px;
    height: 34px;
  }
  .order-product h3 {
    font-size: 13px;
  }
  .order-product small {
    font-size: 9px;
  }
  .order-row > b {
    text-align: right;
    font-size: 22px;
  }
  .order-row > span {
    font-size: 11px;
    display: flex;
    gap: 9px;
    align-items: center;
    padding-left: 42px;
  }
  .order-row > button {
    font-size: 11px;
    min-height: 37px;
  }
  .order-row > span > small {
    font-size: 9px;
  }
  .market-footnote {
    font-size: 9px;
    text-align: left;
  }
  .trading-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .trading-layout > section {
    padding: 18px;
  }
  .mine-row {
    grid-template-columns: 1fr 55px 80px;
  }
  .mine-row > span {
    padding-left: 0;
    font-size: 11px;
  }
  .mine-row > b {
    font-size: 16px;
  }
  .veil {
    padding: 12px;
  }
  .modal {
    max-height: calc(100dvh - 24px);
  }
  .modal > header {
    padding: 15px 17px;
  }
  .modal > header h2 {
    font-size: 19px;
  }
  .modal-body {
    padding: 18px 18px 23px;
  }
  .modal-body > p {
    font-size: 12px;
  }
  .modal-actions > button {
    font-size: 11px;
    padding: 9px 10px;
    min-height: 42px;
  }
  .battle-modal .modal-body {
    padding: 13px;
  }
  .battle-heading {
    font-size: 10px;
  }
  #battle-canvas {
    height: 300px;
  }
  .battle-controls > span {
    font-size: 9px;
  }
  .battle-controls > button {
    padding: 6px 8px;
    font-size: 10px;
  }
  .hire-grid {
    grid-template-columns: 1fr;
  }
  .battle-stats > div {
    grid-template-columns: 1fr 1fr 1fr 50px;
    gap: 5px;
    font-size: 9px;
  }
  .result-stats {
    gap: 28px;
  }
  .loot-row b {
    font-size: 11px;
  }
  .item-reveal > h2 {
    font-size: 26px;
  }
  .item-reveal p {
    font-size: 12px;
  }
  .stock-grid {
    gap: 7px;
  }
  .stock-grid > button {
    padding: 10px 6px;
  }
  .stock-grid b {
    font-size: 10px;
  }
  .welcome {
    justify-content: center;
    align-items: flex-end;
    padding: 35px 22px;
  }
  .welcome-art {
    background:
      linear-gradient(0deg, #173c29b0, transparent),
      url("/assets/guild.png") center 35% / auto 110vh;
  }
  .welcome-paper {
    padding: 30px;
    background: #f3e8cfe8;
    max-width: 390px;
    margin-top: 100px;
  }
  .welcome-paper > h1 {
    font-size: 46px;
    margin: 12px 0 20px;
  }
  .welcome-paper .lead {
    font-size: 16px;
  }
  .welcome-paper > p:not(.lead) {
    font-size: 12px;
  }
  .welcome-paper label {
    margin: 17px 0;
  }
  .welcome-paper small {
    font-size: 9px;
  }
  .modal-actions > .large {
    width: auto;
  }
  #toast {
    font-size: 11px;
    padding: 11px 15px;
  }
}
@media (max-width: 760px) and (min-height: 850px) {
  .city-paper {
    bottom: 193px;
  }
  .fleet {
    bottom: 61px;
  }
  .news-ribbon {
    bottom: 12px;
  }
  .map-main > #scene {
    height: 390px;
    min-height: 390px;
  }
  .map-main > .map-controls {
    top: 320px;
  }
}
@media (max-height: 550px) and (min-width: 650px) {
  :root {
    --top: 45px;
    --nav: 49px;
  }
  .topbar {
    height: 45px;
  }
  .brand > span:last-child {
    font-size: 15px;
  }
  .brand small {
    display: none;
  }
  .bottom-nav button {
    flex-direction: row;
    font-size: 10px;
    padding: 4px 12px;
    min-width: 85px;
  }
  .bottom-nav .icon {
    height: 18px;
    width: 18px;
  }
  .bottom-nav {
    padding: 3px;
  }
  .city-paper {
    top: 15px;
    bottom: 15px;
    width: 265px;
    right: 15px;
    padding: 16px;
    overflow: auto;
  }
  .city-paper h2 {
    font-size: 18px;
  }
  .city-paper p {
    font-size: 11px;
    line-height: 1.7;
  }
  .city-paper .eyebrow {
    font-size: 8px;
  }
  .city-shortcuts {
    display: none;
  }
  .scene-title {
    left: 17px;
    top: 16px;
  }
  .scene-title h1 {
    font-size: 20px;
  }
  .fleet {
    width: 280px;
    bottom: 57px;
    left: 16px;
  }
  .squad-strip {
    padding: 5px 0;
  }
  .squad-strip .portrait {
    width: 22px;
    height: 28px;
  }
  .squad-strip small {
    max-width: 120px;
    font-size: 8px;
  }
  .squad-strip b {
    font-size: 10px;
  }
  .news-ribbon {
    right: 295px;
    left: 16px;
    bottom: 9px;
    min-height: 35px;
  }
  .city-main .map-controls {
    display: none;
  }
  .map-main {
    display: block;
    overflow: hidden;
  }
  .map-main > #scene {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
  .expedition {
    position: absolute;
    right: 12px;
    top: 10px;
    bottom: 10px;
    width: 310px;
    margin: 0;
    overflow: auto;
    padding: 17px;
  }
  .map-main > .map-controls {
    top: auto;
    bottom: 15px;
  }
  .dungeon-picker {
    top: 88px;
  }
  .map-title h1 {
    font-size: 20px;
  }
  .map-title {
    top: 15px !important;
  }
  .room {
    padding: 16px 20px;
  }
  .hero-layout {
    grid-template-columns: 1.1fr 1fr;
  }
  .forge-layout {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
  }
  .formation-grid {
    gap: 6px;
  }
  .formation-cell {
    min-height: 102px;
  }
  .formation-cell .portrait {
    width: 48px;
    height: 55px;
  }
  .room-heading h1 {
    font-size: 23px;
  }
  .room-heading p {
    font-size: 10px;
  }
  .offer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .welcome-paper {
    margin-top: 0;
    padding: 20px 30px;
    width: 420px;
  }
  .welcome-paper > h1 {
    font-size: 34px;
    margin: 5px 0 10px;
  }
  .welcome-paper .lead {
    font-size: 13px;
    margin: 5px 0;
  }
  .welcome-paper > p:not(.lead) {
    display: none;
  }
  .welcome-paper label {
    margin: 10px 0;
  }
  .welcome-paper small {
    font-size: 8px;
    margin-top: 9px;
  }
  .welcome {
    padding: 20px;
  }
  .modal-body {
    padding: 15px 20px;
  }
  .battle-modal {
    max-width: 750px;
  }
  #battle-canvas {
    height: 240px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
/* Opaque paper keeps the map's labels from leaking into the reading surface. */
.paper {
  background: linear-gradient(110deg, #f7eed8fa, #ede3cafa);
}
.intel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: #415c46;
  padding: 10px;
  border-radius: 5px;
}
.intel-grid > div {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: #d2d8b4;
  color: #435640;
  font-size: 10px;
  text-align: center;
  padding: 5px;
}
.intel-grid .icon {
  width: 14px;
  height: 14px;
}
.enemy-description {
  border-bottom: 1px solid #bbae8877;
  padding: 10px 0;
}
.enemy-description h3 {
  font-size: 14px;
}
.enemy-description p {
  font-size: 11px;
  margin: 7px 0;
}
@media (max-width: 760px) {
  .offer {
    position: relative;
  }
  .offer-item > .tag {
    display: block;
    position: absolute;
    right: 7px;
    top: 7px;
    font-size: 8px;
    padding: 2px 4px;
  }
  .offer-item {
    padding-top: 5px;
  }
}

.offer-grid > .empty {
  grid-column: 1/-1;
  background: #f3e9cff5;
  border: 1px solid #b8a77d;
  border-radius: 7px;
  color: #7e785b;
}

.hero-timing {
  display: flex;
  justify-content: space-between;
  gap: 7px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
  padding: 10px 12px;
  border: 1px solid #c2b78d77;
  border-radius: 5px;
  background: #dedcc35c;
  font-size: 10px;
}
.hero-timing b {
  color: #526f4f;
}
.hero-timing small {
  display: block;
  width: 100%;
  font-size: 9px;
  line-height: 1.7;
}
