.public-activation-status {
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  color: #171717;
  font-family: inherit;
  letter-spacing: -0.005em;
}
.public-activation-rail {
  box-sizing: border-box;
  width: 100%;
  max-width: 390px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: auto;
  display: flex;
  flex-direction: column;
  padding: 24px 20px;
  padding: 24px 20px max(24px, env(safe-area-inset-bottom));
}
.public-activation-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 16px;
  flex: 1;
  justify-content: center;
  padding: 40px 0;
  width: 100%;
  max-width: 350px;
  margin: 0 auto;
}
.public-activation-status[data-public-activation-state='processing']
  .public-activation-content,
.public-activation-status[data-public-activation-state='retry']
  .public-activation-content {
  flex: 1;
  justify-content: center;
  gap: 24px;
  padding: 0;
}
.public-activation-content h1 {
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 0;
  margin: 24px 0 0;
  white-space: pre-line;
  word-break: keep-all;
}
.public-activation-status[data-public-activation-state='processing']
  .public-activation-content
  h1,
.public-activation-status[data-public-activation-state='retry']
  .public-activation-content
  h1 {
  margin-top: 0;
}
.public-activation-content p {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: #525252;
  margin: 0;
  white-space: pre-line;
  word-break: normal;
}
.public-activation-visual {
  width: 176px;
  height: 176px;
  flex: none;
  background-image: url('/skill-activation/status-characters.png');
  background-repeat: no-repeat;
  background-size: 214px 996px;
}
.public-activation-visual-warning {
  background-position: -22px -16px;
}
.public-activation-visual-temporary {
  background-position: -22px -213px;
}
.public-activation-visual-critical {
  background-position: -22px -410px;
}
.public-activation-visual-info {
  background-position: -22px -607px;
}
.public-activation-visual-success {
  background-position: -16px -804px;
}
.public-activation-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.public-activation-footer a,
.public-activation-button.public-activation-button {
  box-sizing: border-box;
  width: 100%;
  height: 56px;
  min-height: 56px;
  padding: 16px 24px;
  border-radius: 12px;
  border: 0;
  background: #0a0a0a;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 600;
  line-height: 24px;
  letter-spacing: -0.005em;
  text-decoration: none;
  opacity: 1;
  gap: 8px;
}
.public-activation-footer a:active,
.public-activation-button.public-activation-button:active {
  background: #262626;
}
.public-activation-button.public-activation-button:disabled {
  background: #454545;
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}
.public-activation-status[data-public-activation-state='limited']
  .public-activation-button.public-activation-button:disabled:not(
    [aria-busy='true']
  ) {
  background: #f5f5f5;
  color: #a6a6a6;
}
.public-activation-footer a:focus-visible,
.public-activation-button.public-activation-button:focus-visible {
  outline: 2px solid hsl(var(--ring, 0 0% 32%));
  outline-offset: 2px;
}
.public-activation-support {
  background: #fafafa;
  padding: 16px;
  border-radius: 12px;
  text-align: left;
  font-size: 16px;
  line-height: 28px;
  color: #525252;
}
.public-activation-support h2 {
  font-size: inherit;
  font-weight: 700;
  line-height: 24px;
  letter-spacing: 0;
  margin: 0;
  color: #171717;
}
.public-activation-support p {
  margin: 0;
}
.public-activation-support .public-activation-code {
  font: inherit;
  line-height: 24px;
  color: inherit;
  overflow-wrap: anywhere;
}
.public-activation-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.22);
  z-index: 1000;
}
.public-activation-dialog {
  box-sizing: border-box;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% - 40px);
  max-width: 342px;
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: #fff;
  color: #171717;
  padding: 24px 16px;
  border-radius: 24px;
  text-align: center;
  letter-spacing: -0.005em;
  z-index: 1001;
}
.public-activation-dialog h2 {
  font-size: 22px;
  font-weight: 700;
  line-height: 28px;
  letter-spacing: 0;
  margin: 0 0 8px;
}
.public-activation-dialog p {
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: #525252;
  margin: 0 0 24px;
  white-space: pre-line;
}
.public-activation-spinner {
  flex: none;
  animation: public-activation-spin 804ms linear infinite;
  transform: rotate(90deg);
}
.public-activation-content > .public-activation-spinner {
  color: #171717;
}
@keyframes public-activation-spin {
  0%,
  .1244% {
    transform: rotate(90deg);
  }
  25%,
  25.1244% {
    transform: rotate(180deg);
  }
  50%,
  50.1244% {
    transform: rotate(270deg);
  }
  75%,
  75.1244% {
    transform: rotate(360deg);
  }
  100% {
    transform: rotate(450deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .public-activation-spinner {
    animation: none;
  }
}

/*
 * Kakao Sync completion screen only — the page marks <main> with
 * data-public-activation-flow (plan 2026-11-18-kakao-completion-screen-transition).
 * Screens without the attribute (QR landing, plain QR, consent) keep the
 * rules above. Existing Processing and Retry keep their layout.
 */

/* The connecting variant uses the result screens' skeleton: the same gap and
   padding, the title's top margin, and a footer that keeps the button's
   56 px. Its indicator is a progress ring in the 176 px character circle.

   Below 560 px of height the screen's top padding, the content padding, the
   title's top margin and the ring and character boxes shrink together, so
   the indicator, title and body stay in the first view (ring 88 px at
   300 px of height). From 560 px up every value is the one above it.
   Each shrinking value is declared three times — the px value, a clamp()
   over vh, a clamp() over dvh — and a browser keeps the last one it reads:
   one without dvh keeps vh, one without clamp() keeps px. No custom
   properties: a variable cannot drop a unit or function the browser lacks. */
.public-activation-status[data-public-activation-flow][data-public-activation-variant='connecting']
  .public-activation-rail,
.public-activation-status[data-public-activation-flow]:not(
    [data-public-activation-state='processing']
  ):not([data-public-activation-state='retry'])
  .public-activation-rail {
  padding-top: 24px;
  padding-top: clamp(12px, calc(4.62vh - 1.85px), 24px);
  padding-top: clamp(12px, calc(4.62dvh - 1.85px), 24px);
}
.public-activation-status[data-public-activation-flow][data-public-activation-variant='connecting']
  .public-activation-content,
.public-activation-status[data-public-activation-flow]:not(
    [data-public-activation-state='processing']
  ):not([data-public-activation-state='retry'])
  .public-activation-content {
  gap: 16px;
  padding: 40px 0;
  padding: clamp(8px, calc(12.31vh - 28.9px), 40px) 0;
  padding: clamp(8px, calc(12.31dvh - 28.9px), 40px) 0;
}
.public-activation-status[data-public-activation-flow][data-public-activation-variant='connecting']
  .public-activation-content
  h1,
.public-activation-status[data-public-activation-flow]:not(
    [data-public-activation-state='processing']
  ):not([data-public-activation-state='retry'])
  .public-activation-content
  h1 {
  margin-top: 24px;
  margin-top: clamp(0px, calc(9.23vh - 27.7px), 24px);
  margin-top: clamp(0px, calc(9.23dvh - 27.7px), 24px);
}
.public-activation-status[data-public-activation-flow] .public-activation-ring,
.public-activation-status[data-public-activation-flow]
  .public-activation-visual {
  width: 176px;
  height: 176px;
  width: clamp(88px, calc(33.85vh - 13.5px), 176px);
  height: clamp(88px, calc(33.85vh - 13.5px), 176px);
  width: clamp(88px, calc(33.85dvh - 13.5px), 176px);
  height: clamp(88px, calc(33.85dvh - 13.5px), 176px);
}
/* The character sprite in shares of the box, so it shrinks with it. At
   176 px these draw the same picture as the px rules above. */
.public-activation-status[data-public-activation-flow]
  .public-activation-visual {
  background-size: 121.5909% 565.9091%;
}
.public-activation-status[data-public-activation-flow]
  .public-activation-visual-warning {
  background-position: 57.8947% 1.9512%;
}
.public-activation-status[data-public-activation-flow]
  .public-activation-visual-temporary {
  background-position: 57.8947% 25.9756%;
}
.public-activation-status[data-public-activation-flow]
  .public-activation-visual-critical {
  background-position: 57.8947% 50%;
}
.public-activation-status[data-public-activation-flow]
  .public-activation-visual-info {
  background-position: 57.8947% 74.0244%;
}
.public-activation-status[data-public-activation-flow]
  .public-activation-visual-success {
  background-position: 42.1053% 98.0488%;
}
.public-activation-status[data-public-activation-flow][data-public-activation-variant='connecting']
  .public-activation-footer {
  min-height: 56px;
}

/* The progress ring. The SVG also carries its size and stroke as attributes,
   so it draws the same line ring if this stylesheet is an older one. */
.public-activation-ring {
  flex: none;
  display: block;
  overflow: visible;
  color: #171717;
}
.public-activation-ring-track {
  fill: none;
  stroke: #ededed;
  stroke-width: 6;
}
.public-activation-ring-arc {
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
}
/* A turning ring turns as a whole SVG element, as the spinner does. */
.public-activation-ring[data-indeterminate] {
  animation: public-activation-ring-turn 1200ms linear infinite;
}
@keyframes public-activation-ring-turn {
  to {
    transform: rotate(360deg);
  }
}
/* The filling ring's pulse at the end of its line: it keeps showing the page
   is alive after the fill curve flattens. */
.public-activation-ring-halo {
  fill: currentColor;
  opacity: 0;
  animation: public-activation-ring-pulse 1200ms ease-in-out infinite;
}
@keyframes public-activation-ring-pulse {
  0%,
  100% {
    opacity: 0;
  }
  50% {
    opacity: 0.22;
  }
}
@media (prefers-reduced-motion: reduce) {
  .public-activation-ring[data-indeterminate] {
    animation: none;
  }
  .public-activation-ring-halo {
    animation: none;
  }
}
/* Under reduced motion the ring stands at a quarter from the first paint.
   The server HTML draws the arc at its start (it cannot know the setting);
   until the script draws the arc (data-drawn), this sets the quarter:
   the circumference 527.788 × (1 − 0.25). The script-free ring's turning
   arc is a quarter too. */
@media (prefers-reduced-motion: reduce) {
  .public-activation-status[data-public-activation-flow]
    .public-activation-ring:not([data-drawn])
    .public-activation-ring-arc {
    stroke-dashoffset: 395.841px;
  }
}

/* The connecting → result transition (plan
   2026-11-18-kakao-completion-screen-transition §3.3), read from the phase
   on <main>: the connecting content fades out, then the result's character
   grows from 0.94 and its title, body and footer rise 6 px. The entering
   rule leaves the spinner out — an animation on it would replace its turn
   (the existing Processing and Retry). The reduced-motion rules use the
   same selectors as the rules they turn off, so they win; the page itself
   swaps at once under reduced motion and these rules are a safety net. */
.public-activation-status[data-public-activation-flow][data-public-activation-transition='leaving']
  .public-activation-content,
.public-activation-status[data-public-activation-flow][data-public-activation-transition='leaving']
  .public-activation-footer {
  opacity: 0;
  transition: opacity 120ms linear;
}
.public-activation-status[data-public-activation-flow][data-public-activation-transition='entering']
  .public-activation-content
  > *:not(.public-activation-spinner),
.public-activation-status[data-public-activation-flow][data-public-activation-transition='entering']
  .public-activation-footer
  > * {
  animation: public-activation-enter 240ms cubic-bezier(0.2, 0, 0, 1) both;
}
.public-activation-status[data-public-activation-flow][data-public-activation-transition='entering']
  .public-activation-content
  > .public-activation-visual {
  animation-name: public-activation-enter-visual;
}
@keyframes public-activation-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes public-activation-enter-visual {
  from {
    opacity: 0;
    transform: scale(0.94);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .public-activation-status[data-public-activation-flow][data-public-activation-transition='leaving']
    .public-activation-content,
  .public-activation-status[data-public-activation-flow][data-public-activation-transition='leaving']
    .public-activation-footer {
    transition: none;
  }
  .public-activation-status[data-public-activation-flow][data-public-activation-transition='entering']
    .public-activation-content
    > *:not(.public-activation-spinner),
  .public-activation-status[data-public-activation-flow][data-public-activation-transition='entering']
    .public-activation-footer
    > * {
    animation: none;
  }
}

/* The remaining dwell time inside the action that the scheduled launch
   opens (plan 2026-11-18-kakao-completion-screen-transition §3.4): a light
   fill grows from the side the text starts on, at a steady speed, over the
   dwell time. The attribute is on the action only while the launch is
   scheduled, so after the attempt or a press the action has its own colour.
   The fill is a drawing of the schedule, not its clock — the launch is a
   timer. Reduced motion draws no fill. */
.public-activation-status[data-public-activation-flow]
  .public-activation-footer
  a[data-auto-advance] {
  position: relative;
  overflow: hidden;
}
.public-activation-status[data-public-activation-flow]
  .public-activation-footer
  a[data-auto-advance]
  > span {
  position: relative;
}
.public-activation-status[data-public-activation-flow]
  .public-activation-footer
  a[data-auto-advance]::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.22);
  transform: scaleX(0);
  transform-origin: left center;
  animation: public-activation-auto-advance var(--auto-advance-ms) linear;
  /* An action that appears partway through the schedule starts there. */
  animation-delay: var(--auto-advance-delay, 0ms);
}
.public-activation-status[data-public-activation-flow][dir='rtl']
  .public-activation-footer
  a[data-auto-advance]::before {
  transform-origin: right center;
}
@keyframes public-activation-auto-advance {
  to {
    transform: scaleX(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .public-activation-status[data-public-activation-flow]
    .public-activation-footer
    a[data-auto-advance]::before {
    animation: none;
  }
}
