.harbor-game {
  --sea: #103751;
  --deep: #08283f;
  --foam: #f8f6ef;
  --signal: #ffd269;
  color: var(--foam);
  background: linear-gradient(130deg, #123f57, var(--deep) 72%);
}
.harbor-heading { max-width: 55rem; margin-bottom: clamp(1.25rem, 3vw, 2.25rem); }
.harbor-heading h2 { color: var(--foam); line-height: 1.08; font-size: clamp(2.15rem, 5.2vw, 4.65rem); }
.harbor-heading p { margin: .55rem 0 0; color: #d7e7ec; font-size: clamp(1rem, 1.8vw, 1.25rem); }
.harbor-layout { display: grid; grid-template-columns: minmax(0, 1.26fr) minmax(0, .9fr); gap: clamp(1.4rem, 4.6vw, 4.5rem); align-items: start; }
.harbor-play, .harbor-results { min-width: 0; }
.harbor-instruments { display: flex; gap: 1.8rem; align-items: baseline; margin: 0 0 .65rem; }
.harbor-instruments > div { display: flex; gap: .55rem; align-items: baseline; }
.harbor-instruments span { color: #c1d9e3; font-weight: 650; }
.harbor-instruments strong { color: #fff; font: 800 1.42rem/1.1 Manrope, system-ui, sans-serif; font-variant-numeric: tabular-nums; }
.harbor-instruments [data-time] { min-width: 6ch; }
.harbor-frame { position: relative; overflow: hidden; width: 100%; border: 2px solid #6b95a9; border-radius: .6rem; background: var(--deep); box-shadow: 0 .6rem 1.5rem #001b2b55; }
.harbor-board.puzzle-board { width: 100%; max-width: none; position: relative; isolation: isolate; aspect-ratio: 4 / 3; gap: 2px; padding: 0; border-radius: 0; background: #092a40; }
.harbor-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; }
.harbor-board button { position: relative; padding: 0; touch-action: manipulation; background-image: url("hafen-fotopuzzle.jpg"); background-size: 300% 300%; border-radius: 0; }
.harbor-board button[data-tile="0"] { background: repeating-linear-gradient(135deg,#11394e 0 6px,#143e54 6px 8px); }
.harbor-board button[data-tile="1"] { background-position: 0 0; }
.harbor-board button[data-tile="2"] { background-position: 50% 0; }
.harbor-board button[data-tile="3"] { background-position: 100% 0; }
.harbor-board button[data-tile="4"] { background-position: 0 50%; }
.harbor-board button[data-tile="5"] { background-position: 50% 50%; }
.harbor-board button[data-tile="6"] { background-position: 100% 50%; }
.harbor-board button[data-tile="7"] { background-position: 0 100%; }
.harbor-board button[data-tile="8"] { background-position: 50% 100%; }
.harbor-board button span { position: absolute; left: .35rem; bottom: .35rem; min-width: 1.55rem; padding: .07rem .3rem; border-radius: .24rem; background: #092a40ed; color: #fff; font: 750 .92rem/1.45 "DM Sans", sans-serif; }
.harbor-board button:enabled:hover, .harbor-board button:focus-visible { box-shadow: inset 0 0 0 3px var(--signal); }
.harbor-game :focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.harbor-board button:focus-visible { outline-offset: -5px; }
.harbor-controls { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem 1.1rem; margin-top: 1rem; }
.harbor-primary, .harbor-secondary, .harbor-sound, .harbor-controls .photo-link { min-height: 44px; }
.harbor-primary { padding: .65rem 1.2rem; border: 1px solid transparent; border-radius: .38rem; background: var(--signal); color: #142e3c; font-weight: 800; }
.harbor-primary:enabled:hover { background: #ffe3a2; }
.harbor-controls .photo-link, .harbor-sound, .harbor-secondary { display: inline-flex; align-items: center; font-weight: 650; text-underline-offset: .2em; }
.harbor-controls .photo-link { color: #fff; }
.harbor-sound, .harbor-secondary { border: 0; background: transparent; padding: .3rem 0; color: inherit; text-decoration: underline; }
.harbor-sound { margin-left: auto; font-size: .9rem; color: #c9dde4; }
.harbor-status { margin: .8rem 0 0; color: #fff0bc; font-weight: 650; }
.harbor-status:empty { display: none; }
.harbor-guide { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px solid #4f7183; }
.harbor-guide h3 { font: 750 1.03rem/1.4 Manrope, sans-serif; letter-spacing: 0; }
.harbor-guide p, .harbor-privacy { margin: .25rem 0 0; color: #cfdee3; }
.harbor-ranking { color: #123547; background: var(--foam); padding: clamp(1rem, 2.8vw, 2rem); border-radius: .65rem; border-top: .35rem solid var(--signal); }
.harbor-ranking h3 { font-size: clamp(1.6rem, 2.8vw, 2.45rem); }
.harbor-ranking > p { margin: .5rem 0 1.1rem; }
.harbor-ranking table { width: 100%; border-collapse: collapse; table-layout: auto; font-variant-numeric: tabular-nums; font-size: 1rem; }
.harbor-ranking th, .harbor-ranking td { text-align: left; padding: .58rem .23rem; border-bottom: 1px solid #d5dad6; }
.harbor-ranking th { color: #4b6067; font-size: .875rem; }
.harbor-ranking td:first-child { font-weight: 800; }
.harbor-ranking td:nth-child(2) { overflow-wrap: anywhere; }
.harbor-ranking th:nth-last-child(-n+2), .harbor-ranking td:nth-last-child(-n+2) { text-align: right; white-space: nowrap; }
.harbor-ranking tr:first-child td { font-weight: 800; }
.harbor-ranking tbody tr:first-child { background: #f6e8bf; }
.harbor-ranking .harbor-empty { margin: .8rem 0 0; color: #455962; }
.harbor-ranking :focus-visible { outline-color: #78530c; }
.harbor-privacy { margin: .85rem .1rem 0; font-size: .94rem; line-height: 1.55; }
.harbor-privacy a { color: #fff; }
.harbor-entry { margin-top: 1rem; padding: 1rem; border: 1px solid #7899a8; border-radius: .5rem; background: #10394d; }
.harbor-entry h3 { margin-bottom: .85rem; font-size: 1.3rem; }
.harbor-entry label, .harbor-entry input[type=text] { display: block; }
.harbor-entry input[type=text] { width: min(100%, 24rem); font-size: 1rem; min-height: 44px; border-radius: .3rem; border: 1px solid #9ab3bb; background: #fff; color: #123547; padding: .45rem .7rem; }
.harbor-entry .harbor-consent { display: flex; align-items: baseline; gap: .55rem; margin: .8rem 0; }
.harbor-consent input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; accent-color: var(--signal); }
.harbor-finish { position: absolute; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; }
.harbor-finish::before { content: ""; position: absolute; inset: 0; background: linear-gradient(116deg, transparent 38%, #efffff80 47%, #fff 49%, #ffffff12 54%, transparent 58%); animation: harbor-wake .8s ease-out both; }
.harbor-finish span { position: absolute; bottom: 8%; left: 0; padding: .35em 1.05em .37em .75em; border-left: .35em solid var(--signal); background: #08283ff2; color: white; font: italic 800 clamp(1.65rem, 4vw, 3.2rem)/1.05 Manrope, sans-serif; letter-spacing: -.045em; animation: harbor-arrival .55s cubic-bezier(.14,.75,.22,1) both; }
.harbor-finish span::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: .58em; background: repeating-conic-gradient(#102f40 0 25%, #f6f7ee 0 50%) 0 0 / .58em .58em; }
@keyframes harbor-wake { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes harbor-arrival { from { transform: translateX(-110%); } to { transform: translateX(0); } }
@media (max-width: 760px) { .harbor-layout { grid-template-columns: minmax(0,1fr); } .harbor-results { margin-top: .1rem; } }
@media (max-width: 390px) { .harbor-controls { gap: .25rem .7rem; } .harbor-ranking { padding: .9rem; } }
@media (prefers-reduced-motion: reduce) { .harbor-finish::before { display: none; } .harbor-finish span { animation: none; } }
