:root {
  --bg-primary: #11100E;
  --bg-secondary: #080807;
  --bg-card: #181713;
  --text-primary: #FFFFFF;
  --text-secondary: #F2F0EA;
  --text-muted: #BFB9AA;
  --gold: #D6A84F;
  --gold-light: #F4D98B;
  --gold-dark: #8F6425;
  --gold-gradient: linear-gradient(135deg, #F4D98B 0%, #D6A84F 42%, #8F6425 100%);
  --border-strong: #F2F0EA;
  --border-gold: #D6A84F;
  --danger: #F2F0EA;
}

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

body {
  width: 600px;
  height: 600px;
  overflow: hidden;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: Poppins, Avenir Next, Avenir, Helvetica, Arial, sans-serif;
}

#app, .screen {
  width: 600px;
  height: 600px;
}

.screen {
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.screen.hidden, .hidden { display: none !important; }

.header {
  height: 52px;
  padding: 12px 12px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header h1 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1.08;
  text-align: center;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header h1 span {
  color: var(--gold-light);
  -webkit-text-fill-color: var(--gold-light);
  font-size: 12px;
  font-weight: 600;
  vertical-align: baseline;
}

.content {
  flex: 1;
  min-height: 0;
  padding: 8px 12px 0;
  overflow-y: auto;
}

.debug-mode .state-panel,
.debug-mode .error-container,
.debug-mode .loading-container {
  min-height: 190px;
}

.state-panel, .error-container, .loading-container {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 14px;
}

.state-icon {
  width: 84px;
  height: 84px;
  border: 7px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 46px;
  color: var(--gold-light);
}

h2 {
  font-size: 28px;
  line-height: 1.18;
  font-weight: 800;
}

p {
  color: var(--text-secondary);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 600;
}

.focusable {
  opacity: 0.86;
  transition: transform 140ms ease, opacity 140ms ease, border-color 140ms ease, background 140ms ease;
}

.focusable:focus {
  outline: none;
  opacity: 1;
  transform: scale(0.97);
  box-shadow: none;
  border-color: var(--gold-light);
}

.pub-card {
  position: relative;
  min-height: 508px;
  padding: 12px 18px 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.swipe-hint {
  width: 22px;
  height: 22px;
  opacity: 0.62;
  pointer-events: none;
}

.swipe-hint-left {
  transform: scaleX(-1);
}

.pub-topline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
}

.pub-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 6px 16px;
  border-radius: 999px;
  border: 3px solid rgba(244, 217, 139, 0.55);
  background: rgba(24, 23, 19, 0.72);
  color: var(--text-secondary);
  font-size: 21px;
  font-weight: 500;
  white-space: nowrap;
}

.direction-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 190px;
  padding: 6px 0;
}

.direction-arrow-wrap {
  width: 190px;
  height: 190px;
  border: 0;
  border-radius: 50%;
  background: rgba(244, 217, 139, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.direction-arrow {
  width: 188px;
  height: 188px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 50%;
  transition: transform 120ms linear;
}

.direction-arrow img {
  display: block;
  width: 188px;
  height: 188px;
  object-fit: contain;
}

.pub-card h2 {
  width: 100%;
  color: var(--text-primary);
  font-size: 34px;
  font-weight: 500;
  line-height: 1.08;
  text-align: center;
}

.metric-grid {
  width: 100%;
  display: block;
  margin-top: 0;
  text-align: center;
}

.metric-grid > div {
  min-height: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.metric-value {
  display: block;
  font-size: 26px;
  font-weight: 700;
  color: var(--gold-light);
}

.distance-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  margin-top: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 3px solid rgba(244, 217, 139, 0.45);
  background: rgba(24, 23, 19, 0.68);
  color: var(--text-secondary);
  font-size: 18px;
  font-weight: 500;
}

.loading-container {
  align-items: center;
  text-align: center;
  gap: 18px;
}

.pint-loader {
  width: 82px;
  height: 108px;
  position: relative;
}

.pint-glass {
  position: absolute;
  left: 14px;
  top: 28px;
  width: 54px;
  height: 72px;
  border: 7px solid #F2F0EA;
  border-top: 0;
  border-radius: 4px 4px 14px 14px;
  overflow: hidden;
  background: #090A0A;
  box-shadow: none;
}

.pint-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68%;
  background: linear-gradient(180deg, #D6A84F 0%, #241506 24%, #070504 100%);
  animation: stoutPulse 1200ms ease-in-out infinite;
}

.pint-foam {
  position: absolute;
  left: 12px;
  top: 16px;
  width: 58px;
  height: 26px;
  background: #F2F0EA;
  border-radius: 18px 18px 8px 8px;
  z-index: 2;
  animation: foamBob 1200ms ease-in-out infinite;
}

.pint-foam::before,
.pint-foam::after {
  content: "";
  position: absolute;
  bottom: 7px;
  width: 20px;
  height: 20px;
  background: #F2F0EA;
  border-radius: 50%;
}

.pint-foam::before { left: 6px; }
.pint-foam::after { right: 6px; }

.loading-text {
  color: var(--text-primary);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.2;
  max-width: 340px;
}

@keyframes stoutPulse {
  0%, 100% { height: 58%; }
  50% { height: 74%; }
}

@keyframes foamBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.error-icon {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--gold-gradient);
  color: #080807;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
}

.error-title {
  font-size: 28px;
  font-weight: 800;
}

.debug-panel {
  margin-top: 10px;
  padding: 10px;
  border: 4px solid #4B3A1C;
  border-radius: 8px;
  background: #0D0C0A;
}

.debug-title {
  margin-bottom: 6px;
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.debug-panel pre {
  max-height: 190px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
  font-family: Poppins, Avenir Next, Avenir, Helvetica, Arial, sans-serif;
  font-size: 12px;
  line-height: 1.3;
}
