@font-face {
  font-family: "Harbor Pixel";
  src: url("/assets/fonts/fusion-pixel-12px-proportional-zh_hans.otf.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

.life-session .hub-choices {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;margin:6px 0}
.life-session .hub-choices .stage-choice {display:flex;align-items:center;gap:8px;min-height:44px;min-width:0;width:100%;text-align:start}
.hub-choices .stage-choice .game-icon,.life-pending .game-icon {flex:0 0 18px;width:18px;height:18px}
.hub-choices strong,.hub-invitations strong,.life-pending strong {min-width:0;overflow-wrap:anywhere}
.hub-choices b,.life-pending b {margin-inline-start:auto}
.life-session .life-pending {display:flex;align-items:center;justify-content:flex-start;gap:6px;width:100%;padding-inline:4px}
.hub-invitations summary {min-height:44px;align-content:center}
.life-session .action-receipt .life-home {margin-top:10px}
.life-session .action-receipt .life-home h1 {display:none}
:root {
  --pixel-font: "Harbor Pixel","Microsoft YaHei","PingFang SC",sans-serif;
  --pixel-outline: #222c3a;
}
.pixel-world {position: absolute; inset: 0; overflow: hidden; pointer-events: none;}
.pixel-world canvas {display: block; width: 100%; height: 100%; image-rendering: pixelated;}
.life-session .pixel-world[data-mode="play"],.life-session .pixel-world[data-mode="phone"] {pointer-events:auto;}
.pixel-face {display: block; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated;}
.rpg-input {
  display: flex; flex-wrap:wrap; gap: 6px;
  margin: 8px 0 0; padding: 0;
}
.rpg-input #action-input, .rpg-input button {
  box-sizing: border-box; min-width: 0; min-height: max(38px,2em); height:auto;
  border: 1px solid #607977; border-radius: 2px; margin: 0;
}
.rpg-input #action-input {
  flex:1 1 11em; width:auto; min-inline-size:min(100%,11em); padding:4px clamp(3px,calc(8vw - 1em),10px); background: #162734; color: #fff2d1;
  font: 16px/1.4 system-ui,"Microsoft YaHei",sans-serif; box-shadow: none;
}
.rpg-input #action-input::placeholder {color: #c1caba; opacity: 1;}
.rpg-input #action-input:focus {outline: 2px solid #ffdb85; outline-offset: 0;}
.rpg-input button {
  margin-inline-start:auto;
  padding: 4px 12px; background: #344d52; color: #fff1c7; cursor: pointer;
  font: 600 15px/1 var(--reading-font);
}
.rpg-input button:hover, .rpg-input button:focus-visible {background: #4a6865; color: #fff;}
.harbor-places {display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; margin:10px 0;}
.life-session .place-stop {
  display: flex; gap: 7px; align-items: center; min-width: 0; min-height: 40px;
  background: #263c49; color: #f9e7bd; border: 2px solid #798b78;
  text-align: left; border-radius: 0; padding: 4px 10px; box-shadow: none; font: 600 16px/1.35 var(--reading-font);
}
.place-stop .game-icon {width:19px; height:19px; color:#fed884;}
.place-stop span {margin-left:auto;}
.life-session .place-stop:is(:hover,:focus-visible) {background:#435753; border-color:#ffcf72;}
.scene-game.pixel-journal {
  margin:0; width:100%; max-width:none; min-height:100svh; height:100dvh;
  position:relative; isolation:isolate; overflow:hidden; display:grid;
  grid-template-columns:minmax(0,1fr); grid-template-rows:minmax(0,1fr); place-items:center;
  padding: clamp(12px,6svh,62px) clamp(12px,4vw,48px); box-sizing:border-box;
  --book-ink:#2c3841; --book-paper:#f7eacc; --book-rule:#b9a781; --book-cloth:#405b5b;
  --harbor-serif:var(--pixel-font);
}
.pixel-journal::before {content:"";position:absolute;z-index:0;inset:0;background:#13222a42;pointer-events:none;}
.scene-game.pixel-journal > .pixel-world {z-index:-1;}
.scene-game.pixel-journal .life-detail {
  width:min(100%,680px); min-height:0; max-height:100%; overflow:auto; overscroll-behavior:contain;
  padding:12px clamp(15px,3.2vw,34px) 20px;
  background:#f7eacc; border:1px solid #baa77d; border-left:5px solid #405b5b; border-radius:1px;
  box-shadow:0 6px 18px #18273350;
  scrollbar-color:#ad9977 #efe2bf;
}
.pixel-journal .life-detail::before {display:none;}
.pixel-journal .fieldbook-cover h1,.pixel-journal .book-page-head h1 {font-family:var(--pixel-font);}
.pixel-journal :is(.chronicle-entry h3,.person-select strong,.notebook-pages button,.scene-back) {font-family:"PingFang SC","Microsoft YaHei UI","Microsoft YaHei",system-ui,sans-serif;}
.pixel-journal .journal-player {width:58px;height:58px;flex:none;padding:0;display:block;}
.pixel-journal .book-index-icon,.pixel-journal .avatar,.pixel-journal .book-leaf-icon {border-radius:0;}
.pixel-journal .avatar {padding:0;overflow:hidden;background:#b6c5ae;}
.pixel-journal .notebook-pages button,.pixel-journal .person-select {min-height:47px;}
.pixel-journal .scene-back {font-size:16px;}
@media (max-height:600px) {
  .scene-game.pixel-journal {padding:8px 12px;}
  .rpg-input {margin-top:4px;}
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after {scroll-behavior:auto!important;animation-duration:.01ms!important;transition-duration:.01ms!important;}
}
#home-party-form [hidden] { display: none; }
#home-party-form .party-guests { display:flex; flex-wrap:wrap; gap:4px 12px; min-width:0; border:0; padding:0; margin:0; }
#home-party-form .party-guests label { display:inline-flex; align-items:center; gap:7px; min-height:44px; cursor:pointer; }
#home-party-form .party-guests input { width:20px; height:20px; min-height:0; margin:0; }
.life-session .leisure-choice > strong { display:inline-flex; align-items:center; gap:5px; }
.life-session .leisure-choice > strong .game-icon { width:1em; height:1em; flex:none; }
.life-session .gambling-setup > .action-terms { margin:5px 0 12px; }
.life-session #home-party-form [data-party-stock] { font-size:.85em; color:#c8d8cf; }
.rpg-dialogue .table-setup { max-width:42rem; }
.rpg-dialogue .table-heading { margin:12px 0 8px; }
.rpg-dialogue .table-heading h2 { margin:0 0 4px; }
.rpg-dialogue .table-heading .scene-where { margin:0; color:#bfd1cc; }
.rpg-dialogue .entertainment-back,.rpg-dialogue .text-button { color:#cce0d3; }
.rpg-dialogue .table-setup .compact-form { min-width:0; gap:10px; }
.rpg-dialogue .table-setup .compact-form label { display:grid; gap:6px; line-height:1.45; }
.rpg-dialogue .table-setup :is(input,select,button) { max-width:100%; min-width:0; }
.rpg-dialogue .table-setup :is(input,select) { box-sizing:border-box; width:100%; min-height:42px; font-size:16px; }
.rpg-dialogue .table-setup .stake-help { margin:0 0 3px; color:#dbe6dd; font-size:clamp(.92rem,1.8vw,1rem); line-height:1.55; }
.rpg-dialogue .table-setup .stake-error[hidden] { display:none; }
.rpg-dialogue .table-setup [aria-invalid=true] { border:2px solid #ae593a; }
#slot-machine-form .review-buttons, #slot-machine-form.review-buttons { display:flex; flex-wrap:wrap; gap:6px; }
#slot-machine-form .review-buttons button, #slot-machine-form.review-buttons button { min-width:0; max-width:100%; overflow-wrap:anywhere; }
#slot-machine-form.review-buttons button { flex:1 1 8.5em; flex-wrap:wrap; }
#slot-machine-form.review-buttons .action-terms { min-width:0; max-width:100%; margin:0; }
.game-select {
  position:relative; display:grid; grid-template-columns:minmax(0,1fr); min-width:0; max-width:100%; min-height:46px;
  color:#253c3a; background:#fffdf4; border:1px solid #98aba4; border-radius:4px;
}
.game-select select, .directory-select .game-select select {
  position:absolute; z-index:1; inset:0; width:100%; height:100%; min-width:0; margin:0; opacity:0; cursor:pointer;
}
.directory-select { flex-wrap:wrap; }
.directory-select .game-select { min-width:min(9rem,100%); }
.game-select-value {
  min-width:0; align-content:center; padding:.55em 2em .55em .7em; overflow-wrap:anywhere; font:400 1rem/1.45 system-ui,sans-serif;
}
.game-select::after {
  content:''; pointer-events:none; position:absolute; inset-inline-end:.8em; top:50%;
  width:.45em; height:.45em; border:solid currentColor; border-width:0 2px 2px 0; transform:translateY(-70%) rotate(45deg);
}
.game-select:has(select:focus-visible) { outline:3px solid #376f80; outline-offset:2px; }
.life-session .game-select:has(select:focus-visible) { outline-color:#ffdc8f; }
.game-select:has(select:disabled) { opacity:.65; }

.turn-progress { position:absolute; z-index:3; inset-inline-end:12px; top:8px; display:inline-flex; align-items:center; gap:7px; padding:3px 8px; border-radius:4px; color:#fff4da; background:#263d50; font-size:.8rem; pointer-events:none; }
.turn-progress::before { content:''; width:9px; height:9px; border:2px solid currentColor; border-right-color:transparent; border-radius:50%; animation:turn-wait .7s linear infinite; }
@keyframes turn-wait { to { transform:rotate(1turn); } }
@media (prefers-reduced-motion:reduce){.turn-progress::before{animation:none;}}
.action-terms {display:inline-flex;flex-wrap:wrap;align-items:center;gap:3px 12px;line-height:1.45;font-size:.84rem;font-variant-numeric:tabular-nums}
.action-terms .term {display:inline-flex;align-items:center;gap:4px;min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere}
.life-session .place-stop > strong {min-width:0;overflow-wrap:anywhere}
.action-terms .term .game-icon {width:14px;height:14px;flex:none;color:inherit}
.activity-option .action-terms {grid-column:1;justify-self:start}
.stage-choice .action-terms .term,.activity-option .action-terms .term {font:inherit;color:inherit}
.opportunity-search,.case-menu button:has(.action-terms),.life-followups strong:has(.action-terms),.social-actions button:has(.action-terms),.neighbor-list button:has(.action-terms),.case-decisions button:has(.action-terms) {display:grid;align-content:center;justify-items:start;gap:4px;text-align:start}

.life-home,.life-food { min-width:0; }
.life-pending {min-height:44px;text-align:start;overflow-wrap:anywhere;}
.life-pending time,.life-session .party-stop small {font-variant-numeric:tabular-nums;color:var(--rpg-gold);}
.life-session .life-food .stage-choice {justify-content:space-between;gap:10px;}
.life-food .stage-choice>span {display:grid;gap:3px;}
.life-session .party-stop small {font-size:.82rem;}
