/* Account panel — shared by both sections, so it carries its own colours
   rather than inheriting from either stylesheet. Deliberately light in both:
   it is an overlay, and a single predictable look beats matching two themes. */

.oc-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(28, 25, 21, 0.5);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  font-family: "Noto Serif Thai", "Sarabun", "Noto Serif", Georgia, serif;
  color: var(--ink);
}

.oc-panel {
  width: min(460px, 100%);
  margin: auto;
  background: var(--paper-2);
  border-radius: 2px;
  border-top: 3px solid var(--silk);
  box-shadow: 0 24px 70px rgba(28, 25, 21, 0.35);
  overflow: hidden;
}

.oc-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(28, 25, 21, 0.14);
}
.oc-head img { width: 48px; height: 48px; border-radius: 2px; display: block; flex: none }
.oc-head .oc-fallback {
  width: 48px; height: 48px; border-radius: 2px; flex: none;
  background: var(--silk); color: var(--paper-2);
  display: grid; place-items: center; font-size: 20px; font-weight: 700;
}
.oc-head h2 { margin: 0; font-size: 19px; font-weight: 700; letter-spacing: -0.01em }
.oc-head p { margin: 2px 0 0; font-size: 14px; color: var(--ink-3) }
.oc-head .oc-x {
  margin-left: auto; align-self: flex-start;
  border: 0; background: none; cursor: pointer;
  font-size: 22px; line-height: 1; color: var(--ink-3); padding: 0 2px;
}
.oc-head .oc-x:hover { color: var(--silk) }

.oc-section { padding: 18px 24px }
.oc-section + .oc-section { border-top: 1px solid rgba(28, 25, 21, 0.14) }
.oc-section h3 {
  margin: 0 0 12px; font-size: 12px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--silk);
}

.oc-row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; font-size: 15px }
.oc-row dt { margin: 0; color: var(--ink-3) }
.oc-row dd { margin: 0; font-weight: 600; text-align: right; word-break: break-word }

.oc-note { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--ink-3) }

.oc-foot { padding: 18px 24px 22px; border-top: 1px solid rgba(28, 25, 21, 0.14) }
.oc-foot button {
  width: 100%; min-height: 48px; border-radius: 2px; cursor: pointer;
  border: 1px solid var(--line-strong); background: transparent; color: var(--ink);
  font: inherit; font-size: 15px; font-weight: 600;
}
.oc-foot button:hover { border-color: var(--silk); color: var(--silk) }
.oc-foot .oc-signout { border-color: transparent; background: var(--ink); color: var(--paper-2) }
.oc-foot .oc-signout:hover { background: var(--silk); color: var(--paper-2) }

.oc-loading { padding: 10px 0; font-size: 14px; color: var(--ink-3) }

/* The way out of the panel and into the data it is describing. */
.oc-link {
  display: inline-block;
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--silk);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.oc-link:hover { color: var(--ink) }

/* ---------- the sign-in sheet ---------- */
/* Our frame, Google's button. Every "Sign in" on the site opens this instead
   of sending the browser away, so the token is issued to this origin and the
   prompt names the site rather than the database behind it. */
.oc-signin {
  padding: 26px 26px 22px;
  text-align: center;
}
.oc-signin h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
}
.oc-signin p {
  margin: 10px 0 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
}
/* Google sizes its own button; this only centres whatever it draws. */
.oc-gbutton {
  display: flex;
  justify-content: center;
  min-height: 44px;
}
.oc-plain {
  margin-top: 18px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-3);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.oc-plain:hover { color: var(--silk) }

/* ---------- the gate ----------
   Shown in the page's own flow, not over it: the flashcards and the forum
   have nothing to show a signed-out visitor, so there is nothing for a
   modal to sit on top of. On the lesson map, where there is something to
   look at, this panel is not used — the map stays readable and the stops
   ask on the way in. */
.oc-gate {
  max-width: 440px;
  margin: 48px auto;
  padding: 30px 28px 26px;
  text-align: center;
  background: var(--paper-2, #faf7ef);
  border: 1px solid rgba(28, 25, 21, 0.14);
  border-top: 3px solid var(--silk, #be1559);
  border-radius: var(--radius, 3px);
  box-shadow: 0 18px 40px -32px rgba(28, 25, 21, 0.5);
}
.oc-gate h2 {
  margin: 0;
  font-family: var(--display, Georgia, serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.oc-gate p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink-2);
}
.oc-gate-go {
  margin: 20px 0 0;
  padding: 10px 20px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--paper-2);
  background: var(--ink);
  border: 1px solid transparent;
  border-radius: var(--radius, 3px);
  cursor: pointer;
}
.oc-gate-go:hover { background: var(--silk, #be1559); }
/* Smaller than the body of the panel, and smaller than it was: it is the
   footnote, not the argument. */
.oc-gate-dim { font-size: 11.5px; line-height: 1.55; color: var(--ink-3); }
.oc-gate-dim a { color: inherit; text-underline-offset: 3px; }
