/* ==========================================================================
   Apple design layer — 10-chrome
   Global chrome: header, accessibility banner, floating quick bar, footer, site lock screen, shared modals
   ========================================================================== */

/* ==========================================================================
   0. Chrome tokens + shared bits
   ========================================================================== */
:root {
  --ap-chrome-row: 52px;        /* global nav row */
  --ap-chapter-row: 44px;       /* chapter nav row (≤1068px) */
  --ap-eye: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12S6 5.5 12 5.5 21.5 12 21.5 12 18 18.5 12 18.5 2.5 12 2.5 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  --ap-eye-off: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 3.5 20.5 20.5'/%3E%3Cpath d='M10.3 5.7c.6-.1 1.1-.2 1.7-.2 6 0 9.5 6.5 9.5 6.5a16 16 0 0 1-2.6 3.4M6.7 6.8C4.1 8.5 2.5 12 2.5 12S6 18.5 12 18.5c1.6 0 3-.4 4.2-1.1'/%3E%3Cpath d='M9.9 9.9a3 3 0 0 0 4.2 4.2'/%3E%3C/svg%3E");
}

/* Inline SVG line icons used inside the chrome (SF Symbols-like) */
:root .header-glass .ap-ico,
:root .floating-quick-bar .fab-icon,
:root .auth-shield-icon svg,
:root .admin-action-tile .tile-icon svg,
:root .ap-success-mark svg {
  display: block;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* The legacy stylesheet never defines .hidden — JS toggles it on these elements */
:root #site-lock-screen .hidden,
:root #admin-auth-modal .hidden,
:root #admin-dashboard-modal .hidden {
  display: none !important;
}

/* ==========================================================================
   1. Global nav (apple.com globalnav)
   ========================================================================== */
:root .header-glass {
  position: sticky;
  top: 0;
  z-index: 100;
  margin: 0;
  padding: 0;
  background: var(--ap-nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--ap-hairline-soft);
  box-shadow: none;
}

:root .header-content {
  max-width: calc(var(--ap-content) + var(--ap-gutter) * 2);
  height: var(--ap-chrome-row);
  margin: 0 auto;
  padding: 0 var(--ap-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Wordmark */
:root .logo-group {
  flex: none;
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  color: var(--ap-text);
  text-decoration: none;
}

:root .logo-text h1 {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.022em;
  color: var(--ap-text);
  white-space: nowrap;
}

:root .logo-text h1 span {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: currentColor;
}

:root .logo-text h1 .logo-org {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ap-text-2);
}

/* Links */
:root .nav-links {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 100%;
}

:root .nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 clamp(7px, 0.75vw, 11px);
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 12px;
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ap-nav-text);
  text-decoration: none;
  white-space: nowrap;
  transform: none;
  transition: color var(--ap-dur) var(--ap-ease);
}

:root .nav-link:hover {
  color: var(--ap-text);
  background: none;
  transform: none;
}

:root .nav-link.highlight-nav,
:root .nav-link.highlight-nav:hover {
  color: var(--ap-link);
  background: none;
  border: 0;
  font-weight: 400;
}

:root .nav-link.highlight-nav:hover { text-decoration: underline; }

/* Right cluster */
:root .header-actions {
  flex: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

:root .header-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 12px;
  margin: 0;
  border: 0;
  border-radius: var(--ap-radius-pill);
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.01em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: none;
  transform: none;
  cursor: pointer;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .header-cta-btn:hover { transform: none; }

/* legacy uses !important on these two */
:root .btn-kakao-accent {
  background: var(--ap-kakao) !important;
  color: var(--ap-kakao-text) !important;
  border-color: transparent !important;
  box-shadow: none;
}
:root .btn-kakao-accent:hover {
  background: #f5dc00 !important;
  box-shadow: none;
}
:root .btn-sign-accent {
  background: var(--ap-blue) !important;
  color: #fff !important;
  border: 0 !important;
  box-shadow: none;
  margin-right: 6px;
}
:root .btn-sign-accent:hover {
  background: var(--ap-blue-hover) !important;
  box-shadow: none;
}

/* Utility icons: inline on desktop (the popover wrapper dissolves) */
:root .header-utility-group {
  display: contents;
}

:root .utility-icon-btn,
:root .btn-screen-lock-quick,
:root .btn-admin-auth,
:root .btn-admin-auth.locked,
:root .btn-admin-auth.unlocked {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ap-nav-text);
  font-size: 0;
  font-weight: 400;
  box-shadow: none;
  transform: none;
  cursor: pointer;
  transition: background-color var(--ap-dur) var(--ap-ease), color var(--ap-dur) var(--ap-ease);
}

:root .utility-icon-btn:hover,
:root .btn-screen-lock-quick:hover,
:root .btn-admin-auth.locked:hover,
:root .btn-admin-auth.unlocked:hover {
  background: var(--ap-fill-2);
  color: var(--ap-text);
  border: 0;
  box-shadow: none;
  transform: none;
}

:root .header-glass .ap-ico {
  width: 18px;
  height: 18px;
}

/* JS writes emoji into these spans; the SVG siblings carry the visual */
:root .theme-icon,
:root .admin-auth-icon {
  display: none;
}

:root .ico-sun { display: none; }
[data-theme="dark"] .header-glass .ico-moon { display: none; }
[data-theme="dark"] .header-glass .ico-sun { display: block; }

:root .btn-admin-auth .ico-admin-unlocked { display: none; }
:root .btn-admin-auth.unlocked .ico-admin-locked { display: none; }
:root .btn-admin-auth.unlocked .ico-admin-unlocked { display: block; }

/* Overflow ("more") trigger — only on phones */
:root .header-more-btn { display: none; }

/* ==========================================================================
   2. Accessibility ribbon (apple.com "ribbon")
   ========================================================================== */
:root .accessibility-top-banner {
  margin: 0;
  padding: 13px var(--ap-gutter) 14px;
  background: var(--ap-tile);
  border: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  font-size: 14px;
}

:root .top-banner-inner {
  display: block;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

:root .top-banner-text-wrap {
  display: block;
  margin: 0;
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.016em;
  color: var(--ap-text-2);
  word-break: keep-all;
  text-wrap: balance;
}

:root .banner-pill-badge {
  display: inline;
  margin: 0 6px 0 0;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font-size: inherit;
  font-weight: 600;
  letter-spacing: inherit;
  color: var(--ap-text);
  white-space: nowrap;
}

:root .banner-text {
  font-size: inherit;
  line-height: inherit;
  letter-spacing: inherit;
  color: inherit;
}

:root .banner-text strong {
  color: inherit;
  font-weight: 400;
}

:root .btn-banner-link,
:root .btn-banner-link:hover {
  display: inline;
  margin: 0 0 0 6px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  transform: none;
  font: inherit;
  font-weight: 400;
  color: var(--ap-link);
  white-space: nowrap;
  cursor: pointer;
}

:root .btn-banner-link:hover { text-decoration: underline; }

:root .btn-banner-link::after {
  content: '\203A';
  display: inline-block;
  margin-left: 0.28em;
  font-size: 1.15em;
  line-height: 1;
}

/* ==========================================================================
   3. Floating quick bar (frosted circular buttons)
   ========================================================================== */
:root .floating-quick-bar {
  position: fixed;
  right: 24px;
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

:root .quick-fab {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ap-nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  color: var(--ap-accent);
  box-shadow: var(--ap-shadow-float), inset 0 0 0 0.5px var(--ap-hairline-soft);
  font-size: 0;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transform: none;
  transition: transform var(--ap-dur) var(--ap-ease), background-color var(--ap-dur) var(--ap-ease);
}

:root .quick-fab:hover {
  transform: scale(1.06);
  box-shadow: var(--ap-shadow-float), inset 0 0 0 0.5px var(--ap-hairline-soft);
}

:root .quick-fab:active { transform: scale(0.96); }

:root .floating-quick-bar .fab-icon {
  width: 21px;
  height: 21px;
}

:root .fab-kakao {
  background: var(--ap-kakao);
  color: var(--ap-kakao-text);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  box-shadow: var(--ap-shadow-float);
}
:root .fab-kakao:hover { box-shadow: var(--ap-shadow-float); }
:root .fab-kakao .fab-icon .ico-fill { fill: currentColor; stroke: none; }

:root .fab-sign,
:root .fab-audit { color: var(--ap-accent); }

:root .fab-top {
  color: var(--ap-text-2);
  border: 0;
  padding: 0;
}

/* Label = hover tooltip, still the accessible name */
:root .fab-label {
  position: absolute;
  top: 50%;
  right: calc(100% + 10px);
  padding: 7px 12px;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: var(--ap-shadow-float), inset 0 0 0 0.5px var(--ap-hairline-soft);
  color: var(--ap-text);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(6px, -50%);
  transition: opacity 0.2s var(--ap-ease), transform 0.2s var(--ap-ease);
}

:root .quick-fab:hover .fab-label,
:root .quick-fab:focus-visible .fab-label {
  opacity: 1;
  transform: translate(0, -50%);
}

/* ==========================================================================
   4. Footer (apple.com globalfooter)
   ========================================================================== */
:root .global-footer {
  margin: 0;
  padding: 0 0 calc(28px + env(safe-area-inset-bottom, 0px));
  background: var(--ap-page);
  border: 0;
  font-size: 12px;
  line-height: 1.34;
  letter-spacing: -0.01em;
  color: var(--ap-text-2);
}

:root .footer-content {
  max-width: calc(var(--ap-content) + var(--ap-gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--ap-gutter);
}

:root .footer-brand {
  max-width: none;
  margin: 0;
  padding: 28px 0 20px;
  border-top: 1px solid var(--ap-hairline);
}

:root .footer-logo {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--ap-text);
}

:root .footer-logo strong { font-weight: inherit; }

:root .footer-desc {
  max-width: var(--ap-text-col);
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ap-text-2);
  word-break: keep-all;
}

:root .footer-desc strong {
  font-weight: 400;
  color: inherit;
}

:root .footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px 40px;
  padding: 20px 0 28px;
  border-top: 1px solid var(--ap-hairline);
  border-bottom: 0;
}

:root .footer-col h4 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.01em;
  color: var(--ap-text);
}

:root .footer-col ul {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

:root .footer-col li {
  margin: 0 0 0.8em;
  font-size: 12px;
  line-height: 1.34;
  color: var(--ap-text-2);
  word-break: keep-all;
}

:root .footer-col li strong {
  display: inline-block;
  min-width: 5.6em;
  margin-right: 4px;
  font-weight: 400;
  color: var(--ap-text);
}

:root .footer-col a {
  color: var(--ap-link);
  font-weight: 400;
  text-decoration: none;
}

:root .footer-col a:hover { text-decoration: underline; }

:root .footer-ethics {
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ap-text-2);
  word-break: keep-all;
}

:root .footer-bottom {
  padding: 16px 0 0;
  border-top: 1px solid var(--ap-hairline);
  text-align: left;
}

:root .footer-copy {
  font-size: 12px;
  line-height: 1.5;
  color: var(--ap-text-3);
  word-break: keep-all;
}

/* ==========================================================================
   5. Site lock screen (Apple Account sign-in)
   ========================================================================== */
:root .site-lock-overlay {
  z-index: 999999;
  display: flex;
  align-items: safe center;
  justify-content: center;
  padding: 48px 24px calc(40px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  background: var(--ap-page);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  transition: opacity 0.45s var(--ap-ease), visibility 0.45s var(--ap-ease);
}

:root .site-lock-overlay.unlocked { transform: none; }

:root .site-lock-card {
  width: 100%;
  max-width: 400px;
  margin: auto 0;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  color: var(--ap-text);
  text-align: center;
  overflow: visible;
  animation: apLockIn 0.6s var(--ap-ease) both;
}

@keyframes apLockIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

:root .site-lock-card::before { content: none; display: none; }

:root .lock-brand-badge {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--ap-fill);
  overflow: hidden;
}

:root .lock-avatar {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

:root .lock-header-text h2 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.125;
  letter-spacing: -0.028em;
  color: var(--ap-text);
  word-break: keep-all;
}

:root .lock-header-text h2 .lock-org {
  display: block;
  margin: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--ap-text-2);
  background: none;
  -webkit-text-fill-color: currentColor;
}

:root .lock-subtitle {
  margin: 0 0 32px;
  font-size: 17px;
  line-height: 1.47;
  letter-spacing: -0.022em;
  color: var(--ap-text-2);
  word-break: keep-all;
}

:root .lock-form {
  display: block;
  text-align: left;
}

:root .lock-input-group label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

:root .lock-pwd-wrap,
:root .pwd-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

:root .lock-pwd-input {
  width: 100%;
  height: 56px;
  padding: 0 56px 0 18px;
  border: 1px solid var(--ap-hairline);
  border-radius: var(--ap-radius-s);
  background: var(--ap-tile);
  color: var(--ap-text);
  font-family: inherit;
  font-size: 17px;
  letter-spacing: -0.01em;
  text-align: left;
  box-shadow: none;
  transition: border-color var(--ap-dur) var(--ap-ease), box-shadow var(--ap-dur) var(--ap-ease);
}

:root .lock-pwd-input::placeholder { color: var(--ap-text-3); letter-spacing: -0.01em; }

:root .lock-pwd-input:focus {
  outline: none;
  border-color: var(--ap-accent);
  background: var(--ap-tile);
  box-shadow: var(--ap-focus);
}

/* Peek buttons: JS writes an emoji as textContent — hide it and draw an SVG mask */
:root .btn-peek-lock-pwd,
:root .btn-peek-pwd {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  opacity: 1;
  overflow: hidden;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .btn-peek-lock-pwd::before,
:root .btn-peek-pwd::before {
  content: '';
  position: absolute;
  inset: 0;
  width: 20px;
  height: 20px;
  margin: auto;
  background-color: var(--ap-text-3);
  -webkit-mask: var(--ap-eye) center / contain no-repeat;
  mask: var(--ap-eye) center / contain no-repeat;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .btn-peek-lock-pwd:hover,
:root .btn-peek-pwd:hover { background: var(--ap-fill); opacity: 1; }

:root .btn-peek-lock-pwd:hover::before,
:root .btn-peek-pwd:hover::before { background-color: var(--ap-text); }

:root .lock-pwd-wrap:has(input[type="text"]) .btn-peek-lock-pwd::before,
:root .pwd-input-wrap:has(input[type="text"]) .btn-peek-pwd::before {
  -webkit-mask-image: var(--ap-eye-off);
  mask-image: var(--ap-eye-off);
}

:root .lock-error-msg {
  margin: 10px 2px 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ap-red);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

:root .lock-remember-row {
  display: flex;
  justify-content: center;
  margin: 18px 0 26px;
}

:root .remember-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  line-height: 1.4;
  color: var(--ap-text-2);
  cursor: pointer;
  user-select: none;
}

:root .remember-checkbox-label input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--ap-blue);
}

:root .lock-action-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

:root .btn-unlock-site,
:root .btn-quick-bypass {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  min-height: 50px;
  padding: 12px 22px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  font-family: inherit;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.022em;
  box-shadow: none;
  transform: none;
  cursor: pointer;
  transition: background-color var(--ap-dur) var(--ap-ease), color var(--ap-dur) var(--ap-ease);
}

:root .btn-unlock-site {
  background: var(--ap-blue);
  color: #fff;
}

:root .btn-unlock-site:hover {
  background: var(--ap-blue-hover);
  box-shadow: none;
  transform: none;
}

:root .btn-quick-bypass {
  background: var(--ap-fill-2);
  color: var(--ap-text);
}

:root .btn-quick-bypass:hover {
  background: var(--ap-hairline);
  border: 0;
  color: var(--ap-text);
  box-shadow: none;
  transform: none;
}

:root .btn-unlock-site:active,
:root .btn-quick-bypass:active { transform: none; }

:root .lock-help-box {
  margin: 18px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ap-text-2);
  text-align: center;
  word-break: keep-all;
}

:root .lock-help-box code {
  padding: 0;
  border-radius: 0;
  background: none;
  font-family: inherit;
  font-weight: 600;
  color: var(--ap-text);
}

:root .lock-notice-box {
  display: block;
  margin: 40px 0 0;
  padding: 20px 0 0;
  border: 0;
  border-top: 1px solid var(--ap-hairline-soft);
  border-radius: 0;
  background: none;
  text-align: center;
}

:root .lock-notice-text strong {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ap-text-2);
}

:root .lock-notice-text span {
  display: block;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ap-text-3);
  word-break: keep-all;
}

:root .lock-footer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ap-text-3);
}

/* ==========================================================================
   6. Modals owned by chrome (sheet shell comes from foundation)
   ========================================================================== */
:root #kakao-modal .modal-content-window { max-width: 440px; }
:root #sign-video-modal .modal-content-window { max-width: 520px; }
:root #sign-success-modal .modal-content-window { max-width: 480px; }
:root #audit-success-modal .modal-content-window { max-width: 400px; }
:root #crm-modal .modal-content-window { max-width: 1040px; }

:root :is(#kakao-modal, #sign-video-modal, #sign-success-modal, #crm-modal) .modal-header {
  align-items: flex-start;
}

:root .modal-title-group {
  min-width: 0;
  padding-top: 4px;
}

:root .modal-title-group h3 {
  margin: 0;
  word-break: keep-all;
}

:root .modal-subtitle {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.43;
  letter-spacing: -0.01em;
  color: var(--ap-text-2);
  word-break: keep-all;
}

/* Full-width pills inside these sheets */
:root :is(#sign-video-modal, #sign-success-modal, #audit-success-modal) .ap-btn--lg {
  width: 100%;
  white-space: normal;
  text-align: center;
}

/* Success mark: SVG check in a soft green circle */
:root .ap-success-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 4px auto 16px;
  border-radius: 50%;
  background: var(--ap-green-soft);
  color: var(--ap-green);
}

:root .ap-success-mark svg {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}

:root .ap-success-title {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ap-text);
  word-break: keep-all;
}

:root .ap-success-text {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--ap-text-2);
  word-break: keep-all;
  text-wrap: pretty;
}

:root .ap-success-text strong {
  font-weight: 600;
  color: var(--ap-text);
}

:root .ap-callout {
  margin: 16px 0 0;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--ap-fill);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ap-text-2);
  text-align: left;
  word-break: keep-all;
}

:root .ap-callout strong { font-weight: 600; color: var(--ap-text); }

:root .ap-callout-eyebrow {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ap-text);
}

/* ---- 6a. Kakao modal ---- */
:root #kakao-modal .modal-body {
  padding: 8px 24px 28px;
  text-align: center;
}

:root .kakao-modal-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

:root .kakao-yellow-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0 0;
  border-radius: 0;
  background: none;
  color: var(--ap-text);
}

:root .kakao-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin: 0 0 10px;
  border-radius: 50%;
  background: var(--ap-kakao);
  color: var(--ap-kakao-text);
}

:root .kakao-mark svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

:root .kakao-yellow-box h4 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--ap-text);
  word-break: keep-all;
}

:root .kakao-yellow-box p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ap-text-2);
  word-break: keep-all;
}

:root .btn-kakao-openlink {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  margin: 0 0 12px;
  padding: 12px 24px;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-kakao);
  color: var(--ap-kakao-text);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-decoration: none;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .btn-kakao-openlink:hover { background: #f5dc00; }

:root .sms-quick-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px;
  border-radius: var(--ap-radius-m);
  background: var(--ap-fill);
}

:root .sms-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--ap-text-2);
}

:root .phone-number-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

:root .phone-number-box strong {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
  color: var(--ap-text);
}

:root .btn-copy-phone {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-tile);
  color: var(--ap-link);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .btn-copy-phone:hover { background: var(--ap-fill-2); }

:root .sms-quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

:root .modal-tip-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--ap-text-3);
  word-break: keep-all;
}

/* ---- 6b. Sign-language reservation form ---- */
:root #sign-video-modal .modal-body { padding: 12px 24px 28px; }

:root .sign-res-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

:root .sign-res-form .form-group {
  margin: 0;
  gap: 6px;
}

:root .sign-res-form .form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 12px;
  margin: 0;
}

:root .sign-res-form .form-input { width: 100%; }

:root .sign-res-form .sign-res-submit { margin-top: 8px; }

/* ---- 6c. Sign success ---- */
:root #sign-success-modal .modal-body {
  padding: 8px 24px 28px;
  text-align: center;
}

:root .sign-summary-box {
  margin: 0 0 20px;
  padding: 14px 18px 6px;
  border: 0;
  border-radius: 14px;
  background: var(--ap-fill);
  text-align: left;
}

:root .sign-summary-box:empty { display: none; }

:root .sign-summary-title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ap-text-2);
}

:root .sign-summary-list { margin: 0; }

:root .sign-summary-list > div {
  display: grid;
  grid-template-columns: 5.5em minmax(0, 1fr);
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--ap-hairline-soft);
  font-size: 14px;
  line-height: 1.45;
}

:root .sign-summary-list > div:first-child { border-top: 0; }

:root .sign-summary-list dt { color: var(--ap-text-2); }

:root .sign-summary-list dd {
  margin: 0;
  font-weight: 500;
  color: var(--ap-text);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

:root .sign-dispatch-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

:root .sign-copy-toast {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ap-green-soft);
  color: var(--ap-green);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  word-break: keep-all;
}

/* ---- 6d. Audit success ---- */
:root #audit-success-modal .modal-body {
  padding: 36px 28px 28px;
  text-align: center;
}

/* ---- 6e. CRM ---- */
:root .crm-body-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding: 8px 24px 24px;
}

:root .crm-sidebar-customers {
  padding: 16px;
  border-radius: var(--ap-radius-m);
  background: var(--ap-fill);
}

:root .crm-customer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
}

:root .crm-customer-header h4 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--ap-text);
}

:root .crm-btn.crm-btn-xs {
  min-height: 28px;
  padding: 4px 12px;
  font-size: 12px;
}

:root .crm-customer-list { min-height: 96px; }

:root .crm-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 16px;
}

:root .crm-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

:root .crm-form-group label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ap-text-2);
}

:root .crm-form-group .form-input { width: 100%; }

:root .crm-notes-group { margin-top: 14px; }

:root .timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin: 28px 0 4px;
}

:root .timeline-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--ap-text);
}

:root #crm-modal .revision-timeline {
  display: block;
}

:root #crm-modal .revision-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "head act" "chg act";
  align-items: center;
  gap: 4px 16px;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-top: 1px solid var(--ap-hairline-soft);
  border-radius: 0;
  background: none;
  box-shadow: none;
}

:root #crm-modal .revision-item:hover { border-color: var(--ap-hairline-soft); box-shadow: none; }
:root #crm-modal .revision-item.current { border-left: 0; }

:root #crm-modal .revision-header {
  grid-area: head;
  justify-content: flex-start;
  gap: 8px;
  margin: 0;
}

:root #crm-modal .revision-time-badge {
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ap-text);
  font-variant-numeric: tabular-nums;
}

:root #crm-modal .badge-tag--latest {
  padding: 2px 8px;
  border-radius: var(--ap-radius-pill);
  background: var(--ap-green-soft);
  color: var(--ap-green);
  font-size: 11px;
  font-weight: 600;
}

:root #crm-modal .revision-author-tag {
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 12px;
  color: var(--ap-text-3);
}

:root #crm-modal .revision-changes {
  grid-area: chg;
  margin: 0;
  padding: 0;
  border-radius: 0;
  background: none;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ap-text-2);
  word-break: keep-all;
}

:root #crm-modal .revision-changes strong { font-weight: 500; color: var(--ap-text); }

:root #crm-modal .revision-actions { grid-area: act; }

:root #crm-modal .empty-history-msg {
  padding: 28px 16px;
  border-top: 1px solid var(--ap-hairline-soft);
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ap-text-2);
}

:root #crm-modal .empty-history-msg strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--ap-text);
}

:root #crm-modal .empty-history-msg p { margin: 4px 0 0; }

:root #crm-modal .crm-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 24px;
  border-top: 1px solid var(--ap-hairline-soft);
  background: transparent;
}

:root #crm-modal .crm-footer-right {
  display: flex;
  gap: 8px;
}

/* ---- 6f. Admin auth ---- */
:root #admin-auth-modal .admin-auth-card {
  width: 100%;
  max-width: 420px;
  border: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-tile);
  box-shadow: var(--ap-shadow-modal);
}

:root #admin-auth-modal .admin-auth-header,
:root #admin-dashboard-modal .admin-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 24px 8px;
  border-bottom: 0;
  background: transparent;
}

:root .auth-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

:root .auth-shield-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--ap-blue-soft);
  color: var(--ap-accent);
  font-size: 0;
}

:root .auth-shield-icon svg { width: 22px; height: 22px; }

:root #admin-auth-modal .admin-auth-header h3,
:root #admin-dashboard-modal .admin-dash-header h3 {
  margin: 0;
  font-size: 21px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--ap-text);
  word-break: keep-all;
}

:root #admin-auth-modal .admin-auth-body { padding: 12px 24px 24px; }

:root .auth-notice-box {
  margin: 0 0 22px;
  padding: 14px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--ap-fill);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ap-text-2);
  word-break: keep-all;
}

:root .auth-notice-box strong {
  display: block;
  margin: 0 0 2px;
  font-weight: 600;
  color: var(--ap-text);
}

:root .auth-input-group label {
  display: block;
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ap-text-2);
}

:root .auth-pwd-input {
  width: 100%;
  height: 52px;
  padding: 0 56px 0 16px;
  border: 1px solid var(--ap-hairline);
  border-radius: var(--ap-radius-s);
  background: var(--ap-tile);
  color: var(--ap-text);
  font-family: inherit;
  font-size: 17px;
  box-shadow: none;
  transition: border-color var(--ap-dur) var(--ap-ease), box-shadow var(--ap-dur) var(--ap-ease);
}

:root .auth-pwd-input::placeholder { color: var(--ap-text-3); }

:root .auth-pwd-input:focus {
  outline: none;
  border-color: var(--ap-accent);
  box-shadow: var(--ap-focus);
}

:root .auth-error-msg {
  margin: 8px 2px 0;
  padding: 0;
  border-radius: 0;
  background: none;
  color: var(--ap-red);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}

:root .auth-hint {
  margin: 10px 2px 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ap-text-3);
  word-break: keep-all;
}

:root .auth-hint code {
  padding: 0;
  border-radius: 0;
  background: none;
  font-family: inherit;
  font-weight: 600;
  color: var(--ap-text-2);
}

:root .auth-btn-row {
  display: flex;
  gap: 10px;
  margin: 24px 0 0;
}

:root .btn-auth-cancel,
:root .btn-auth-submit,
:root .btn-pwd-cancel,
:root .btn-pwd-save {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--ap-radius-pill);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  box-shadow: none;
  transform: none;
  cursor: pointer;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .btn-auth-cancel { flex: 1; background: var(--ap-fill-2); color: var(--ap-text); }
:root .btn-auth-cancel:hover { background: var(--ap-hairline); }
:root .btn-auth-submit { flex: 2; background: var(--ap-blue); color: #fff; }
:root .btn-auth-submit:hover { background: var(--ap-blue-hover); box-shadow: none; transform: none; }

/* ---- 6g. Admin dashboard ---- */
:root #admin-dashboard-modal .admin-dash-card {
  width: 100%;
  max-width: 560px;
  border: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-tile);
  box-shadow: var(--ap-shadow-modal);
}

:root .dash-title-group { display: block; min-width: 0; }

:root .dash-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: var(--ap-green);
  font-size: 12px;
  font-weight: 600;
}

:root .dash-status-badge::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

:root #admin-dashboard-modal .admin-dash-body {
  padding: 12px 24px 24px;
  overflow-y: auto;
}

:root .admin-profile-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  padding: 16px;
  border: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-fill);
}

:root .admin-avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--ap-fill-2);
  box-shadow: none;
  overflow: hidden;
  font-size: 0;
}

:root .admin-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}

:root .admin-meta { min-width: 0; }

:root .admin-meta h4 {
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--ap-text);
  word-break: keep-all;
}

:root .admin-meta p {
  margin: 0 0 2px;
  font-size: 13px;
  line-height: 1.4;
  color: var(--ap-text-2);
}

:root .admin-auth-time {
  font-size: 12px;
  font-weight: 500;
  color: var(--ap-green);
}

:root .admin-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

:root .admin-action-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px;
  border: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-fill);
  color: var(--ap-text);
  font-family: inherit;
  text-align: left;
  box-shadow: none;
  transform: none;
  cursor: pointer;
  transition: background-color var(--ap-dur) var(--ap-ease);
}

:root .admin-action-tile:hover {
  background: var(--ap-fill-2);
  border: 0;
  box-shadow: none;
  transform: none;
}

:root .admin-action-tile .tile-icon {
  display: block;
  width: 28px;
  height: 28px;
  margin: 0 0 10px;
  color: var(--ap-accent);
  font-size: 0;
  line-height: 0;
}

:root .admin-action-tile .tile-icon svg {
  width: 28px;
  height: 28px;
  stroke-width: 1.6;
}

:root .admin-action-tile strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.016em;
  color: var(--ap-text);
}

:root .admin-action-tile span:not(.tile-icon) {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ap-text-2);
  word-break: keep-all;
}

:root .admin-action-tile.danger .tile-icon,
:root .admin-action-tile.danger strong { color: var(--ap-red); }

:root .admin-action-tile.danger:hover { background: var(--ap-red-soft); border: 0; }

:root .admin-pwd-panel {
  margin: 12px 0 0;
  padding: 20px;
  border: 0;
  border-radius: var(--ap-radius-m);
  background: var(--ap-fill);
}

:root .pwd-panel-title {
  margin: 0 0 14px;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.022em;
  color: var(--ap-text);
}

:root .pwd-field-group { margin: 0 0 12px; }

:root .pwd-field-group label {
  display: block;
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ap-text-2);
}

:root .pwd-field-group .form-input { width: 100%; }

:root .pwd-change-msg {
  margin: 0 0 12px;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}

:root .pwd-change-msg.success { background: var(--ap-green-soft); color: var(--ap-green); border: 0; }
:root .pwd-change-msg.error { background: var(--ap-red-soft); color: var(--ap-red); border: 0; }

:root .pwd-btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin: 16px 0 0;
}

:root .btn-pwd-cancel { min-height: 40px; background: var(--ap-tile); color: var(--ap-text); }
:root .btn-pwd-cancel:hover { background: var(--ap-fill-2); }
:root .btn-pwd-save { min-height: 40px; background: var(--ap-blue); color: #fff; }
:root .btn-pwd-save:hover { background: var(--ap-blue-hover); }

/* ==========================================================================
   7. Responsive
   ========================================================================== */

/* Tablet & small laptop: links move to a scrolling "chapter nav" row */
@media (max-width: 1068px) {
  :root {
    --ap-nav-h: calc(var(--ap-chrome-row) + var(--ap-chapter-row));
  }

  :root .header-content {
    flex-wrap: wrap;
    height: auto;
    column-gap: 12px;
    row-gap: 0;
  }

  :root .logo-group {
    order: 1;
    height: var(--ap-chrome-row);
    margin-right: auto;
  }

  :root .header-actions { order: 2; }

  :root .nav-links {
    order: 3;
    flex: 0 0 calc(100% + var(--ap-gutter) * 2);
    display: flex;
    justify-content: flex-start;
    gap: 22px;
    height: var(--ap-chapter-row);
    margin: 0 calc(var(--ap-gutter) * -1);
    padding: 0 var(--ap-gutter);
    border-top: 1px solid var(--ap-hairline-soft);
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 var(--ap-gutter), #000 calc(100% - 36px), transparent 100%);
    mask-image: linear-gradient(90deg, transparent 0, #000 var(--ap-gutter), #000 calc(100% - 36px), transparent 100%);
  }

  :root .nav-links::-webkit-scrollbar { display: none; }

  :root .nav-link {
    flex: none;
    padding: 0;
    font-size: 13px;
  }

  :root .nav-links::after {
    content: '';
    flex: none;
    width: 12px;
  }

  :root .footer-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Phones */
@media (max-width: 734px) {
  :root {
    --ap-chrome-row: 48px;
    --ap-chapter-row: 40px;
  }

  :root .header-content { column-gap: 8px; }

  :root .logo-text h1 .logo-org { display: none; }

  :root .header-actions { gap: 4px; }

  :root .header-cta-btn {
    height: 30px;
    padding: 0 11px;
  }

  :root .btn-sign-accent { margin-right: 2px; }

  :root .utility-icon-btn,
  :root .btn-admin-auth.locked,
  :root .btn-admin-auth.unlocked {
    width: 36px;
    height: 36px;
  }

  :root .nav-links { gap: 20px; }

  /* Ribbon */
  :root .accessibility-top-banner { padding: 12px var(--ap-gutter) 13px; }
  :root .top-banner-text-wrap { font-size: 13px; line-height: 1.5; }
  :root .banner-pill-badge { display: block; margin: 0 0 2px; }
  :root .btn-banner-link { display: inline-block; margin: 4px 0 0; }

  /* Floating bar: compact stack that stays out of the reading column */
  :root .floating-quick-bar {
    right: 12px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }
  :root .fab-audit { display: none; }
  :root .fab-label { display: none; }

  /* Footer */
  :root .footer-links-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  :root .footer-col li strong { min-width: 0; }

  /* Lock screen */
  :root .site-lock-overlay { padding: 40px 20px calc(32px + env(safe-area-inset-bottom, 0px)); }
  :root .lock-brand-badge { width: 80px; height: 80px; margin-bottom: 18px; }
  :root .lock-header-text h2 { font-size: 28px; }
  :root .lock-subtitle { font-size: 15px; margin-bottom: 28px; }
  :root .lock-pwd-input { font-size: 17px; }
  :root .lock-notice-box { margin-top: 32px; }

  /* Modals */
  :root .sign-res-form .form-row-2 { grid-template-columns: 1fr; }
  :root .crm-body-layout { grid-template-columns: 1fr; padding: 8px 20px 20px; }
  :root .crm-form-grid { grid-template-columns: 1fr; }
  :root #crm-modal .revision-item {
    grid-template-columns: 1fr;
    grid-template-areas: "head" "chg" "act";
  }
  :root #crm-modal .crm-footer { padding: 14px 20px; }
  :root .admin-actions-grid { grid-template-columns: 1fr; }
  :root .admin-action-tile { padding: 16px; }
  :root :is(#kakao-modal, #sign-video-modal, #sign-success-modal) .modal-body { padding-left: 20px; padding-right: 20px; }
}

/* Phones with popover support: admin tools collapse into a "more" tray */
@supports selector(:popover-open) {
  @media (max-width: 734px) {
    :root .header-utility-group { display: none; }
    :root .header-more-btn { display: inline-flex; }

    :root .header-utility-group:popover-open {
      position: fixed;
      inset: calc(var(--ap-chrome-row) + 6px) 12px auto auto;
      display: flex;
      flex-direction: column;
      gap: 2px;
      width: auto;
      min-width: 224px;
      height: auto;
      margin: 0;
      padding: 6px;
      border: 0;
      border-radius: var(--ap-radius-m);
      background: var(--ap-tile);
      color: var(--ap-text);
      box-shadow: var(--ap-shadow-float), 0 0 0 1px var(--ap-hairline-soft);
      overflow: visible;
    }

    :root .header-utility-group:popover-open .utility-icon-btn {
      justify-content: flex-start;
      gap: 12px;
      width: 100%;
      height: 44px;
      padding: 0 12px;
      border-radius: 12px;
      color: var(--ap-text);
      font-size: 15px;
      text-align: left;
    }

    :root .header-utility-group:popover-open .utility-icon-btn .ap-ico { color: var(--ap-text-2); }

    :root .header-utility-group:popover-open .sr-only {
      position: static;
      width: auto;
      height: auto;
      margin: 0;
      overflow: visible;
      clip: auto;
      white-space: nowrap;
    }
  }
}
