:root {
  font-family: "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: #3c382c;
  font-synthesis: none;
  --paper: #fff8e5;
  --ink: #3c382c;
  --blue: #286c73;
  --sand: #ecd9ad;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
body {
  background: #bca589;
}
button,
input,
select {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
button:disabled {
  opacity: 0.35;
  cursor: default;
}
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #368f9e;
  outline-offset: 4px;
}
button {
  border: 0;
}
svg {
  width: 24px;
  height: 24px;
  display: block;
}
button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
[hidden] {
  display: none !important;
}
#beach {
  position: fixed;
  inset: 0;
  touch-action: none;
}
#beach > canvas {
  width: 100%;
  height: 100%;
  display: block;
  outline: none;
}
.engine-host {
  position: fixed;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: -1;
}
.hud {
  position: fixed;
  z-index: 2;
}
.topbar {
  top: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}
.topbar > * {
  pointer-events: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 17px 12px 13px;
  background: var(--paper);
  border-radius: 16px 18px 18px 5px;
  box-shadow: 0 3px 0 #755f3933;
}
.brand > span:first-child {
  background: #ead5a3;
  padding: 9px;
  border-radius: 12px;
}
.brand b {
  display: block;
  font-size: 20px;
  letter-spacing: -0.8px;
  text-align: left;
}
.brand small {
  display: block;
  font-size: 11px;
  margin-top: 3px;
  color: #8a7b5e;
}
.chevron {
  margin-left: 14px;
  color: #9a8a6c;
}
.star-counter {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--paper);
  border-radius: 24px;
  padding: 10px 17px 10px 12px;
  box-shadow: 0 3px 0 #755f3928;
}
.star-counter svg {
  stroke: #c17942;
  fill: #edb174;
}
.star-counter b {
  font-size: 19px;
}
.discovery-count { display: inline-flex; align-items: center; gap: 7px; }
.discovery-count + .discovery-count { margin-left: 8px; border-left: 1px solid #b7a98d66; padding-left: 14px; }
#quest-list progress { display: block; width: 100%; height: 7px; margin-top: 9px; accent-color: #426e63; }
#quest-list .quest-reward { display: flex; align-items: center; gap: 3px; margin-left: auto; white-space: nowrap; color: #a46738; }
.quest-reward svg { width: 18px; height: 18px; fill: #edb174; }
.top-actions {
  margin-left: auto;
  display: flex;
  gap: 9px;
}
.round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff8e5ed;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 0 #755f3928;
}
.round[aria-pressed="true"] {
  background: #286c73;
  color: #fff;
}
.welcome {
  top: 114px;
  left: 29px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: #fffbed;
  background: #3c453eb8;
  padding: 11px 14px;
  border-radius: 6px 14px 14px 14px;
  font-size: 12px;
  box-shadow: 0 3px 20px #3a31200d;
}
.welcome button {
  background: none;
  color: inherit;
  padding: 0;
}
.welcome svg {
  width: 15px;
  height: 15px;
}
.toolbelt {
  left: 50%;
  bottom: 51px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  padding: 9px;
  background: #57442d52;
  border: 1px solid #fff3cb38;
  border-radius: 22px;
  box-shadow: 0 10px 24px #392b3326;
  backdrop-filter: blur(12px);
}
.tool {
  position: relative;
  width: 58px;
  height: 64px;
  background: #f8eac7;
  color: #655139;
  border-radius: 12px;
  box-shadow:
    inset 0 -4px 0 #b3965a35,
    0 3px 4px #302a1820;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition:
    background 0.15s,
    transform 0.15s;
}
.tool svg {
  width: 27px;
  height: 27px;
  stroke-width: 1.65;
}
.tool .label {
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.tool kbd {
  position: absolute;
  top: 4px;
  left: 6px;
  font-size: 8px;
  font-weight: 600;
  color: #928062;
}
.tool[aria-pressed="true"] {
  background: #397b7b;
  color: #fff7dd;
  box-shadow:
    inset 0 -4px 0 #194f533d,
    0 0 0 2px #fff3c8;
  transform: translateY(-5px);
}
.tool[aria-pressed="true"] kbd {
  color: #c6e3d8;
}
.tool[aria-pressed="true"]:hover {
  transform: translateY(-6px);
}
.tool-settings {
  bottom: 145px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff9e8f0;
  padding: 10px 16px;
  border-radius: 14px;
  box-shadow: 0 3px 16px #4b361b12;
  white-space: nowrap;
}
.tool-settings > span:first-child {
  color: #62817a;
}
.tool-settings b {
  font-size: 12px;
  display: block;
}
.tool-settings small {
  display: block;
  color: #8d8068;
  font-size: 10px;
  margin-top: 3px;
}
.tool-settings label {
  font-size: 10px;
  border-left: 1px solid #cab98e;
  padding-left: 16px;
  margin-left: 8px;
}
.tool-settings output {
  display: block;
  margin-top: 3px;
  font-size: 11px;
}
.tool-settings input {
  width: 83px;
}
.shortcut-hint {
  font-size: 10px;
  color: #9a8e75;
}
.utilities {
  bottom: 62px;
  left: 27px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.utilities button {
  width: 37px;
  height: 40px;
  display: grid;
  place-items: center;
  background: #3b3e38e8;
  color: #fff6dc;
  border-radius: 10px;
  box-shadow: 0 3px 0 #30281728;
}
.utilities svg {
  width: 19px;
  height: 19px;
}
.utilities .separator {
  width: 4px;
}
.ocean-controls {
  right: 27px;
  bottom: 59px;
  display: flex;
  gap: 7px;
  align-items: center;
}
.speed {
  background: #fff6dce8;
  border-radius: 50%;
  height: 38px;
  width: 38px;
  font-size: 12px;
  font-weight: 700;
}
.wave-button {
  background: #316f78;
  color: #f7eed4;
  border-radius: 16px;
  width: 63px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-shadow:
    inset 0 -4px 0 #18495555,
    0 3px 16px #22495033;
}
.wave-button svg {
  width: 29px;
  height: 29px;
}
.wave-button span:last-child {
  font-size: 11px;
}
.bottom-hint {
  bottom: 15px;
  left: 28px;
  right: 28px;
  display: flex;
  gap: 16px;
  color: #fff5dfcc;
  font-size: 10px;
  text-shadow: 0 1px 3px #51433166;
  align-items: center;
  pointer-events: none;
  transition: opacity 160ms ease-out;
}
body.using-tool .bottom-hint { opacity: 0; }
.bottom-hint b {
  font-weight: 500;
  color: #fff5df;
}
.bottom-hint > span:last-child {
  margin-left: auto;
}
kbd {
  font: inherit;
}
.bottom-hint kbd {
  background: #fff8e52b;
  padding: 2px 5px;
  border: 1px solid #fff8e55b;
  border-radius: 4px;
}
#toast {
  position: fixed;
  top: 35px;
  left: 50%;
  transform: translate(-50%, -100px);
  z-index: 10;
  color: #fff9e9;
  background: #354d47;
  padding: 13px 22px;
  border-radius: 30px;
  font-size: 13px;
  transition: transform 0.25s;
  pointer-events: none;
  box-shadow: 0 5px 20px #163c3422;
}
#toast.show {
  transform: translate(-50%, 0);
}
.panel,
.modal {
  background: #fff8e9;
  color: var(--ink);
  border: 1px solid #c6ac7a55;
  border-radius: 20px;
  padding: 23px;
  box-shadow: 0 15px 60px #283c3430;
  font-size: 13px;
}
.panel {
  width: 290px;
}
.waves-panel {
  right: 28px;
  bottom: 146px;
}
.notes-panel {
  left: 28px;
  top: 112px;
  width: 310px;
}
.diagnostics {
  right: 28px;
  top: 90px;
  width: 360px;
}
.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.panel-heading h2 {
  margin: 0;
  font-size: 19px;
  letter-spacing: -0.6px;
  font-weight: 700;
}
.panel-heading button {
  padding: 4px;
  background: none;
  color: #8e8065;
}
.panel-heading svg {
  width: 18px;
  height: 18px;
}
.panel p,
.modal p {
  color: #8b7c62;
  font-size: 12px;
  line-height: 1.7;
  margin: 10px 0 20px;
}
.panel label,
.modal label {
  display: block;
  font-size: 12px;
  margin: 18px 0;
}
.panel output {
  float: right;
  color: #36777a;
}
.panel input[type="range"] {
  display: block;
  width: 100%;
  margin-top: 14px;
}
input[type="range"] {
  accent-color: #437d78;
  height: 4px;
  cursor: pointer;
}
.toggle {
  display: flex !important;
  gap: 8px;
  align-items: center;
}
.toggle input {
  accent-color: #437d78;
}
select,
input[type="number"] {
  display: block;
  width: 100%;
  border: 1px solid #dacaaa;
  border-radius: 9px;
  background: #fffdf6;
  color: var(--ink);
  padding: 10px;
  margin-top: 9px;
}
.primary {
  width: 100%;
  border-radius: 10px;
  background: #397b75;
  color: #fff9e8;
  padding: 13px 16px;
  font-weight: 600;
}
.text-button {
  padding: 7px 0;
  background: none;
  color: #507d76;
  text-decoration: underline;
  text-underline-offset: 4px;
  font-size: 11px;
}
.modal {
  width: min(410px, calc(100vw - 36px));
  max-height: 85vh;
}
.modal::backdrop {
  background: #293b3659;
  backdrop-filter: blur(6px);
}
.help {
  width: 490px;
}
.help dl {
  margin: 0;
}
.help dt {
  font-weight: 700;
  font-size: 12px;
  margin-top: 17px;
}
.help dd {
  font-size: 12px;
  line-height: 1.8;
  color: #8a7c62;
  margin: 4px 0;
}
.help kbd {
  padding: 2px 4px;
  background: #eae2cc;
  border-radius: 4px;
  font-size: 10px;
}
.muted {
  font-size: 11px !important;
  color: #998d76 !important;
}
.notes-panel ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
}
.notes-panel li {
  display: flex;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid #e6d9bb;
  padding: 14px 0;
}
.notes-panel li > span:first-child {
  background: #eadbb6;
  padding: 8px;
  border-radius: 12px;
  color: #89734b;
}
.notes-panel li svg {
  width: 21px;
  height: 21px;
}
.notes-panel li b {
  display: block;
  font-size: 12px;
}
.notes-panel li small {
  display: block;
  font-size: 11px;
  color: #998967;
  margin-top: 5px;
}
.notes-panel li.done {
  color: #387b70;
}
.notes-panel li.done > span:first-child {
  background: #dbe6c5;
  color: #387b70;
}
.diagnostics canvas {
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #f2ead5;
}
.diagnostics #metrics {
  font-variant-numeric: tabular-nums;
  line-height: 1.9;
  font-size: 11px;
  white-space: pre-line;
  color: #6d735f;
}
.loading {
  position: fixed;
  inset: 0;
  background: #f0e0bd;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #7f6c49;
  transition: opacity 0.6s;
}
.loading.done {
  opacity: 0;
  pointer-events: none;
}
.loading-castle svg {
  width: 65px;
  height: 65px;
  stroke-width: 1.1;
}
.loading h1 {
  font-size: 28px;
  letter-spacing: -1px;
  margin: 20px 0 0;
}
.loading p {
  font-size: 12px;
  color: #9e8e6c;
}
.loading-line {
  margin-top: 15px;
  width: 100px;
  height: 3px;
  overflow: hidden;
  background: #dbc89e;
  border-radius: 5px;
}
.loading-line:after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  background: #779083;
  animation: load 1.5s ease-in-out infinite;
}
@keyframes load {
  50% {
    transform: translateX(60px);
  }
}
body.photo-mode .hud,
body.photo-mode #toast {
  opacity: 0;
  pointer-events: none;
}
body.hud-hidden .hud,
body.hud-hidden #toast {
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 1250px) {
  .utilities {
    bottom: 142px;
    left: 22px;
    gap: 4px;
  }
  .utilities button {
    width: 32px;
    height: 35px;
  }
  .ocean-controls {
    bottom: 62px;
    right: 20px;
  }
  .toolbelt {
    gap: 5px;
    padding: 7px;
  }
  .tool {
    width: 51px;
    height: 60px;
  }
  .tool-settings {
    bottom: 139px;
  }
  .bottom-hint {
    gap: 10px;
  }
}
@media (max-width: 850px) {
  .topbar {
    left: 15px;
    right: 15px;
    top: 15px;
  }
  .brand {
    padding: 9px;
    gap: 8px;
  }
  .brand b {
    font-size: 17px;
  }
  .brand small {
    font-size: 9px;
  }
  .brand > span:first-child {
    padding: 6px;
  }
  .chevron {
    margin-left: 6px;
  }
  .round {
    width: 36px;
    height: 36px;
  }
  .star-counter {
    padding: 8px;
  }
  .star-counter b {
    font-size: 15px;
  }
  .top-actions {
    gap: 5px;
  }
  .welcome {
    top: 90px;
    left: 15px;
  }
  .toolbelt {
    bottom: 46px;
    max-width: calc(100vw - 20px);
    overflow-x: auto;
    justify-content: flex-start;
  }
  .tool {
    width: 49px;
    flex-shrink: 0;
    height: 58px;
  }
  .tool-settings {
    bottom: 126px;
    max-width: calc(100vw - 24px);
    padding: 9px 12px;
  }
  .tool-settings small {
    max-width: 190px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .tool-settings label {
    padding-left: 9px;
    margin-left: 0;
  }
  .shortcut-hint {
    display: none;
  }
  .tool-settings input {
    width: 55px;
  }
  .utilities {
    left: 15px;
    bottom: 183px;
  }
  .ocean-controls {
    right: 15px;
    bottom: 181px;
  }
  .wave-button {
    width: 45px;
    height: 51px;
    border-radius: 13px;
  }
  .wave-button svg {
    width: 22px;
  }
  .wave-button span:last-child {
    font-size: 9px;
  }
  .bottom-hint {
    left: 15px;
    right: 15px;
    bottom: 14px;
    font-size: 9px;
    gap: 8px;
  }
  .bottom-hint > span:nth-child(3),
  .bottom-hint > span:nth-child(4) {
    display: none;
  }
  .waves-panel {
    right: 15px;
    bottom: 242px;
  }
  .notes-panel {
    left: 15px;
    top: 88px;
  }
  .diagnostics {
    width: 310px;
    right: 15px;
    top: 85px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Material tools keep their measured load beside the action, independent of the editor. */
.tool-settings.physical-tool { bottom: 250px; }
.physical-tool label, .physical-tool input, .physical-tool .shortcut-hint { display: none; }
.material-panel {
  bottom: 145px; left: 50%; transform: translateX(-50%); width: 490px;
  max-width: calc(100vw - 32px); padding: 12px 16px; border-radius: 14px;
  background: #fff9e8f0; box-shadow: 0 3px 16px #4b361b12;
}
.material-actions { display:flex; gap:6px; }
.material-actions button { flex:1; padding:7px 9px; border-radius:8px; background:#e9dfc7; font-size:12px; }
.material-actions button[aria-pressed="true"] { background:#397b7b; color:#fff9e8; }
.material-panel meter { width:100%; height:8px; margin-top:7px; accent-color:#397b7b; }
.material-panel p { margin:5px 0 0; font-size:11px; line-height:1.4; }
.editor-menu { bottom:155px; left:20px; max-width:360px; background:#fff9e8f0; border-radius:12px; padding:10px 12px; font-size:12px; }
.editor-menu summary { cursor:pointer; list-style:none; }
.editor-menu summary::after { content:' ＋'; }
.editor-menu[open] summary::after { content:' −'; }
.editor-menu p { max-width:300px; font-size:11px; color:#786c54; line-height:1.6; }
#editor-tools { display:grid; grid-template-columns:repeat(5, 1fr); gap:8px; padding-top:8px; }
#editor-tools .tool { width:50px; }
@media(max-width:850px) {
  .tool-settings.physical-tool { bottom:243px; }
  .material-panel { bottom:137px; width:440px; }
  .editor-menu { bottom:155px; left:12px; right:auto; }
}
.object-hint { position:fixed; transform:translate(-50%, -100%); pointer-events:none; padding:9px 14px; border-radius:18px; background:#fffef5; color:#283c37; font-size:13px; box-shadow:0 3px 10px #0002; white-space:nowrap; z-index:20; }
.object-hint::after { content:""; position:absolute; left:50%; bottom:-6px; border-left:6px solid transparent; border-right:6px solid transparent; border-top:7px solid #fffef5; }
.toolbelt { gap:5px; padding:7px; border-radius:16px; }
.toolbelt .tool { width:54px; height:59px; }
@media (max-width:1000px) {
  .toolbelt { gap:3px; }
  .toolbelt .tool { width:43px; height:53px; }
  .toolbelt .tool .label { font-size:9px; }
}
.wave-confirm { position: fixed; top: 94px; left: 50%; transform: translateX(-50%); padding: 14px 20px; text-align: center; }
.wave-confirm p { margin: 0 0 10px; font-size: 12px; }
.wave-confirm button { padding: 8px 14px; margin: 0 3px; }
.sun-control { position: fixed; inset: 70px 7% 150px; pointer-events: none; z-index: 25; }
.sun-control svg { width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.sun-control path { pointer-events: stroke; cursor: pointer; }
.sun-orb { pointer-events: all; cursor: grab; fill: #fff3b0; filter: drop-shadow(0 0 10px #ffc65b); touch-action: none; }
.sun-orb:focus-visible { stroke: #ffa838; stroke-width: 5; outline: none; }
.sun-close { pointer-events: all; position: absolute; bottom: 5%; left: 50%; transform: translateX(-50%); padding: 8px 22px; }
.beach-configuration { margin:0; inset:0; width:100vw; height:100dvh; max-width:none; max-height:none; padding:0; border:0; background:#b6aa91; color:var(--ink); }
.beach-configuration[open] { display:grid; grid-template-columns:minmax(0,1fr) 310px; }
.beach-configuration::backdrop { background:#b6aa91; }
.config-stage { position:relative; min-width:0; }
#config-preview { position:absolute; inset:0; }
#config-preview-state { position:absolute; left:24px; top:18px; margin:0; padding:10px 16px; background:#fff9e8dd; border-radius:18px; font-size:13px; pointer-events:none; }
.config-camera-hint { position:absolute; bottom:24px; left:24px; font-size:12px; color:#fff9e8; pointer-events:none; }
.config-sidebar { background:#fff7df; padding:24px; overflow:auto; border-left:1px solid #e5d8b9; }
.config-sidebar h2 { margin:0 0 8px; text-align:center; font-size:23px; }
.config-sidebar #current-beach { font-size:10px; text-align:center; margin:0 0 20px; color:#8b7c62; }
.config-sidebar label { display:block; font-size:12px; margin:15px 0 6px; }
.config-sidebar select { margin-top:6px; border:0; background:#efe1b3; font-size:14px; text-align:center; font-weight:600; cursor:pointer; }
.config-card { width:100%; padding:0 0 9px; border-radius:17px; overflow:hidden; background:#efe1b3; font-size:15px; font-weight:600; }
.config-card canvas { display:block; width:100%; height:100px; object-fit:contain; margin-bottom:7px; }
.config-card span + span { margin-left:12px; }
.config-art { background:#efe1b3; border-radius:15px 15px 0 0; margin-top:6px; height:58px; display:flex; justify-content:center; align-items:center; overflow:hidden; }
.config-art + select { margin-top:0; border-radius:0 0 12px 12px; }
#format-art i { width:102px; height:28px; background:linear-gradient(90deg,#e8cb7a 60%,#27a6b0 62%); transform:skewY(-12deg) rotate(8deg); box-shadow:0 5px #bda063; transition:width .2s ease; }
#format-art[data-format="square"] i { width:60px; height:38px; }
#sand-swatch { display:inline-block; width:24px; height:11px; margin-left:10px; border-radius:6px; }
#waves-art { background:#28a7b5; color:white; font-size:44px; letter-spacing:6px; line-height:1; }
#waves-art[data-waves="calm"] { font-size:25px; }
#waves-art[data-waves="strong"] { font-size:65px; }
.seed-row { display:flex; gap:5px; }
.seed-row input { margin-top:5px; }
.seed-row button { background:transparent; font-size:23px; padding:6px; }
#random-seed { width:100%; padding:10px; margin-top:15px; background:#243d3e; color:white; border-radius:20px; }
.config-note { font-size:10px; color:#8b7c62; line-height:1.6; }
.config-actions { display:flex; gap:8px; margin-top:14px; position:sticky; bottom:-24px; background:#fff7df; padding:10px 0; }
.config-actions button { padding:12px 16px; flex:1; border-radius:12px; }
.layout-picker { position:absolute; top:50%; left:calc((100% - 310px)/2); transform:translate(-50%,-50%); width:min(620px,calc(100% - 350px)); max-height:85vh; overflow:auto; background:#fff8e4; border-radius:20px; padding:22px; box-shadow:0 16px 70px #263e3a55; }
#layout-choices { display:grid; grid-template-columns:repeat(4,1fr); gap:10px; }
#layout-choices button { padding:3px 3px 9px; border:2px solid transparent; background:#f1e5bf; border-radius:12px; overflow:hidden; font-size:12px; }
#layout-choices button[aria-pressed="true"] { border-color:#397b75; background:#c9e0d5; }
#layout-choices canvas { display:block; width:100%; height:auto; border-radius:7px; margin-bottom:7px; }
#layout-choices button.locked canvas { filter:grayscale(1); opacity:.55; }
#layout-choices button { transition:background .18s ease,border-color .18s ease; }
.unlock-modal { width:min(420px,calc(100vw - 32px)); text-align:center; }
.unlock-modal h2 { margin-top:0; }
.unlock-actions { display:flex; gap:12px; margin-top:24px; }
.unlock-actions button { flex:1; padding:12px; border-radius:12px; }
#unlock-balance { color:#6a796e; }
@media(max-height:800px) {
  .config-sidebar { padding:16px 24px; }
  .config-sidebar h2 { font-size:21px; margin-bottom:4px; }
  .config-sidebar #current-beach { margin-bottom:10px; }
  .config-sidebar label { margin:10px 0 4px; }
  .config-sidebar select { padding:8px 10px; }
  .config-card canvas { height:60px; margin-bottom:4px; }
  .config-card { padding-bottom:6px; }
  .config-art { height:38px; }
  #format-art i { height:22px; }
  #format-art[data-format="square"] i { height:30px; }
  #random-seed { margin-top:8px; padding:8px; }
  .config-note { margin:8px 0; line-height:1.45; }
  .config-actions { margin-top:6px; bottom:-16px; }
  .config-actions button { padding:10px; }
}
@media(max-width:760px) { .beach-configuration[open] { grid-template-columns:minmax(0,1fr) 245px; } .config-sidebar{padding:16px;} .layout-picker{left:50%;width:calc(100% - 32px);} #layout-choices{grid-template-columns:repeat(3,1fr);} }
@media(prefers-reduced-motion:reduce) { #format-art i,#layout-choices button{transition:none;} }

.collection-modal { width: min(760px, calc(100vw - 32px)); }
.tool.new-tool::after { content:''; position:absolute; top:5px; right:5px; width:9px; height:9px; border-radius:50%; background:#168de2; box-shadow:0 0 0 2px #fff3d8; }
#bottle-guide p { line-height:1.75; margin:18px 0 24px; }
#bottle-guide > .primary { width:100%; }
#collection-list { display:grid; gap:20px; }
.collection-group { --rarity-color:#a5a49c; border-left:4px solid var(--rarity-color); padding-left:12px; }
.collection-group h3 { margin:0 0 10px; font-size:15px; color:#574b38; }
.collection-group ul { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; list-style:none; padding:0; margin:0; }
.collection-item { display:flex; align-items:center; gap:10px; min-height:56px; padding:6px; border-radius:8px; background:#e6e2d9; color:#817b6e; }
.collection-item.discovered { background:#f4e8cf; color:#574b38; }
.collection-item > span { display:grid; place-items:center; flex:0 0 42px; height:42px; padding:7px; border-radius:6px; background:#0000000a; }
.collection-item b { font-size:12px; font-weight:500; }
.collection-group[data-rarity="atypical"] { --rarity-color:#81c9e8; }
.collection-group[data-rarity="rare"] { --rarity-color:#a0c571; }
.collection-group[data-rarity="legendary"] { --rarity-color:#ebd66a; }
.collection-group[data-rarity="mythic"] { --rarity-color:#e79880; }
.collection-modal[open] { animation:menu-appear 160ms ease-out; }
@media(max-width:540px) { .collection-group ul { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(prefers-reduced-motion:reduce) { .collection-modal[open] { animation:none; } }
.game-menu { width: min(360px, calc(100vw - 32px)); }
.game-menu-actions { display: grid; gap: 10px; margin-top: 18px; }
.game-menu-actions button { width: 100%; min-height: 44px; border-radius: 10px; }
.game-menu-actions button:not(.primary) { background: #efe5cf; }
.game-menu[open] { animation: menu-appear 160ms ease-out; }
@keyframes menu-appear { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .game-menu[open] { animation: none; } }
