:root {
  --agc-font: Avenir, "Avenir Next", Helvetica, Arial, sans-serif;
}

.agc {
  --agc-surface: #ffffff;
  --agc-text: #111111;
  --agc-muted: #4f4f4f;
  --agc-card-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
  --agc-overlay: rgba(255, 255, 255, 0.97);
  --agc-overlay-panel-bg: rgba(255, 255, 255, 0.98);
  --agc-overlay-text: #111111;
  --agc-overlay-muted: rgba(17, 17, 17, 0.8);
  --agc-overlay-close-bg: rgba(0, 0, 0, 0.08);
  --agc-overlay-close-text: #111111;
  --agc-pill-bg: #111111;
  --agc-pill-text: #ffffff;
  --agc-border: rgba(0, 0, 0, 0.1);
  --agc-orbit-center-y: 96%;
  --agc-center-y: 86%;

  position: relative;
  box-sizing: border-box;
  height: 100vh;
  min-height: 100vh;
  width: 100%;
  padding: 0;
  font-family: var(--agc-font);
  background: var(--agc-surface);
  color: var(--agc-text);
  border-radius: 0;
  overflow: hidden;
  transition: background-color 420ms ease, color 320ms ease;
}

.agc[data-theme="dark"] {
  --agc-surface: #10151d;
  --agc-text: #f8fafc;
  --agc-muted: #c7ced7;
  --agc-card-shadow: 0 16px 34px rgba(0, 0, 0, 0.48);
  --agc-overlay: rgba(10, 14, 20, 0.97);
  --agc-overlay-panel-bg: rgba(18, 24, 34, 0.95);
  --agc-overlay-text: #f8fafc;
  --agc-overlay-muted: rgba(248, 250, 252, 0.9);
  --agc-overlay-close-bg: rgba(255, 255, 255, 0.16);
  --agc-overlay-close-text: #f8fafc;
  --agc-pill-bg: #f8fafc;
  --agc-pill-text: #0b0f15;
  --agc-border: rgba(255, 255, 255, 0.18);
}

.agc-room {
  position: relative;
  z-index: 2;
  height: 100%;
  min-height: 100%;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: grid;
  grid-template-rows: auto auto 1fr;
  overflow: hidden;
  cursor: default;
}

.agc-selected-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  transition: opacity 420ms ease;
}

.agc-selected-bg.is-visible {
  opacity: 0.36;
}

.agc-selected-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(30px) saturate(1.05);
  transform: scale(1.14);
  transform-origin: center center;
  display: block;
  mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.65) 58%, rgba(0, 0, 0, 0.12) 82%, transparent 100%);
  -webkit-mask-image: radial-gradient(circle at center, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.65) 58%, rgba(0, 0, 0, 0.12) 82%, transparent 100%);
}

.agc-topbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(12px, 1.8vw, 18px) clamp(22px, 3vw, 40px) 0;
  z-index: 12;
  pointer-events: auto;
  cursor: default;
}

.agc-top-btn {
  position: relative;
  z-index: 13;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1px solid var(--agc-border);
  background: transparent;
  color: var(--agc-text);
  border-radius: 999px;
  padding: 9px 14px;
  font: 700 0.85rem/1 var(--agc-font);
  cursor: pointer;
  pointer-events: auto;
  transition: background-color 220ms ease, color 220ms ease, border-color 220ms ease, opacity 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.agc-top-btn:hover {
  background: rgba(127, 127, 127, 0.16);
  border-color: rgba(127, 127, 127, 0.35);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.agc-back-btn[data-placeholder="1"] {
  opacity: 0.65;
}

.agc-back-btn {
  position: absolute;
  left: clamp(22px, 3vw, 40px);
  top: clamp(12px, 1.8vw, 18px);
}

.agc-theme-toggle {
  /* Shared with .agc-top-btn */
}

.agc-header {
  position: relative;
  z-index: 4;
  text-align: center;
  padding: 8px 20px 0;
  transform: translateY(-1vh);
  pointer-events: none;
  cursor: default;
}

.agc-logo-slot {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.agc-logo-slot img {
  max-height: 42px;
  max-width: min(72vw, 380px);
  width: auto;
  transition: filter 320ms ease;
}

.agc[data-theme="dark"] .agc-logo-slot img {
  filter: brightness(0) invert(1);
}

.agc-title {
  margin: 40px 0 0;
  font-size: clamp(1.8rem, 3vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  transition: color 320ms ease;
}

.agc-description {
  margin: 12px auto 0;
  max-width: 760px;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  font-weight: 700;
  color: var(--agc-muted);
  transition: color 320ms ease;
}

.agc-arc-area {
  position: relative;
  min-height: 0;
  user-select: none;
  cursor: default;
  overflow: visible;
  z-index: 2;
  transform: translateY(-8vh);
}

.agc-arc-track {
  position: absolute;
  left: 50%;
  top: var(--agc-orbit-center-y);
  width: min(92vw, 1100px);
  height: min(56vh, 600px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 2;
}

.agc-card-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(92px, 8.6vw, 132px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 20px;
  padding: 0;
  overflow: hidden;
  background: #d1d5db;
  box-shadow: var(--agc-card-shadow);
  pointer-events: auto;
  transform-origin: center center;
  cursor: pointer;
  opacity: 0;
  outline: 1px solid transparent;
  outline-offset: 8px;
  transform: translate3d(-50%, -50%, 0) scale(0.9);
  transition: transform 320ms ease, opacity 340ms ease, box-shadow 320ms ease, background-color 320ms ease, outline-color 240ms ease;
  will-change: transform, opacity;
}

.agc-card-btn:focus-visible,
.agc-top-btn:focus-visible,
.agc-theme-toggle:focus-visible,
.agc-overlay-close:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

.agc-card-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.agc-card-btn.agc-selected {
  outline-color: rgba(17, 17, 17, 0.9);
}

.agc[data-theme="dark"] .agc-card-btn.agc-selected {
  outline-color: rgba(248, 250, 252, 0.92);
}

.agc-center {
  position: absolute;
  left: 50%;
  top: var(--agc-center-y);
  transform: translate(-50%, -50%);
  text-align: center;
  width: min(88vw, 720px);
  z-index: 3;
  cursor: default;
}

.agc-center-title {
  margin: 0;
  font-size: clamp(1.6rem, 2.8vw, 2.7rem);
  font-weight: 800;
  transition: opacity 180ms ease;
}

.agc-center-desc {
  margin: 10px auto 18px;
  font-size: clamp(1rem, 1.4vw, 1.24rem);
  color: var(--agc-muted);
  max-width: 660px;
  line-height: 1.45;
  transition: opacity 180ms ease, color 320ms ease;
}

.agc-center-title.is-fading,
.agc-center-desc.is-fading {
  opacity: 0;
}

.agc-cta {
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--agc-pill-bg);
  color: var(--agc-pill-text);
  font: 700 0.95rem/1 var(--agc-font);
  cursor: pointer;
  transition: background-color 220ms ease, color 220ms ease, transform 220ms ease, box-shadow 220ms ease, opacity 220ms ease;
}

.agc-cta:hover {
  opacity: 0.95;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
}

.agc-hint {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--agc-muted);
  opacity: 0.85;
  transition: color 320ms ease;
}

.agc-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: grid;
  place-items: center;
  padding: clamp(20px, 3vw, 40px);
  background: var(--agc-overlay);
  color: var(--agc-overlay-text);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 260ms ease, visibility 260ms ease, backdrop-filter 260ms ease;
  backdrop-filter: blur(0px);
}

.agc-overlay.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  backdrop-filter: blur(6px);
}

.agc-overlay-panel {
  position: relative;
  width: min(1320px, calc(100vw - 28px));
  max-height: 90vh;
  overflow: auto;
  border-radius: 10px;
  padding: clamp(18px, 3vw, 34px);
  padding-top: clamp(56px, 6vw, 72px);
  background: var(--agc-overlay-panel-bg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.agc-overlay-close {
  position: absolute;
  top: clamp(12px, 2vw, 18px);
  right: clamp(12px, 2vw, 18px);
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: var(--agc-overlay-close-bg);
  color: var(--agc-overlay-close-text);
  font-size: 1.4rem;
  cursor: pointer;
  transition: background-color 220ms ease, transform 220ms ease, box-shadow 220ms ease;
}

.agc-overlay-close:hover {
  background: rgba(127, 127, 127, 0.24);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.agc-overlay-title {
  margin: 8px 0 6px;
  font-size: clamp(1.35rem, 2.1vw, 2rem);
  line-height: 1.2;
}

.agc-overlay-description {
  margin: 0 0 20px;
  font-size: clamp(0.95rem, 1.15vw, 1.12rem);
  color: var(--agc-overlay-muted);
}

.agc[data-theme="dark"] .agc-title,
.agc[data-theme="dark"] .agc-center-title,
.agc[data-theme="dark"] .agc-theme-toggle,
.agc[data-theme="dark"] .agc-back-btn {
  color: #f8fafc !important;
}

.agc[data-theme="dark"] .agc-description,
.agc[data-theme="dark"] .agc-center-desc,
.agc[data-theme="dark"] .agc-hint {
  color: #c7ced7 !important;
}

.agc-overlay-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.agc-overlay-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 7px;
  display: block;
  background: rgba(0, 0, 0, 0.06);
}

.agc-no-scroll {
  overflow: hidden;
}

@media (max-width: 900px) {
  .agc {
    --agc-orbit-center-y: 92%;
    --agc-center-y: 82%;
  }

  .agc-arc-track {
    width: min(96vw, 760px);
    height: min(50vh, 440px);
  }

  .agc-overlay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .agc {
    --agc-orbit-center-y: 88%;
    --agc-center-y: 78%;
  }

  .agc-arc-track {
    height: min(44vh, 360px);
  }

  .agc-card-btn {
    width: clamp(62px, 15vw, 82px);
    border-radius: 16px;
  }

  .agc-overlay-grid {
    grid-template-columns: 1fr;
  }
}
