:root {
  font-family: system-ui, sans-serif;
  color: #fff6df;
  background: #80c4d0;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
button {
  font: inherit;
  border: 1px solid #ffffff40;
  background: #103e49df;
  color: #fff6df;
  padding: 13px 19px;
  border-radius: 7px;
  cursor: pointer;
  touch-action: none;
  font-weight: 700;
}
button:hover {
  background: #225763;
}
button:focus-visible {
  outline: 3px solid #ffc45c;
}
button:disabled {
  opacity: 0.5;
}
#world,
#world canvas,
#vignette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}
#vignette {
  pointer-events: none;
  background: linear-gradient(
    #0b334656,
    transparent 26%,
    transparent 65%,
    #082f4566
  );
}
header {
  position: fixed;
  top: max(20px, env(safe-area-inset-top));
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  align-items: start;
}
.brand {
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px #1239;
}
.brand small {
  display: block;
  font-size: 9px;
  letter-spacing: 3px;
  margin-top: 2px;
}
.topbuttons {
  display: flex;
  gap: 8px;
}
.topbuttons button {
  font-size: 12px;
  padding: 9px 12px;
}
#hud {
  position: fixed;
  top: 100px;
  left: 28px;
  display: flex;
  gap: 24px;
}
small {
  font-size: 10px;
  letter-spacing: 2px;
}
#hud strong {
  display: block;
  font-size: 24px;
  margin-top: 3px;
  text-shadow: 0 1px 5px #124;
}
#objective {
  position: fixed;
  top: 178px;
  left: 28px;
  max-width: 300px;
  font-size: 14px;
  background: #113e48bb;
  padding: 12px 16px;
  border-left: 3px solid #ffc15b;
  border-radius: 3px;
}
#map {
  position: fixed;
  right: 28px;
  top: 92px;
  width: 140px;
  height: 140px;
  border: 1px solid #fff5;
  border-radius: 50%;
  background: #123e48bb;
}
#toast {
  position: fixed;
  top: 32%;
  left: 50%;
  transform: translateX(-50%);
  background: #103e49ee;
  padding: 12px 22px;
  border-radius: 4px;
  max-width: 80%;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}
#toast.show {
  opacity: 1;
}
#controls {
  position: fixed;
  bottom: 35px;
  left: 28px;
  right: 28px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
#controls > div {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
#controls button {
  width: 74px;
  height: 65px;
  user-select: none;
  -webkit-user-select: none;
}
#controls button.active {
  background: #d99b35;
  color: #102f38;
}
#actionbar {
  position: fixed;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
#action {
  background: #f6bb56;
  color: #123742;
  min-width: 190px;
  border: none;
  font-size: 17px;
}
#hint {
  font-size: 11px;
  white-space: nowrap;
  text-shadow: 0 1px 4px #000;
}
#overlay {
  position: fixed;
  inset: 0;
  background: #07334477;
  display: grid;
  place-items: center;
  backdrop-filter: blur(6px);
  padding: 20px;
}
#overlay[hidden],
#fishing[hidden] {
  display: none;
}
article {
  background: #fff5df;
  color: #173e47;
  width: min(500px, 100%);
  min-width: 0;
  max-height: 90dvh;
  overflow: auto;
  border-radius: 9px;
  padding: 32px;
  box-shadow: 0 20px 90px #06374966;
}
article h1 {
  font-family: Georgia, serif;
  font-size: 38px;
  line-height: 1.05;
  margin: 10px 0 18px;
}
article p {
  font-size: 15px;
  line-height: 1.6;
}
article .eyebrow {
  color: #8d5c2c;
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: bold;
}
article button {
  background: #164b55;
  width: 100%;
  margin-top: 10px;
}
article .secondary {
  background: transparent;
  color: #164b55;
  border: 1px solid #164b5540;
}
article dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  font-size: 15px;
}
article dd {
  margin: 0;
  font-weight: bold;
}
article .note {
  font-size: 11px;
  color: #546b6c;
}
#fishing {
  position: fixed;
  left: 50%;
  bottom: 135px;
  transform: translateX(-50%);
  width: min(400px, 85vw);
  background: #103f4aef;
  text-align: center;
  padding: 20px;
  border-radius: 10px;
}
h2 {
  margin: 8px 0;
  font-family: Georgia, serif;
  font-size: 25px;
}
.meter {
  position: relative;
  height: 20px;
  background: #973f37;
  border-radius: 5px;
  overflow: hidden;
  margin: 16px 0;
}
.safe {
  position: absolute;
  left: 32%;
  width: 36%;
  height: 100%;
  background: #eebe5e;
}
#needle {
  position: absolute;
  top: 0;
  width: 5px;
  height: 100%;
  background: white;
  left: 50%;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: #7fd9c4;
}
#fishhelp {
  font-size: 12px;
  margin-bottom: 0;
}
@media (max-height: 550px) {
  header {
    top: 12px;
  }
  .brand {
    font-size: 24px;
  }
  #hud {
    top: 64px;
    gap: 16px;
  }
  #hud strong {
    font-size: 18px;
  }
  #objective {
    top: 125px;
    font-size: 12px;
    max-width: 230px;
  }
  #map {
    width: 100px;
    height: 100px;
    top: 60px;
  }
  #controls,
  #actionbar {
    bottom: 15px;
  }
  #controls button {
    height: 52px;
    width: 65px;
  }
  #fishing {
    bottom: 90px;
    padding: 12px;
    width: 330px;
  }
  #fishing h2 {
    font-size: 20px;
  }
  article {
    padding: 20px;
  }
  article h1 {
    font-size: 28px;
  }
  article p {
    font-size: 13px;
  }
}
@media (max-width: 600px) {
  header {
    left: 16px;
    right: 16px;
  }
  .brand {
    font-size: 24px;
  }
  .brand small {
    font-size: 8px;
    letter-spacing: 1px;
  }
  #hud {
    left: 16px;
    gap: 18px;
  }
  #map {
    right: 16px;
    width: 95px;
    height: 95px;
    top: 100px;
  }
  #objective {
    left: 16px;
    max-width: 220px;
  }
  #controls {
    left: 16px;
    right: 16px;
    bottom: 22px;
  }
  #controls button {
    width: 59px;
    height: 58px;
    padding: 8px;
  }
  #actionbar {
    bottom: 100px;
  }
  #hint {
    font-size: 10px;
  }
  #fishing {
    bottom: 175px;
  }
  article h1 {
    font-size: 32px;
  }
}

#navigation {
  position: fixed;
  top: 246px;
  left: 28px;
  display: flex;
  gap: 12px;
  align-items: center;
  background: #103e49db;
  padding: 12px;
  border-radius: 8px;
}
#bearing {
  font-size: 32px;
  color: #ffd07e;
  display: inline-block;
  line-height: 1;
  width: 28px;
  text-align: center;
}
#navigation b {
  display: block;
  font-size: 13px;
}
#navigation small {
  display: block;
  letter-spacing: 0;
  font-size: 11px;
  margin-top: 4px;
}
#homeguide {
  font-size: 11px;
  padding: 9px;
}
#earningsbox {
  position: fixed;
  top: 320px;
  left: 28px;
  width: 275px;
  font-size: 11px;
  text-shadow: 0 1px 3px #123;
}
#daygoal {
  display: block;
  margin-top: 7px;
  height: 5px;
}
#catchcard {
  position: fixed;
  top: 28%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff2d5;
  color: #164753;
  border-bottom: 4px solid #efb654;
  border-radius: 8px;
  text-align: center;
  padding: 18px 30px;
  box-shadow: 0 8px 35px #1234;
  pointer-events: none;
}
#catchcard strong {
  display: block;
  font: bold 29px Georgia;
  margin: 6px;
}
#catchcard span {
  font-size: 13px;
}
@media (max-height: 550px) {
  #navigation {
    top: 175px;
    left: 28px;
    padding: 8px;
    gap: 8px;
  }
  #navigation b {
    font-size: 12px;
  }
  #navigation small {
    font-size: 10px;
  }
  #bearing {
    font-size: 25px;
  }
  #earningsbox {
    top: 239px;
    left: 28px;
    width: 215px;
    font-size: 10px;
  }
  #catchcard {
    top: 20%;
    padding: 10px 20px;
  }
  #catchcard strong {
    font-size: 22px;
  }
}
@media (max-width: 600px) {
  #navigation {
    left: 16px;
    top: 245px;
  }
  #earningsbox {
    left: 16px;
    top: 320px;
    width: 270px;
  }
  #catchcard {
    top: 38%;
    width: 80%;
  }
}

.charteroffer {
  background: #e8dfc7;
  border-left: 3px solid #be8b37;
  padding: 15px;
}
.charteroffer small {
  font-size: 9px;
  letter-spacing: 1px;
}
.charteroffer p {
  font-family: Georgia, serif;
  margin: 9px 0;
}
.charteroffer span {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  margin-top: 5px;
}
.charterquote {
  border-left: 3px solid #b98a40;
  padding-left: 13px;
  font-style: italic;
}
#charterstatus {
  position: fixed;
  bottom: 118px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 1px;
  background: #133f49eb;
  padding: 10px 16px;
  border-radius: 5px;
  white-space: nowrap;
  color: #ffe0a3;
}
#alexdialogue {
  position: fixed;
  right: 28px;
  top: 250px;
  width: 230px;
  background: #fff1d9f2;
  color: #173f49;
  border-left: 4px solid #f3b953;
  padding: 15px;
  border-radius: 6px;
  pointer-events: none;
}
#alexdialogue p {
  font:
    16px/1.4 Georgia,
    serif;
  margin: 7px 0 0;
}
#alexdialogue small {
  font-weight: 800;
}
@media (max-height: 550px) {
  #alexdialogue {
    top: 173px;
    right: 28px;
    width: 200px;
    padding: 10px;
  }
  #alexdialogue p {
    font-size: 13px;
  }
  #charterstatus {
    bottom: 82px;
    font-size: 9px;
    padding: 7px;
  }
  .charteroffer {
    padding: 10px;
  }
}
@media (max-width: 600px) {
  #alexdialogue {
    right: 16px;
    top: 390px;
    width: 220px;
  }
  #charterstatus {
    bottom: 163px;
    font-size: 8px;
    padding: 8px;
  }
}

@media (max-height: 550px) {
  body.is-fishing #navigation,
  body.is-fishing #earningsbox {
    display: none;
  }
}
@media (max-height: 550px) {
  body.is-fishing #toast,
  body.is-fishing #charterstatus {
    display: none;
  }
}
#splash {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #102f3b;
  overflow: auto;
}
.splash-art {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #092f3af5 0%, #092f3adb 37%, #092f3a0a 85%),
    linear-gradient(0deg, #092f3a 0%, transparent 35%),
    url("assets/title-screen.png") center/cover no-repeat;
  opacity: 0.94;
}
.splash-copy {
  position: relative;
  padding: 8vh 7vw 100px;
  max-width: 850px;
}
.splash-kicker {
  font-size: 11px;
  letter-spacing: 4px;
  color: #f6c770;
}
.splash-copy h1 {
  font-size: clamp(48px, 8vw, 104px);
  letter-spacing: -3px;
  line-height: 1;
  margin: 22px 0 24px;
  font-weight: 950;
}
.splash-tagline {
  font:
    clamp(26px, 3.7vw, 48px) / 1.1 Georgia,
    serif;
  margin: 0 0 24px;
}
.splash-story {
  font-size: 15px;
  line-height: 1.7;
  max-width: 410px;
  color: #e3e9dd;
}
.splash-copy #splashplay {
  background: #f1bc62;
  color: #153d47;
  width: 270px;
  display: flex;
  justify-content: space-between;
  font-size: 18px;
  margin: 26px 0 18px;
  padding: 18px 22px;
}
.splash-details {
  display: flex;
  gap: 16px;
  font-size: 8px;
  letter-spacing: 1px;
}
.splash-disclosure {
  font-size: 10px;
  color: #b0c8c8;
  max-width: 350px;
  margin-top: 24px;
  line-height: 1.5;
}
.splash-bottom {
  position: absolute;
  bottom: 20px;
  left: 7vw;
  right: 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 2px;
}
.splash-bottom button {
  font-size: 11px;
  font-weight: 400;
  background: transparent;
}
#projectprogress {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(360px, 95vw);
  overflow: auto;
  background: #fff4de;
  color: #173f48;
  z-index: 30;
  padding: 35px 25px;
  box-shadow: -10px 0 50px #0a283755;
}
#projectprogress[hidden] {
  display: none;
}
#closeprogress {
  position: absolute;
  right: 12px;
  top: 10px;
  border: 0;
  background: transparent;
  color: #173f48;
  font-size: 28px;
  padding: 0 8px;
}
#projectprogress > small {
  font-size: 9px;
  letter-spacing: 2px;
}
#projectprogress h2 {
  font-size: 29px;
  line-height: 1.1;
  margin: 18px 0;
}
#progressnow {
  font-size: 13px;
  line-height: 1.6;
}
#milestones section {
  border-top: 1px solid #164b5525;
  padding: 16px 0 12px;
}
#milestones h3 {
  font-size: 14px;
  margin: 9px 0;
}
#milestones p,
#progresslimits,
.progressfooter {
  font-size: 11px;
  line-height: 1.6;
  margin: 0;
}
.status {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8c5b25;
}
.status.done {
  color: #257263;
}
#budgetline {
  font-size: 12px;
  font-weight: bold;
  margin-top: 24px;
}
.progressfooter {
  margin-top: 20px;
  opacity: 0.7;
}
@media (max-height: 600px) {
  .splash-copy {
    padding-top: 25px;
    padding-bottom: 75px;
  }
  .splash-copy h1 {
    font-size: 54px;
    margin: 12px 0;
  }
  .splash-tagline {
    font-size: 27px;
    margin-bottom: 12px;
  }
  .splash-story {
    font-size: 12px;
    max-width: 370px;
  }
  .splash-copy #splashplay {
    padding: 12px 18px;
    margin: 14px 0;
  }
  .splash-disclosure {
    margin-top: 10px;
  }
  .splash-bottom {
    position: relative;
    bottom: 12px;
  }
}
@media (max-width: 600px) {
  .splash-art {
    background-position: center;
  }
  .splash-copy {
    padding: 65px 25px 120px;
  }
  .splash-copy h1 {
    font-size: 54px;
    letter-spacing: -2px;
  }
  .splash-story {
    font-size: 14px;
  }
  .splash-bottom {
    left: 25px;
    right: 25px;
    gap: 12px;
    flex-direction: column;
    align-items: start;
  }
  .topbuttons {
    gap: 4px;
  }
  .topbuttons button {
    font-size: 10px;
    padding: 8px;
  }
  .brand {
    font-size: 20px;
  }
  .brand small {
    font-size: 7px;
  }
}
.portrait {
  width: 110px;
  height: 110px;
  flex: 0 0 110px;
  background-image: url("assets/characters.png");
  background-size: 300% 200%;
  background-position: 0 0;
  border-radius: 8px;
}
.portrait.marcia {
  background-position: 50% 0;
}
.portrait.alex {
  background-position: 100% 0;
}
.portrait.inez {
  background-position: 0 100%;
}
.portrait.winks {
  background-position: 50% 100%;
}
.portrait.asha {
  background-position: 100% 100%;
}
.storyhead {
  display: flex;
  gap: 20px;
  align-items: center;
  margin: 18px 0;
}
.storyhead h1 {
  font-size: 29px;
  margin: 0 0 10px;
}
.storyhead p {
  font:
    italic 14px/1.4 Georgia,
    serif;
  margin: 0;
}
.campaignstats {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin: 18px 0;
  padding: 12px 0;
  border-block: 1px solid #164b5525;
}
.campaignstats span {
  font-size: 8px;
  letter-spacing: 0.7px;
}
.campaignstats b {
  display: block;
  font-size: 14px;
  letter-spacing: 0;
  margin-top: 5px;
}
.jobchoice {
  text-align: left;
  padding: 13px 16px;
}
.jobchoice span {
  display: block;
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0.8;
  margin-top: 3px;
}
.resultportrait {
  display: flex;
  gap: 18px;
  align-items: center;
  margin: 20px 0;
}
.resultportrait .portrait {
  width: 80px;
  height: 80px;
  flex-basis: 80px;
}
.resultportrait p {
  font:
    italic 16px/1.4 Georgia,
    serif;
}
.chapterend {
  background: #e7dfc7;
  padding: 15px;
  margin-top: 20px;
}
.chapterend p {
  margin: 8px 0;
}
@media (max-height: 550px) {
  .portrait {
    width: 75px;
    height: 75px;
    flex-basis: 75px;
  }
  .storyhead {
    gap: 12px;
    margin: 10px 0;
  }
  .storyhead h1 {
    font-size: 24px;
  }
  .campaignstats {
    margin: 10px 0;
    padding: 8px 0;
  }
  .jobchoice {
    padding: 10px 12px;
  }
}
.optionrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #164b5525;
  font-size: 14px;
}
.optionrow select {
  background: #eee1c8;
  border: 1px solid #164b5533;
  border-radius: 4px;
  padding: 8px;
  color: #173f48;
}
.optionrow input {
  width: 20px;
  height: 20px;
  accent-color: #215b60;
}
.importlabel {
  display: block;
  margin-top: 15px;
  padding: 12px;
  border: 1px solid #164b5533;
  border-radius: 5px;
  font-size: 13px;
}
.importlabel input {
  display: block;
  margin-top: 10px;
  max-width: 100%;
}

#dialogueportrait {
  width: 54px;
  height: 54px;
  float: left;
  margin-right: 12px;
  margin-bottom: 6px;
}
#alexdialogue {
  min-height: 86px;
}
#eveningchoice {
  border-top: 1px solid #164b5525;
  margin-top: 18px;
  padding-top: 18px;
}

@media (max-width: 600px) {
  .splash-art {
    background-position: 68% center;
  }
  .splash-copy {
    background: linear-gradient(90deg, #082e38bb, #082e3844);
    min-height: 100%;
  }
  .splash-bottom {
    z-index: 1;
  }
}
@media (max-width: 600px) {
  #toast {
    top: auto;
    bottom: 190px;
    width: calc(100% - 32px);
    max-width: none;
    font-size: 12px;
  }
  body.is-fishing #toast {
    display: none;
  }
}

#boot {
  position: fixed;
  inset: 0;
  z-index: 15;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #103d47;
  color: #fff1d7;
  text-align: center;
  padding: 25px;
}
#boot h1 {
  font-size: clamp(40px, 8vw, 90px);
  letter-spacing: -2px;
  margin: 20px 0;
}
#boot p {
  font:
    16px Georgia,
    serif;
  color: #e9c991;
}

#map {
  cursor: pointer;
}
.fullchart {
  width: 100%;
  height: auto;
  border-radius: 7px;
  display: block;
}
.chartchoices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.chartchoices button {
  font-size: 11px;
  padding: 10px;
  margin: 0;
}

#weatherstatus {
  position: fixed;
  top: 155px;
  left: 28px;
  color: #fff0cf;
  font-size: 11px;
  letter-spacing: 0.05em;
  text-shadow: 0 1px 4px #133b42;
  pointer-events: none;
}
.weatherbrief {
  font-size: 12px;
  color: #536c66;
  padding: 10px 12px;
  background: #e9e6cd;
  border-radius: 8px;
}
@media (max-height: 500px) {
  #weatherstatus {
    display: none;
  }
}
@media (max-width: 500px) {
  #weatherstatus {
    top: 155px;
    left: 16px;
  }
}

@media (max-width: 500px) {
  article {
    padding: 22px;
  }
  .storyhead {
    gap: 14px;
  }
  .storyhead .portrait {
    width: 88px;
    height: 96px;
  }
  .storyhead > div:last-child {
    min-width: 0;
  }
}

.memoryline {
  border-left: 3px solid #c49553;
  padding-left: 12px;
  color: #6d634e;
  font-size: 12px;
}
.memoryline small {
  letter-spacing: 0.12em;
  font-size: 9px;
}
.journalentry {
  padding: 12px 0;
  border-top: 1px solid #164b5525;
}
.journalentry h3 {
  margin: 4px 0;
}
.journalentry p {
  margin: 6px 0;
  font-size: 14px;
}
.journalentry small {
  font-size: 11px;
  color: #61736c;
}

#catchcard {
  top: auto;
  bottom: 145px;
}
@media (max-height: 550px) {
  #catchcard {
    top: auto;
    bottom: 90px;
    padding: 10px 18px;
  }
}
@media (max-width: 600px) and (min-height: 551px) {
  #catchcard {
    top: auto;
    bottom: 190px;
  }
}

.is-fishing #navigation,
.is-fishing #earningsbox,
.is-fishing #objective,
.is-fishing #charterstatus,
.is-catching #navigation,
.is-catching #earningsbox,
.is-catching #objective,
.is-catching #charterstatus {
  display: none;
}

button:focus-visible,
select:focus-visible,
input:focus-visible,
#map:focus-visible {
  outline: 3px solid #f3b850;
  outline-offset: 4px;
}

.guidetabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 16px 0 20px;
}
.guidetabs button {
  width: auto;
  margin: 0;
  padding: 8px 11px;
  font-size: 11px;
  min-height: 40px;
}
.guidetabs button[aria-pressed="true"] {
  background: #164b55;
  color: #fff4d8;
}
.guidebody {
  font-size: 15px;
  line-height: 1.6;
}
.guidecallout {
  background: #e9e4cf;
  border-left: 3px solid #bb8538;
  padding: 14px 16px;
  margin: 18px 0;
  border-radius: 0 8px 8px 0;
}
.guidecontrols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 18px 0;
}
.guidecontrols span {
  background: #164b5510;
  padding: 10px;
  border-radius: 6px;
}
.guidecontrols b {
  display: inline-block;
  min-width: 58px;
}
.guidetension {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(
    90deg,
    #c8d7ce 0% 32%,
    #eac074 32% 68%,
    #dcaa91 68%
  );
  padding: 22px 9px;
  border-radius: 8px;
  font-size: 10px;
  letter-spacing: 0.04em;
  margin: 20px 0;
}
.guidepeople dt {
  font-weight: 800;
  margin-top: 14px;
}
.guidepeople dd {
  margin: 3px 0 12px;
  line-height: 1.5;
}
.guidefooter {
  margin-top: 20px;
}
@media (max-width: 600px) {
  .guidebody {
    font-size: 14px;
  }
  .guidetabs {
    gap: 4px;
  }
  .guidetabs button {
    padding: 7px 9px;
  }
}

.eveningscene {
  padding: 20px 0 4px;
  border-top: 1px solid #164b5525;
}
.eveningscene .storyhead {
  margin-top: 18px;
}
.recaplead {
  font-size: 17px !important;
  line-height: 1.5;
}
.recapstats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
  margin: 22px 0 12px;
}
.recapstats span {
  padding: 14px 8px;
  background: #164b55;
  color: #f7e8bf;
  border-radius: 8px;
  text-align: center;
  font-size: 9px;
  letter-spacing: 0.06em;
}
.recapstats b {
  display: block;
  font-family: Georgia, serif;
  font-size: 28px;
  margin-bottom: 6px;
}
.recapdays section {
  border-top: 1px solid #164b5525;
  padding: 12px 0;
}
.recapdays small {
  color: #8a613e;
  letter-spacing: 0.12em;
  font-weight: 800;
}
.recapdays p {
  margin: 5px 0;
  font-size: 14px;
}
@media (max-width: 600px) {
  .recapstats {
    gap: 5px;
  }
  .recapstats b {
    font-size: 24px;
  }
  .recapstats span {
    font-size: 8px;
    padding: 12px 4px;
  }
}

.is-intro header,
.is-intro #hud,
.is-intro #weatherstatus,
.is-intro #navigation,
.is-intro #earningsbox,
.is-intro #objective,
.is-intro #charterstatus,
.is-intro #map,
.is-intro #controls,
.is-intro #actionbar,
.is-intro #toast {
  visibility: hidden;
}
#opening {
  position: fixed;
  inset: 0;
  z-index: 35;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  pointer-events: none;
  color: #fff4db;
  background: linear-gradient(
    #062f3d99,
    transparent 30%,
    transparent 58%,
    #062f3de8
  );
  padding: 5vh 5vw 4vh;
  text-shadow: 0 2px 8px #062f3d55;
}
.openingtop small,
.openingtop span {
  font-size: 11px;
  letter-spacing: 0.18em;
}
.openingtop h1 {
  font-family: Georgia, serif;
  font-size: clamp(36px, 6vw, 68px);
  margin: 10px 0;
}
.openingbottom {
  max-width: 650px;
  align-self: center;
  text-align: center;
  width: 100%;
}
.openingbottom p {
  font-family: Georgia, serif;
  font-size: clamp(19px, 2.3vw, 27px);
  line-height: 1.45;
  min-height: 3em;
  margin: 0 0 22px;
}
.openingbottom div {
  display: flex;
  justify-content: center;
  gap: 10px;
  pointer-events: auto;
}
.openingbottom button {
  font-size: 12px;
  padding: 12px 18px;
}
.openingbottom small {
  display: block;
  font-size: 10px;
  opacity: 0.7;
  margin-top: 14px;
}
@media (max-height: 550px) {
  #opening {
    padding: 18px 5vw;
  }
  .openingtop h1 {
    font-size: 32px;
  }
  .openingbottom p {
    font-size: 18px;
    margin-bottom: 10px;
  }
  .openingbottom small {
    display: none;
  }
}
/* Illustrated evening interludes have their own composition, apart from the receipt. */
article.narrative-card {
  width: min(920px, 100%);
  padding: 0;
}
.evening-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}
.evening-art-panel {
  background: #173e43;
  color: #f9e9cb;
  min-width: 0;
}
.evening-art {
  aspect-ratio: 2/1;
  background-image: url("./assets/evenings-01.png");
  background-size: 100% 200%;
  background-repeat: no-repeat;
}
.evening-art.home {
  background-position: center top;
}
.evening-art.vern {
  background-position: center bottom;
}
.evening-art-caption {
  padding: 30px;
}
.evening-art-caption small {
  letter-spacing: 2px;
  font-size: 9px;
  color: #d1bd98;
}
.evening-art-caption h2 {
  font:
    normal 35px/1.08 Georgia,
    serif;
  margin: 18px 0;
}
.evening-art-caption p {
  color: #d7dfcf;
}
.evening-art-caption span {
  display: block;
  border-top: 1px solid #d7dfcf33;
  padding-top: 20px;
  font-size: 10px;
  line-height: 1.8;
  letter-spacing: 1px;
}
.evening-copy {
  padding: 30px;
  min-width: 0;
}
.evening-copy .eveningscene {
  border: 0;
  padding: 0;
  margin: 0;
}
.evening-copy h1 {
  font-size: 34px;
}
.evening-copy .jobchoice span {
  line-height: 1.5;
}
@media (max-width: 650px) {
  .evening-layout {
    display: block;
  }
  .evening-art-caption {
    padding: 12px 20px;
  }
  .evening-art-caption h2,
  .evening-art-caption p {
    display: none;
  }
  .evening-art-caption span {
    border: 0;
    padding-top: 5px;
    font-size: 9px;
  }
  .evening-copy {
    padding: 22px;
  }
  .evening-copy h1 {
    font-size: 30px;
  }
}

/* Phone sea view: keep steering and navigation; put trip accounting in Pause. */
@media (max-width: 600px), (max-height: 500px) and (pointer: coarse) {
  header { top: max(12px, env(safe-area-inset-top)); left: 12px; right: 12px; align-items: center; }
  .brand { font-size: 17px; letter-spacing: 1px; }
  .brand small, #progressbutton, #objective, #earningsbox, #weatherstatus, #charterstatus, #hint { display: none !important; }
  .topbuttons { gap: 5px; }
  .topbuttons button { min-height: 44px; padding: 8px 10px; }
  #hud { top: max(62px, calc(env(safe-area-inset-top) + 50px)); left: 12px; gap: 14px; }
  #hud strong { font-size: 15px; margin-top: 2px; }
  #hud small { font-size: 9px; letter-spacing: .5px; }
  #map { width: 72px; height: 72px; right: 12px; top: max(64px, calc(env(safe-area-inset-top) + 52px)); }
  #navigation { top: auto; bottom: calc(164px + env(safe-area-inset-bottom)); left: 12px; right: auto; padding: 6px 9px; gap: 7px; max-width: calc(100% - 24px); background: #103e4999; }
  #navigation b { font-size: 11px; }
  #navigation small { font-size: 10px; margin-top: 1px; }
  #bearing { font-size: 23px; width: 20px; }
  #homeguide { min-height: 44px; padding: 6px; font-size: 10px; }
  #controls { bottom: max(14px, env(safe-area-inset-bottom)); left: 12px; right: 12px; }
  #controls > div { gap: 7px; }
  #controls button { width: 62px; min-width: 62px; height: 60px; padding: 0; font-size: 14px; letter-spacing: 0; white-space: nowrap; flex-shrink: 0; }
  #actionbar { bottom: calc(84px + env(safe-area-inset-bottom)); }
  #action { min-width: 168px; min-height: 48px; font-size: 14px; padding: 10px 16px; }
  #action:disabled { visibility: hidden; }
  #fishing { bottom: calc(150px + env(safe-area-inset-bottom)); }
  #toast { bottom: calc(225px + env(safe-area-inset-bottom)); }
  #catchcard { bottom: calc(150px + env(safe-area-inset-bottom)); }
}
.trip-summary { background: #164b550d; border-radius: 8px; padding: 12px; font-size: 14px; line-height: 1.6; }
/* Explicit centring also overrides Safari's native button layout. */
#controls button { appearance: none; -webkit-appearance: none; display: grid; place-items: center; text-align: center; text-indent: 0; line-height: 1; margin: 0; }
body.is-bite #fishing { background: #fff1cf; color: #26372e; border: 3px solid #ffb43d; box-shadow: 0 0 0 7px #ffb43d44, 0 12px 50px #062c37aa; }
body.is-bite #fishheading { font-size: clamp(26px,5vw,38px); text-transform: uppercase; font-weight: 950; }
body.is-bite #action { background: #ffcc66; outline: 4px solid #fff0b5; }
body.is-bite #vignette { box-shadow: inset 0 0 85px #ffbf4044; }
body.is-bite .meter { display: none; }
/* Fixed control widths require zero padding on desktop as well as phones. */
#controls button {
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Request board: stays separate from the play HUD. */
#projectprogress { width: min(430px, 100vw); box-sizing: border-box; }
#requestboard label { display: block; font-size: 12px; margin: 12px 0; }
#requestboard input, #requestboard textarea, #requestboard select {
  display: block; width: 100%; box-sizing: border-box; padding: 10px; margin-top: 5px;
  background: #fffaf0; color: #173f48; border: 1px solid #173f4855; border-radius: 7px; font: inherit; font-size: 16px;
}
.board-note { font-size: 11px; line-height: 1.6; }
.board-filters { display: flex; gap: 12px; }
.board-filters label { flex: 1; min-width: 0; }
.request-card { padding: 18px 0; border-top: 1px solid #173f4825; }
.request-card h3 { margin: 7px 0; font-size: 16px; }
.request-card p { font-size: 12px; line-height: 1.6; }
.request-votes { display: flex; align-items: center; gap: 8px; }
.request-votes span { font-size: 11px; }
#requestboard button { background: #173f48; color: #fff4de; min-height: 44px; }
.request-votes button { width: 44px; padding: 0; font-size: 20px; }
#requestboard button[aria-pressed="true"] { background: #f2b947; color: #173f48; outline: 2px solid #173f48; }
#board-form { border-top: 1px solid #173f4825; padding-top: 12px; }
#board-export { margin: 16px 0; }
#projectprogress summary { cursor: pointer; padding: 16px 0; }
@media (max-width: 600px) {
  #progressbutton { display: inline-flex !important; align-items: center; justify-content: center; font-size: 11px; padding: 8px; min-height: 44px; }
}
#requestboard #board-owner { display: inline-block; width: auto; margin-right: 6px; }
#board-owner-label[hidden] { display: none; }
/* Compact voting roadmap. */
#projectprogress h2 { font-size: 27px; margin: 16px 0 12px; }
#requestboard .request-card { background: #fffcf4; border: 1px solid #173f4820; border-radius: 12px; padding: 18px; margin-bottom: 14px; box-shadow: none; }
#requestboard .request-card h3 { font-size: 16px; line-height: 1.4; margin: 8px 0 16px; }
#requestboard .request-card summary { padding: 12px 0 0; font-size: 12px; color: #466770; }
#requestboard .request-card p { margin-bottom: 0; }
#requestboard .request-votes { gap: 10px; }
#requestboard .request-votes span { line-height: 1.6; font-size: 12px; }
#requestboard button:disabled { opacity: .35; cursor: default; }
#requestboard .request-done { border-left: 4px solid #257263; background: #ecf5ea; }
.request-done .status { color: #25654b; }
#board-done > summary { font-weight: bold; color: #25654b; }
#requestboard > details { border-top: 1px solid #173f4820; margin-top: 14px; }
#requestboard .board-note { color: #47616a; }

#requestboard .request-card h3 { margin-bottom: 6px; }
#requestboard .request-card .request-summary { margin: 0 0 16px; font-size: 13px; line-height: 1.5; color: #47616a; }
body.is-ashore #hud > div:nth-child(2) { display: none; }
body.is-ashore #homeguide { display: none; }
body.is-ashore #hold { white-space: nowrap; }
