.tg-panel {
  position: fixed;
  inset: 0;
  width: min(760px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  margin: auto;
  padding: 40px;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--cream);
  color: var(--black);
  box-shadow: 0 24px 80px rgb(17 17 17 / 18%);
}

.tg-panel::backdrop {
  background: rgb(17 17 17 / 52%);
  backdrop-filter: blur(6px);
}

html.tg-panel-open { overflow: hidden; }

.tg-panel-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--black);
  font: 28px/1 var(--sans);
  cursor: pointer;
}

.tg-panel-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 44px 8px 0;
  color: var(--mid);
  font: 500 12px/1.5 var(--sans);
  letter-spacing: .1em;
}

.tg-panel-eyebrow svg {
  width: 28px;
  height: 28px;
  padding: 5px;
  border-radius: 50%;
  background: var(--lime);
  color: var(--black);
}

.tg-panel-title {
  margin: 0;
  font: 400 clamp(36px, 5vw, 52px)/1.05 var(--serif);
  letter-spacing: -.035em;
}

.tg-panel-description {
  max-width: 48ch;
  margin: 12px 0 24px;
  color: var(--mid);
  font: 400 16px/1.65 var(--sans);
}

.tg-community-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.tg-community-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--cream-2);
  text-align: center;
}

.tg-community-card--gen-z { background: var(--lime); border-color: transparent; }

.tg-community-label {
  margin: 0 0 4px;
  color: var(--mid);
  font: 500 12px/1.6 var(--sans);
  letter-spacing: .12em;
}

.tg-community-title {
  margin: 0 0 20px;
  font: 400 36px/1.1 var(--serif);
  letter-spacing: -.035em;
}

.tg-community-qr-link {
  display: block;
  width: min(100%, 196px);
  margin: 0 auto;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.tg-community-qr-link img { display: block; width: 100%; height: auto; aspect-ratio: 1; }

.tg-community-caption {
  margin: 12px 0 20px;
  color: var(--mid);
  font: 400 12px/1.5 var(--sans);
}

.tg-community-join {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  margin-top: auto;
  padding: 12px 16px;
  border: 1px solid var(--black);
  border-radius: 999px;
  background: var(--black);
  color: var(--cream);
  font: 500 14px/1.5 var(--sans);
  text-decoration: none;
}

.tg-community-join:hover { color: var(--lime); }
.tg-panel-close:hover { background: var(--cream-2); }
.tg-panel :focus-visible { outline: 2px solid var(--black); outline-offset: 4px; }

.tg-panel-shortcut {
  margin: 24px 0 0;
  color: var(--mid);
  font: 400 12px/1.6 var(--sans);
  text-align: center;
}

.tg-panel-shortcut kbd {
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font: inherit;
}

.tg-hold-ring, .tg-hold-hint { display: none; }

@media (max-width: 760px) {
  .hero-brand-link { min-width: 44px; min-height: 44px; -webkit-touch-callout: none; user-select: none; -webkit-user-select: none; touch-action: pan-y; }
  .hero-brand-link .hero-brand-mark { pointer-events: none; -webkit-touch-callout: none; }
  .tg-hold-ring { position: absolute; inset: -2px; display: block; width: 48px; height: 48px; fill: none; stroke-width: 2.5; pointer-events: none; transform: rotate(-90deg); }
  .tg-hold-track { stroke: var(--line); }
  .tg-hold-fill { stroke: var(--green); stroke-dasharray: 100; stroke-dashoffset: 100; stroke-linecap: round; }
  .is-tg-holding .tg-hold-fill { animation: tg-hold-progress 7s linear forwards; }
  .tg-hold-hint { display: block; margin-left: 12px; color: var(--mid); font: 400 12px/1.5 var(--sans); }
  .hero-brand-link.is-tg-holding::after { animation: none; opacity: 0; }
  .tg-panel { width: calc(100% - 24px); max-height: calc(100dvh - 24px); padding: 32px 20px 24px; border-radius: 20px; }
  .tg-panel-close { top: 12px; right: 12px; }
  .tg-panel-title { max-width: 9ch; }
  .tg-community-grid { grid-template-columns: 1fr; }
  .tg-community-card { padding: 24px; }
  .tg-panel-shortcut { display: none; }
}

@keyframes tg-hold-progress { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: no-preference) {
  .tg-panel[open] { animation: tg-panel-enter .2s ease-out; }
  @keyframes tg-panel-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
}
