.cw-panel {
  --cw-ink: #173f37;
  --cw-paper: #fffdf3;
  --cw-rule: #c5d3bf;
  color: var(--cw-ink);
}
.cw-library { margin-block: 0 24px; }
.cw-top, .cw-actions, .cw-footer { display: flex; align-items: center; }
.cw-top { justify-content: space-between; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 22px; }
.cw-top h2 { margin: 0; font-size: clamp(24px,3vw,34px); line-height: 1.07; }
.cw-mode,.cw-switch,.cw-clue-bar button {
  display: inline-flex; justify-content: center; align-items: center;
  border: 1px solid #aabfae; color: var(--cw-ink); background: #f5f5e9;
  box-shadow: 0 3px 0 #c0cfbc; font-weight: 740;
}
.cw-mode { border-radius: 22px; min-height: 44px; gap: 9px; padding: 8px 15px 8px 10px; }
.cw-mode[aria-pressed="true"] { color: #fffbed; background: #275d4b; border-color: #194f3c; box-shadow: 0 3px 0 #123c2e; }
.cw-switch-track {
  width: 29px; height: 17px; position: relative; border-radius: 10px; background: #acc2ad;
  box-shadow: inset 0 2px 0 #708f76;
}
.cw-switch-track::after { content: ""; width: 11px; height: 11px; position: absolute; top: 3px; left: 3px; border-radius: 50%; background: #fffdf0; box-shadow: 0 1px 2px #37533c75; }
.cw-mode[aria-pressed="true"] .cw-switch-track { background: #add19b; }
.cw-mode[aria-pressed="true"] .cw-switch-track::after { left: 15px; background: #174332; }
.cw-layout { display: grid; grid-template-columns: minmax(260px,.83fr) minmax(0,1fr); gap: clamp(22px,3vw,38px); align-items: start; }
.cw-play { min-width: 0; }
.cw-clue-bar {
  display: grid; grid-template-columns: 44px minmax(0,1fr) 44px; gap: 10px; min-height: 80px; align-items: center;
  color: #fffdf0; background: #24594c; border-radius: 13px; padding: 10px; margin-bottom: 14px;
  box-shadow: 0 3px 0 #123e33;
}
.cw-clue-bar button { width: 44px; min-height: 44px; font-size: 1.15rem; border-radius: 10px; border: 0; box-shadow: 0 3px 0 #a6b5a0; }
#cw-current { display: grid; gap: 4px; font-size: 1rem; line-height: 1.36; }
#cw-current strong { color: #d3e7ba; font-size: .75rem; letter-spacing: .035em; }
.cw-board {
  display: grid; grid-template-columns: repeat(var(--cw-size),minmax(0,1fr)); gap: 2px; overflow: hidden;
  padding: 5px; border: 1px solid #244939; border-radius: 8px; background: #34594b;
  box-shadow: 0 4px 0 #1c3c30,0 10px 15px -10px #314b36a8;
}
.cw-square,.cw-block { position: relative; aspect-ratio: 1; min-width: 0; }
.cw-block { background: repeating-linear-gradient(135deg,#264c3f 0 5px,#2d5445 5px 6px); border-radius: 3px; }
.cw-square { background: var(--cw-paper); border-radius: 2px; box-shadow: inset 0 -2px #e0e1d1; }
.cw-square.in-entry { background: #d6ead0; box-shadow: inset 0 -2px #b3d0ab; }
.cw-square.is-active { background: #f5d28e; box-shadow: inset 0 0 0 2px #93652d; }
.cw-square:focus-within { outline: 2px solid #294c3d; outline-offset: -4px; }
.cw-square.invalid::after { content: "×"; position: absolute; right: 3px; bottom: 0; color: #923b23; font-size: clamp(.8rem,2.8vw,1.25rem); font-weight: 800; pointer-events: none; }
.cw-number { position: absolute; top: 2px; left: 4px; font: 700 clamp(.6rem,1.3vw,.8rem)/1 system-ui,sans-serif; pointer-events: none; color: #325346; }
.cw-square input { display: block; width: 100%; height: 100%; min-width: 0; border: 0; border-radius: 0; outline: 0; appearance: none; -webkit-appearance: none; background: transparent; color: var(--cw-ink); caret-color: transparent; text-align: center; padding: 7px 0 0; font: 750 clamp(1.1rem,3vw,2rem)/1 system-ui,sans-serif; }
.cw-square input::selection { background: transparent; }
.cw-progress { display: flex; align-items: center; gap: 12px; margin: 17px 0 13px; color: #42624e; font-size: .8rem; font-weight: 660; font-variant-numeric: tabular-nums; }
.cw-progress progress { min-width: 0; flex: 1; height: 6px; overflow: hidden; appearance: none; -webkit-appearance: none; border: 0; border-radius: 5px; background: #e2e9d9; color: #528969; }
.cw-progress progress::-webkit-progress-bar { background: #e2e9d9; }
.cw-progress progress::-webkit-progress-value { background: #528969; }
.cw-progress progress::-moz-progress-bar { background: #528969; }
.cw-actions { gap: 10px; flex-wrap: wrap; }
.cw-actions button { border-radius: 22px; min-height: 44px; padding: 9px 16px; font-size: .88rem; }
.cw-actions .dark { color: white; background: #235a46; box-shadow: 0 3px 0 #123d2d; }
.cw-panel :is(.cw-clue-bar button,.cw-actions button,.cw-mode):active { transform: translateY(2px); box-shadow: none; }
.cw-panel button:focus-visible { outline: 3px solid #aa6435; outline-offset: 2px; }
.cw-panel .puzzle-feedback { margin: 13px 0 0; }
.cw-panel .puzzle-feedback:empty { margin: 0; }
.cw-clues { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; align-items: start; }
.cw-clues.down-only { grid-template-columns: 1fr; }
.cw-clues > div { min-width: 0; border: 1px solid #ccd9c9; background: #fffcf0; border-radius: 13px; box-shadow: 0 3px 0 #e4e7da; }
.cw-clues h3 { display: flex; align-items: center; gap: 7px; margin: 0; border-bottom: 1px solid #d6dfcd; border-radius: 12px 12px 0 0; padding: 10px 12px; background: #eef2e4; font-size: 1.06rem; }
.cw-clues h3 span { color: #59806b; }
.cw-clues ol { list-style: none; margin: 0; padding: 2px 5px; }
.cw-clues li { margin: 0; padding: 0; }
.cw-clues li + li { border-top: 1px solid #e0e5d7; }
.cw-clues button { display: grid; grid-template-columns: 1.55em minmax(0,1fr); gap: 5px; align-items: baseline; width: 100%; min-height: 44px; margin: 3px 0; padding: 7px 4px; border: 0; border-radius: 6px; background: transparent; color: var(--cw-ink); text-align: start; font-size: .89rem; line-height: 1.38; }
.cw-clues button strong { color: #527761; font-size: .8rem; font-variant-numeric: tabular-nums; text-align: center; }
.cw-clues button[aria-current="true"] { background: #dcebcf; box-shadow: inset 3px 0 #739d73; }
.cw-clues button[aria-current="true"] strong { color: #245137; }
@media (hover:hover) {
  .cw-clues button:hover { background: #e7eedc; }
  .cw-mode:not([aria-pressed="true"]):hover,.cw-switch:hover,.cw-clue-bar button:hover { background: #e9f1df; }
}
.cw-help { border-top: 1px solid var(--cw-rule); margin: 20px 0 0; padding-top: 14px; color: #4b6457; font-size: .83rem; line-height: 1.5; }
.cw-footer { justify-content: center; flex-wrap: wrap; gap: 18px; padding-block: 28px; }
@media (max-width: 890px) {
  .cw-clues { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .cw-layout { grid-template-columns: 1fr; gap: 22px; }
  .cw-play { width: min(100%,440px); margin-inline: auto; }
  .cw-clues { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .cw-top { margin-bottom: 16px; }
  .cw-clue-bar { gap: 7px; min-height: 69px; }
}
@media (max-width: 650px) {
  .cw-panel { padding-inline: 12px; }
}
@media (max-width: 400px) {
  .cw-clues { grid-template-columns: 1fr; }
  .cw-mode { padding-inline: 9px; font-size: .79rem; }
  .cw-top { gap: 8px; }
  .cw-number { left: 2px; top: 1px; }
}

.cw-tide-card { margin:0 0 20px; padding:17px clamp(14px,3vw,24px); border-radius:14px; background:#203d42; color:#fff5d9; box-shadow:0 3px #162d31; }
.cw-tide-card h3 { margin:0 0 5px; font-size:1.2rem; }
.puzzle-choice[data-puzzle="tidelock"] .choice-art { --portrait:url("../press-guardians.webp"); --spot:0% 100%; --zoom:300% 200%; }
.cw-tide-card p { margin:.45rem 0; line-height:1.5; }
.cw-tide-card a { color:#f7d695; text-decoration:underline; text-underline-offset:.18em; }
.cw-log { display:flex; gap:5px; flex-wrap:wrap; padding:0; margin:10px 0; list-style-position:inside; }
.cw-log li { padding:4px 7px; border:1px solid #759491; border-radius:4px; font-size:.8rem; font-variant-numeric:tabular-nums; }
.cw-clues li.cw-bank-clue { padding:9px 7px; font-size:.88rem; line-height:1.4; }
#cw-across-heading { color:inherit; }
.cw-seal { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; }
.cw-seal label { width:100%; font-size:.88rem; font-weight:700; }
.cw-seal input { width:9.5em; max-width:100%; min-height:44px; padding:8px 12px; color:#173f37; border:1px solid #96ac97; border-radius:9px; background:#fffdf3; text-transform:uppercase; letter-spacing:.13em; }
.cw-panel [hidden] { display:none; }
