* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100vh;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

body {
  background-color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  color: var(--gold-cream);
}

.app-container {
  width: 100%;
  height: 100vh;
  background: radial-gradient(ellipse 80% 60% at 50% 35%, #1a5949 0%, #0a3d31 35%, #051c17 75%, #020e0c 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-cream);
  z-index: 10;
}

.header {
  display: flex;
  flex-direction: column;
  gap: var(--section-gap);
  padding: 0;
  z-index: 10;
}

.header-brand {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: var(--col-max);
  width: 100%;
  margin: 0 auto;
  padding: 10px 6px 2px;
}

.header-brand-menu {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--control-fg, var(--gold-mid));
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
}

.header-brand-menu i {
  display: none;
}

.header-brand-menu::before {
  content: '';
  width: 15px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow:
    0 -5px 0 currentColor,
    0 5px 0 currentColor;
}

.header-brand-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  position: relative;
  background:
    linear-gradient(180deg,
      rgba(255,240,160,0.12) 0%,
      rgba(200,148,26,0.22) 40%,
      rgba(120,70,0,0.18) 70%,
      rgba(245,192,74,0.08) 100%);
  border: 1px solid rgba(245,192,74,0.55);
  border-radius: 6px;
  padding: 6px 14px 5px;
  box-shadow:
    inset 0 1px 0 rgba(255,248,200,0.35),
    inset 0 -1px 0 rgba(100,55,0,0.3),
    inset 1px 0 0 rgba(245,192,74,0.08),
    inset -1px 0 0 rgba(245,192,74,0.08),
    0 2px 12px rgba(0,0,0,0.5),
    0 0 0 1px rgba(100,55,0,0.4);
}

.header-brand-title::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px; right: -1px; bottom: -1px;
  border-radius: 6px;
  background:
    linear-gradient(to right, rgba(255,220,80,0.7) 10px, transparent 10px) top left / 100% 1px no-repeat,
    linear-gradient(to left,  rgba(255,220,80,0.7) 10px, transparent 10px) top right / 100% 1px no-repeat,
    linear-gradient(to right, rgba(255,220,80,0.7) 10px, transparent 10px) bottom left / 100% 1px no-repeat,
    linear-gradient(to left,  rgba(255,220,80,0.7) 10px, transparent 10px) bottom right / 100% 1px no-repeat,
    linear-gradient(to bottom, rgba(255,220,80,0.7) 8px, transparent 8px) top left / 1px 100% no-repeat,
    linear-gradient(to top,   rgba(255,220,80,0.7) 8px, transparent 8px) bottom left / 1px 100% no-repeat,
    linear-gradient(to bottom, rgba(255,220,80,0.7) 8px, transparent 8px) top right / 1px 100% no-repeat,
    linear-gradient(to top,   rgba(255,220,80,0.7) 8px, transparent 8px) bottom right / 1px 100% no-repeat;
  pointer-events: none;
}

.header-brand-title::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 6px;
  background:
    radial-gradient(circle at 7px 7px, #fff3a4 0 1px, #f5c04a 1px 3px, #8a5b0b 3px 4px, transparent 4px),
    radial-gradient(circle at calc(100% - 7px) 7px, #fff3a4 0 1px, #f5c04a 1px 3px, #8a5b0b 3px 4px, transparent 4px),
    radial-gradient(circle at 7px calc(100% - 7px), #fff3a4 0 1px, #f5c04a 1px 3px, #8a5b0b 3px 4px, transparent 4px),
    radial-gradient(circle at calc(100% - 7px) calc(100% - 7px), #fff3a4 0 1px, #f5c04a 1px 3px, #8a5b0b 3px 4px, transparent 4px);
  pointer-events: none;
  z-index: 1;
}

.header-brand-title > * {
  position: relative;
  z-index: 2;
}

.header-brand-title p {
  border-top: 1px solid transparent;
  border-image: linear-gradient(to right, transparent, rgba(245,192,74,0.55) 25%, rgba(255,240,160,0.8) 50%, rgba(245,192,74,0.55) 75%, transparent) 1;
  padding-top: 3px;
}

.header-brand-title h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1;
  background: linear-gradient(180deg, #FFFBE8 0%, #FFE57A 30%, var(--gold-light) 60%, #C07C10 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}

.header-brand-title p {
  margin: 0;
  color: rgba(255, 232, 160, 1);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1;
  letter-spacing: 0.2em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.subtitle-mobile {
  font-size: 10px;
  display: block;
}

.subtitle-desktop {
  font-size: 8px;
  display: none;
}

/* ── Dashboard info bar ─────────────────────────────────────────────────── */

.dashboard-wrapper {
  max-width: var(--col-max);
  width: 100%;
  margin: 0 auto;
  padding: 0 6px;
}

.dashboard-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(245, 233, 196, 0.2);
  border-radius: 8px;
  padding: 4px 10px;
}

.dashboard-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dashboard-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-stat {
  display: flex;
  align-items: center;
  gap: 5px;
}

.dashboard-round {
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-pale);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-info {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-cream);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-sep {
  width: 1px;
  height: 10px;
  background: rgba(200, 148, 26, 0.2);
  flex-shrink: 0;
}

/* ── Hand count label ───────────────────────────────────────────────────── */

.hand-count {
  color: rgba(245, 233, 196, 0.45);
  font-weight: 600;
  margin-left: 4px;
  letter-spacing: 0;
}

/* ── Header brand right column ──────────────────────────────────────────── */

.header-brand-end {
  display: flex;
  justify-content: flex-end;
}

/* ── Decision note tile highlight ───────────────────────────────────────── */

.note-tile {
  color: var(--gold-light);
  font-weight: 700;
  margin-left: 0.35em;
}

.note-action {
  color: var(--red-light);
  font-weight: 900;
  margin-left: 0.35em;
}

@media (min-width: 431px) {
  .status-bar {
    padding: 4px 20px;
    font-size: 13px;
  }

  .header-brand {
    padding: 8px 6px 2px;
  }

  .header-brand-title {
    align-items: center;
    gap: 2px;
    padding: 3px 14px 5px;
  }

  .header-brand-menu {
    width: clamp(32px, 4vh, 42px);
    height: clamp(32px, 4vh, 42px);
    font-size: clamp(16px, 2.4vh, 24px);
  }

  .subtitle-mobile {
    display: none;
  }

  .subtitle-desktop {
    display: block;
  }

  .header-brand-title h1 {
    font-size: clamp(22px, 3.8vh, 40px);
    letter-spacing: 0.1em;
    background: linear-gradient(180deg, #FFFBE8 0%, #FFE57A 30%, var(--gold-light) 60%, #C07C10 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }

  .subtitle-desktop {
    font-size: clamp(9px, 0.9vh, 12px);
    letter-spacing: 0.2em;
    white-space: nowrap;
    color: rgba(255, 232, 160, 1);
    -webkit-text-fill-color: rgba(255, 232, 160, 1);
  }

  .dashboard-inner {
    padding: clamp(4px, 0.5vh, 8px) 12px;
    border-radius: 8px;
  }

  .dashboard-round,
  .dashboard-info {
    font-size: clamp(11px, 1.2vh, 14px);
  }
}

@media (max-height: 750px) {
  .app-container {
    height: 100vh;
    overflow: hidden;
  }

  .header {
    padding: 4px 0 !important;
    gap: 4px !important;
  }

  .header h1 {
    font-size: 18px !important;
  }

  .header p {
    font-size: 8px !important;
  }
}

@media (max-width: 430px) {
  .header-brand-title p {
    border-top: none;
    border-image: none;
    padding-top: 0;
  }

  .app-container {
    padding-top: clamp(3px, 0.5dvh, 8px);
    padding-bottom: clamp(4px, 1dvh, 14px);
    gap: clamp(2px, 0.5dvh, 6px);
  }

  .status-bar {
    padding: clamp(4px, 0.8dvh, 10px) 20px;
    font-size: 12px;
  }

  .header-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(2px, 0.5dvh, 8px) 6px !important;
  }

  .header-brand > div:first-child {
    display: none;
  }

  .header-brand-title {
    flex-direction: row;
    align-items: baseline;
    gap: 4px;
    padding: 3px 13px;
  }

  .header-brand-title::after {
    background:
      radial-gradient(circle at 6px 6px, #fff3a4 0 0.8px, #f5c04a 0.8px 2.4px, #8a5b0b 2.4px 3px, transparent 3px),
      radial-gradient(circle at calc(100% - 6px) 6px, #fff3a4 0 0.8px, #f5c04a 0.8px 2.4px, #8a5b0b 2.4px 3px, transparent 3px),
      radial-gradient(circle at 6px calc(100% - 6px), #fff3a4 0 0.8px, #f5c04a 0.8px 2.4px, #8a5b0b 2.4px 3px, transparent 3px),
      radial-gradient(circle at calc(100% - 6px) calc(100% - 6px), #fff3a4 0 0.8px, #f5c04a 0.8px 2.4px, #8a5b0b 2.4px 3px, transparent 3px);
  }

  .header-brand-title h1 {
    font-size: 20px;
  }

  .subtitle-mobile {
    font-size: 8px;
  }

  .dashboard-inner {
    padding: 3px 8px;
    border-radius: 6px;
  }
}

@media (min-width: 560px) {
  .header-brand { padding-left: 0 !important; padding-right: 0 !important; }
  .dashboard-wrapper { padding-left: 0 !important; padding-right: 0 !important; }
}
