/* ============================================================
   Afternoon Tea Club — page-scoped styles
   Prefix: at-  (avoid collisions with css/style.css)

   Two variants:
     .at-page               → shared base (blog page: beige/pink)
     .at-page.at-login-page → login screen (dark navy, numpad style)
   ============================================================ */

/* ============================================================
   Base / shared
   ============================================================ */

.at-page {
  --at-pink:      #d9b3b8;
  --at-pink-deep: #b98a92;
  --at-beige:     #f5efe6;
  --at-beige-soft:#faf6f0;
  --at-gold:      #c8a951;
  --at-gold-soft: #f0d080;
  --at-ink:       #5a4a44;
  --at-ink-soft:  #8a766f;

  min-height: 100vh;
  background: linear-gradient(160deg, var(--at-beige-soft) 0%, var(--at-beige) 55%, #f3e6e3 100%);
  color: var(--at-ink);
  font-family: 'Noto Sans JP', sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

.at-page a {
  color: var(--at-pink-deep);
  text-decoration: none;
}

/* ============================================================
   Blog page — shared header (afternoon-tea.html)
   ============================================================ */

.at-header {
  text-align: center;
  padding: 72px 24px 40px;
}

.at-eyebrow {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.35em;
  color: var(--at-gold);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.at-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.6rem, 4.5vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--at-ink);
}

.at-title-rule {
  width: 64px;
  height: 1px;
  margin: 22px auto 0;
  background: linear-gradient(90deg, transparent, var(--at-gold), transparent);
}

.at-subtitle {
  margin-top: 16px;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--at-ink-soft);
}

.at-back {
  display: inline-block;
  margin-top: 10px;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.at-back:hover { color: var(--at-gold); }

/* ---------- photo grid ---------- */

.at-grid-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 28px 110px;
}

.at-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.at-card {
  border: none;
  padding: 0;
  background: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: inherit;
}

.at-photo {
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 14px;
  background: linear-gradient(150deg, #f7ece9 0%, var(--at-beige-soft) 60%, #f2e8dc 100%);
  border: 1px solid rgba(201, 171, 110, 0.30);
  box-shadow: 0 8px 24px rgba(90, 74, 68, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.at-card:hover .at-photo,
.at-card:focus-visible .at-photo {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(90, 74, 68, 0.13);
}

.at-photo-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--at-gold-soft);
  color: var(--at-gold);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.55);
}

.at-photo-label {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--at-ink-soft);
}

/* ---------- modal ---------- */

.at-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(90, 74, 68, 0.45);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.at-modal.at-modal-open {
  opacity: 1;
  visibility: visible;
}

.at-modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--at-beige-soft);
  border: 1px solid rgba(201, 171, 110, 0.4);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(60, 45, 40, 0.25);
  padding: 38px 34px 34px;
  position: relative;
}

.at-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(217, 179, 184, 0.25);
  color: var(--at-ink-soft);
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.at-modal-close:hover { background: rgba(217, 179, 184, 0.5); }

.at-modal-shop {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--at-ink);
  margin-bottom: 6px;
  padding-right: 30px;
}

.at-modal-meta {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--at-ink-soft);
  line-height: 1.9;
  margin-bottom: 20px;
}

.at-modal-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.at-modal-photos .at-photo { border-radius: 10px; gap: 6px; }
.at-modal-photos .at-photo-icon { width: 24px; height: 24px; font-size: 0.7rem; }
.at-modal-photos .at-photo-label { font-size: 0.45rem; letter-spacing: 0.2em; }

.at-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.at-tag {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--at-pink-deep);
  background: rgba(217, 179, 184, 0.18);
  border: 1px solid rgba(217, 179, 184, 0.45);
  border-radius: 999px;
  padding: 4px 12px;
}

/* ---------- blog page footer ---------- */

.at-footer {
  text-align: center;
  padding: 0 24px 56px;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  color: rgba(138, 118, 111, 0.55);
  text-transform: uppercase;
}

/* ---------- responsive (blog) ---------- */

@media (max-width: 640px) {
  .at-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .at-grid-wrap { padding-left: 20px; padding-right: 20px; }
  .at-header { padding-top: 56px; }
}

@media (max-width: 380px) {
  .at-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Login page — dark navy numpad style  (.at-login-page)
   Scoped entirely under body.at-login-page — no blog bleed
   ============================================================ */

.at-login-page {
  background: #060d1c;
  color: #ffffff;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Prevent double-tap zoom on the login screen only (scoped).
   touch-action is not inherited, so it is applied to every
   element in the page rather than via user-scalable=no. */
.at-login-page,
.at-login-page * {
  touch-action: manipulation;
}

/* CSS star field */
.at-stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle, rgba(240, 208, 128, 0.85) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.6)  1px, transparent 1px),
    radial-gradient(circle, rgba(200, 169, 81,  0.55) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.35) 1px, transparent 1px);
  background-size:
    113px 113px,
    67px  67px,
    157px 157px,
    89px  89px;
  background-position:
    17px 11px,
    53px 37px,
    79px 63px,
    31px 81px;
  opacity: 0.5;
}

/* ---- full-screen wrapper ---- */
.at-lp-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 24px 32px;
  gap: 0;
  /* clamp vertical gaps via margin on children */
}

/* ---- Mickey logo ---- */
.at-lp-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
}

.at-lp-icon {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  /* soft pearl glow around the whole icon
     (also creates a stacking context so ::before stays behind it) */
  filter: drop-shadow(0 0 12px rgba(208, 216, 232, 0.45));
}

/* silver radial glow behind the bear */
.at-lp-icon::before {
  content: '';
  position: absolute;
  inset: -52px;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(216, 224, 240, 0.30) 0%,
    rgba(200, 212, 232, 0.14) 42%,
    transparent 72%);
  pointer-events: none;
}

.at-lp-icon-face {
  position: absolute;
  inset: 12px 0 0;
  width: 72px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d0d8e8 0%, #e8ecf5 100%);
  box-shadow:
    0 0 18px rgba(208, 216, 232, 0.45),
    inset 0 -4px 8px rgba(40, 60, 100, 0.18);
}

.at-lp-icon-ear {
  position: absolute;
  top: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #d0d8e8 0%, #e8ecf5 100%);
  box-shadow: 0 0 10px rgba(208, 216, 232, 0.35);
}

.at-lp-icon-ear--l { left: -4px; }
.at-lp-icon-ear--r { right: -4px; }

.at-lp-icon-star {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 12px;
  font-size: 1.1rem;
  color: rgba(200, 180, 255, 0.9);
  text-shadow: 0 0 6px rgba(200, 180, 255, 0.7);
}

.at-lp-brand {
  font-family: 'Cinzel', serif;
  /* clamp keeps "Afternoon Tea Circle" on one line on narrow phones */
  font-size: clamp(0.78rem, 4.2vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 2.5px;
  color: #c0cce0;
  white-space: nowrap;
}

/* ---- prompt ---- */
.at-lp-prompt {
  font-family: 'Noto Sans JP', sans-serif;
  font-size: 0.88rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: rgba(190, 205, 225, 0.75);
  margin-bottom: 28px;
  text-align: center;
  width: 100%;
}

/* ---- dot indicators ---- */
.at-lp-dots {
  display: flex;
  gap: 18px;
  margin-bottom: 12px;
  width: 100%;
  justify-content: center;
}

.at-dot {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(180, 200, 230, 0.35);
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.at-dot--filled {
  background: rgba(190, 205, 225, 0.85);
  border-color: rgba(190, 205, 225, 0.85);
  box-shadow: 0 0 12px rgba(180, 200, 230, 0.55);
}

/* ---- lock message ---- */
.at-lp-lock-msg {
  min-height: 1.4em;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: rgba(255, 160, 100, 0.9);
  text-align: center;
  margin-bottom: 20px;
}

/* ---- numpad ---- */
.at-numpad {
  display: grid;
  /* full width of the .at-lp-wrap frame (not the whole screen) */
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
  gap: 14px;
  width: 100%;
  margin-bottom: 32px;
}

.at-nkey {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  /* thin, faint double ring */
  border: 1px solid rgba(160, 185, 220, 0.2);
  outline: 1px solid rgba(160, 185, 220, 0.08);
  outline-offset: 5px;
  background: rgba(8, 18, 40, 0.55);
  color: rgba(200, 215, 240, 0.7);
  font-family: 'Cinzel', serif;
  font-style: italic;
  font-size: 28px;
  font-weight: 400;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, box-shadow 0.15s, transform 0.1s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  backdrop-filter: blur(4px);
}

.at-nkey:hover:not(:disabled) {
  background: rgba(190, 205, 225, 0.08);
  box-shadow: 0 0 16px rgba(180, 200, 230, 0.2);
}

/* pressed: glow softly and lift up */
.at-nkey:active:not(:disabled) {
  transform: translateY(-3px) scale(1.04);
  background: rgba(190, 205, 225, 0.14);
  border-color: rgba(200, 215, 240, 0.45);
  box-shadow:
    0 0 22px rgba(190, 205, 225, 0.4),
    0 6px 16px rgba(0, 0, 0, 0.35);
}

/* keyboard focus ring (the decorative outline above replaces the
   browser default, so restore a visible one for focus-visible) */
.at-nkey:focus-visible {
  outline: 2px solid rgba(200, 215, 240, 0.7);
  outline-offset: 5px;
}

.at-nkey:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.at-nkey--empty {
  pointer-events: none;
  background: transparent;
  border-color: transparent;
  outline: none;
  cursor: default;
}

.at-nkey--del {
  font-family: 'Noto Sans JP', sans-serif;
  font-style: normal;
  font-size: 1.3rem;
  color: rgba(190, 205, 225, 0.6);
  border-color: rgba(160, 185, 220, 0.16);
}

/* ---- back link ---- */
.at-lp-back {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: rgba(200, 169, 81, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.at-lp-back:hover {
  color: rgba(240, 208, 128, 0.9);
}

/* ---- responsive (login) ---- */
@media (max-width: 380px) {
  .at-lp-dots { gap: 14px; }
  .at-numpad { gap: 12px; }
  .at-nkey {
    width: 68px;
    height: 68px;
    font-size: 22px;
  }
  .at-lp-wrap { padding: 32px 16px 24px; }
}

@media (min-width: 640px) {
  /* center the numpad like a phone screen on wide displays */
  .at-lp-wrap {
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
  }
}
