@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;1,500&family=Outfit:wght@400;500;600;700&display=swap");

html.tides-page,
html:has(#tides-root),
html.tides-page body,
html:has(#tides-root) body {
  background: #07222a !important;
  overflow: hidden;
}
html.tides-page .md-header,
html:has(#tides-root) .md-header,
html.tides-page .md-tabs,
html:has(#tides-root) .md-tabs,
html.tides-page .md-sidebar,
html:has(#tides-root) .md-sidebar,
html.tides-page .md-footer,
html:has(#tides-root) .md-footer,
html.tides-page .md-dialog,
html:has(#tides-root) .md-dialog,
html.tides-page .md-content__button,
html:has(#tides-root) .md-content__button,
html.tides-page .md-typeset > h1,
html:has(#tides-root) .md-typeset > h1,
html.tides-page .md-typeset > p,
html:has(#tides-root) .md-typeset > p {
  display: none !important;
}
html.tides-page .md-main,
html:has(#tides-root) .md-main,
html.tides-page .md-main__inner,
html:has(#tides-root) .md-main__inner,
html.tides-page .md-content,
html:has(#tides-root) .md-content,
html.tides-page .md-content__inner,
html:has(#tides-root) .md-content__inner,
html.tides-page .md-grid,
html:has(#tides-root) .md-grid {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
}

.tides-root {
  --foam: #e8f4f2;
  --teal: #1a8f8a;
  --deep: #07222a;
  --gold: #e0c07a;
  --danger: #c45a4a;
  --ok: #5dba7a;
  position: relative;
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  color: var(--foam);
  font-family: Outfit, system-ui, sans-serif;
  user-select: none;
  touch-action: none;
}
.tides-canvas {
  position: absolute;
  inset: 0;
}
.tides-canvas canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.tides-hud {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  padding: 18px 22px;
  pointer-events: none;
}
.tides-hud a,
.tides-hud button {
  pointer-events: auto;
}
.tides-brand {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--foam);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}
.tides-exit {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(232, 244, 242, 0.75);
  text-decoration: none !important;
  border-bottom: 1px solid rgba(232, 244, 242, 0.3);
  padding-bottom: 2px;
}
.tides-meta {
  position: absolute;
  top: 56px;
  left: 22px;
  z-index: 4;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 244, 242, 0.8);
  text-shadow: 0 2px 8px #000;
  pointer-events: none;
}

.tides-hint {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(232, 244, 242, 0.85);
  text-shadow: 0 2px 10px #000;
  pointer-events: none;
  text-align: center;
}

.tides-power,
.tides-tension {
  display: none;
  position: absolute;
  left: 50%;
  bottom: 72px;
  transform: translateX(-50%);
  z-index: 5;
  width: min(320px, 78vw);
  pointer-events: none;
}
.tides-power.is-on,
.tides-tension.is-on {
  display: block;
}
.tides-bar-label {
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 8px;
  color: var(--gold);
}
.tides-bar {
  height: 14px;
  border-radius: 99px;
  background: rgba(7, 34, 42, 0.55);
  border: 1px solid rgba(232, 244, 242, 0.25);
  overflow: hidden;
  position: relative;
}
.tides-bar > i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #4ecdc4, #e0c07a);
}
.tides-tension .tides-bar {
  background: linear-gradient(90deg, #3d7ad6 0%, #5dba7a 38%, #5dba7a 62%, #e0c07a 78%, #c45a4a 100%);
}
.tides-needle {
  position: absolute;
  top: -4px;
  width: 4px;
  height: 22px;
  margin-left: -2px;
  background: #fff;
  border-radius: 2px;
  box-shadow: 0 0 8px #fff;
}

.tides-strike {
  display: none;
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 6;
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(48px, 10vw, 92px);
  color: var(--gold);
  text-shadow: 0 0 24px rgba(224, 192, 122, 0.6);
  pointer-events: none;
}
.tides-strike.is-on {
  display: block;
}

.tides-stage {
  position: absolute;
  inset: 0;
  z-index: 7;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.tides-stage.is-off {
  display: none;
}
.tides-stage.is-menu {
  background-image: linear-gradient(rgba(7, 34, 42, 0.28), rgba(7, 34, 42, 0.55)), var(--menu);
}
.tides-kicker {
  letter-spacing: 0.42em;
  text-transform: uppercase;
  font-size: 12px;
  color: var(--gold);
  margin: 0 0 10px;
}
.tides-title {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(42px, 9vw, 84px);
  line-height: 0.95;
  margin: 0 0 14px;
  text-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}
.tides-sub {
  max-width: 440px;
  color: rgba(232, 244, 242, 0.88);
  line-height: 1.5;
  margin: 0 auto 28px;
  font-size: 15px;
}
.tides-btn {
  appearance: none;
  border: 0;
  min-height: 50px;
  padding: 0 28px;
  background: rgba(232, 244, 242, 0.92);
  color: #07222a;
  font-family: Outfit, sans-serif;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 13px;
  cursor: pointer;
  border-radius: 4px;
}
.tides-btn:hover {
  background: #fff;
}
.tides-btn.ghost {
  background: transparent;
  color: var(--foam);
  border: 1px solid rgba(232, 244, 242, 0.45);
}
.tides-keys {
  margin: 0 0 28px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 244, 242, 0.7);
}
.tides-keys b {
  color: var(--gold);
  font-weight: 600;
}

.tides-catch {
  display: none;
  width: min(720px, 94vw);
  background: rgba(7, 34, 42, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(232, 244, 242, 0.18);
  border-radius: 12px;
  padding: 22px;
  text-align: left;
}
.tides-catch.is-on {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 18px;
  align-items: center;
}
.tides-catch img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}
.tides-catch h3 {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  font-size: clamp(28px, 5vw, 42px);
  margin: 0 0 8px;
}
.tides-catch p {
  margin: 0 0 8px;
  color: rgba(232, 244, 242, 0.85);
  font-size: 14px;
}
.tides-rarity {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 8px;
}
.tides-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.tides-log {
  display: none;
  width: min(860px, 94vw);
  max-height: 78dvh;
  overflow: auto;
  text-align: left;
  background: rgba(7, 34, 42, 0.78);
  border: 1px solid rgba(232, 244, 242, 0.16);
  border-radius: 12px;
  padding: 22px;
}
.tides-log.is-on {
  display: block;
}
.tides-log h3 {
  font-family: "Cormorant Garamond", serif;
  font-style: italic;
  margin: 0 0 14px;
  font-size: 32px;
}
.tides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}
.tides-card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
}
.tides-card img {
  width: 100%;
  height: 90px;
  object-fit: contain;
}
.tides-card strong {
  display: block;
  margin-top: 6px;
  font-size: 13px;
}
.tides-card span {
  font-size: 11px;
  color: rgba(232, 244, 242, 0.65);
}

.tides-playbar {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 5;
  display: none;
  gap: 8px;
}
.tides-playbar.is-on {
  display: flex;
}
.tides-playbar button {
  pointer-events: auto;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 4px;
  border: 1px solid rgba(232, 244, 242, 0.3);
  background: rgba(7, 34, 42, 0.55);
  color: var(--foam);
  font-family: Outfit, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 11px;
  cursor: pointer;
}

@media (max-width: 700px) {
  .tides-catch.is-on {
    grid-template-columns: 1fr;
  }
}
