/* Small refinements to the existing sea, typography and room structure. */
.shore-more{display:none}
.shore-advanced-controls{display:contents}

/* Room headers need the same device inset as the home masthead. */
.marine-app .room-site-heading .shore-masthead{
  padding-top:calc(20px + env(safe-area-inset-top,0px));
}

.marine-app .shore-first-doors{
  width:min(100% - 44px,300px);
  gap:10px;
  margin:8px auto 26px;
}
.marine-app .shore-first-doors>a,
.marine-app .shore-first-doors>button{
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  min-height:50px;
  padding:11px 22px;
  border-radius:28px;
}
.marine-app .shore-first-doors>.shore-primary{margin-bottom:0}
.marine-app[data-shore-scene=night] .shore-first-doors>button{
  border:1px solid var(--shore-line);
  background:rgba(9,32,56,.57);
  text-shadow:none;
}

/* Keep today's reading in its existing place, with a clearer type hierarchy. */
.marine-app .shore-today{padding:22px 24px;margin-block:6px 26px}
.marine-app .shore-today .quiet-label{
  font-size:12px;
  line-height:1.5;
  letter-spacing:.015em;
  text-transform:none;
  margin-bottom:12px;
}
.marine-app .shore-today h2{
  font-size:clamp(29px,4.6vw,34px);
  line-height:1.16;
  margin-bottom:12px;
  text-wrap:balance;
}
.marine-app .shore-today p:not(.quiet-label){
  font-size:15px;
  line-height:1.7;
  max-width:40ch;
  margin:0 auto 14px;
}
.marine-app .shore-today a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:44px;
  font-size:14px;
  line-height:1.5;
  padding:9px 0;
}

/* Reading copy stays on the existing stable surfaces. */
.marine-app .sea-panel>p:not(.quiet-label):not(.tiny):not(.soundscape-track),
.marine-app .settings-grid p:not(.quiet-label):not(.tiny),
.marine-app .privacy-block ul,
.marine-app .memory-copy>p:not(.quiet-label),
.marine-app .entry .prose,
.marine-app .daily-prose>p{
  font-size:16px;
  line-height:1.75;
  max-width:64ch;
}
.marine-app .privacy-block li{padding-bottom:14px}
.marine-app .room-footnote{font-size:13px;line-height:1.75}
.marine-app .memory-copy .external-link{font-size:14px}
.marine-app .memory-copy .button.secondary,
.marine-app .room-actions .button,
.marine-app .settings-grid .button{font-size:13px;min-height:46px}
.marine-app label{font-size:14px}
.marine-app label small{font-size:12px;line-height:1.6}
.marine-app input[type=file]::file-selector-button{font-size:13px}

/* The atmosphere sheet uses the same controls and theme as the rooms. */
.atmosphere-sheet{display:grid;gap:24px}
.atmosphere-group{display:grid;gap:12px;min-width:0}
.atmosphere-group+.atmosphere-group{border-top:1px solid var(--line);padding-top:24px}
.atmosphere-group h3{font-size:29px;line-height:1.15}
.atmosphere-group p{font-size:15px;line-height:1.7;max-width:60ch}
.scene-switch{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.scene-switch button{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  min-height:48px;
  padding:11px 8px;
  border:1px solid var(--line);
  border-radius:24px;
  background:transparent;
  color:var(--ink);
  font-size:13px;
  line-height:1.4;
  text-align:center;
}
.scene-switch button[aria-pressed=true],
.scene-switch button.selected{
  background:var(--shore-accent);
  border-color:var(--shore-accent);
  color:var(--shore-on-accent);
}
.atmosphere-actions{display:flex;flex-wrap:wrap;gap:10px}
.atmosphere-actions>button{
  flex:1 1 150px;
  min-height:46px;
  padding:11px 16px;
  border:1px solid var(--line);
  border-radius:25px;
  background:transparent;
  color:var(--ink);
  font-size:13px;
  line-height:1.5;
}

.marine-app .shore-more:focus-visible,
.marine-app .scene-switch button:focus-visible,
.marine-app .atmosphere-actions button:focus-visible,
.marine-app .shore-first-doors>a:focus-visible,
.marine-app .shore-first-doors>button:focus-visible{
  outline:2px solid var(--shore-accent);
  outline-offset:4px;
}
.marine-app #toast{
  bottom:calc(24px + env(safe-area-inset-bottom,0px));
  width:max-content;
  max-width:min(calc(100% - 32px),480px);
  font-size:14px;
  line-height:1.5;
  overflow-wrap:anywhere;
}
#shore-quiet-return{bottom:calc(24px + env(safe-area-inset-bottom,0px))}

@media(max-width:700px){
  .marine-app .room-site-heading .shore-masthead{
    padding-top:calc(16px + env(safe-area-inset-top,0px));
  }
  .marine-app .marine-room>.room-link:first-child{
    display:inline-flex;
    min-height:44px;
    margin:8px 0 4px;
    padding-block:8px;
    font-size:12px;
  }
  body.marine-app:not(.shore-home-route) #toast{
    bottom:calc(84px + env(safe-area-inset-bottom,0px));
  }
  body.marine-app:not(.shore-home-route):has(input:not([type=range]):focus,textarea:focus) #toast{
    bottom:calc(24px + env(safe-area-inset-bottom,0px));
  }
}

@media(max-width:600px){
  .marine-app .shore-masthead{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:12px;
  }
  .marine-app .shore-wordmark{
    min-width:0;
    font-size:clamp(24px,6.5vw,28px);
    line-height:1.08;
    letter-spacing:.025em;
    white-space:normal;
  }
  .marine-app .shore-wordmark span{font-size:9px;line-height:1.5;letter-spacing:0}
  .marine-app .shore-controls{
    display:flex;
    flex-wrap:nowrap;
    gap:4px;
    width:auto;
    max-width:none;
    align-items:flex-start;
  }
  .marine-app .shore-controls>button{
    flex:0 0 44px;
    width:44px;
    min-width:44px;
    min-height:44px;
    padding:7px 2px;
    font-size:11px;
    line-height:1.35;
  }
  .marine-app .shore-controls>.shore-more{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    line-height:1;
  }
  .shore-advanced-controls{display:none}
  .marine-app .shore-welcome{padding-top:22px}
  .marine-app .shore-today{padding:21px 20px}
  .atmosphere-sheet{gap:22px}
  .atmosphere-group+.atmosphere-group{padding-top:22px}
}

@media(prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  .marine-app .shore-first-doors>a,
  .marine-app .shore-first-doors>button,
  .scene-switch button,
  .atmosphere-actions>button,
  .marine-app #toast{transition:none}
}
