/* ================================================================
   APPLE WEB TOKENS — embedded
================================================================ */
:root {
  --font-sans: "Pretendard", -apple-system, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", Menlo, Monaco, "Courier New", monospace;

  --color-text-primary:    #1d1d1f;
  --color-text-secondary:  #6e6e73;
  --color-text-tertiary:   #86868b;
  --color-text-quaternary: #adadb0;
  --color-link:            #0066cc;
  --color-accent:          #0071e3;
  --color-accent-hover:    #0077ed;
  --color-accent-press:    #006edb;
  --color-new:             #e30000;
  --color-bg:              #ffffff;
  --color-bg-gray:         #f5f5f7;
  --color-bg-card:         #ffffff;
  --color-bg-input:        #f5f5f7;
  --color-bg-overlay:      rgba(0,0,0,.48);
  --color-sep:             rgba(0,0,0,.16);
  --color-sep-light:       rgba(0,0,0,.08);
  --color-sep-heavy:       rgba(0,0,0,.24);
  --color-fill:            rgba(142,142,147,.18);
  --color-fill-hover:      rgba(142,142,147,.28);
  --color-nav-bg:          rgba(255,255,255,.85);
  --color-green:  #34C759;
  --color-red:    #FF3B30;

  --text-headline:  96px;
  --text-display:   56px;
  --text-title-xl:  40px;
  --text-title-lg:  28px;
  --text-title-md:  24px;
  --text-title-sm:  21px;
  --text-body-lg:   19px;
  --text-body:      17px;
  --text-callout:   15px;
  --text-footnote:  13px;
  --text-caption:   12px;

  --weight-regular:  400;
  --weight-medium:   500;
  --weight-semibold: 600;
  --weight-bold:     700;

  --leading-headline: .98;
  --leading-display:  1.07;
  --leading-title:    1.12;
  --leading-body:     1.6;
  --leading-callout:  1.5;

  --tracking-headline: -0.04em;
  --tracking-display:  -0.03em;
  --tracking-title:    -0.02em;

  --space-1:   4px;  --space-2:  8px;  --space-3: 12px;
  --space-4:  16px;  --space-5: 20px;  --space-6: 24px;
  --space-8:  32px;  --space-10:40px;  --space-12:48px;
  --space-16: 64px;  --space-20:80px;  --space-24:96px;

  --container-lg:  980px;
  --container-xl: 1200px;
  --section-padding-y: 96px;
  --section-padding-x: 22px;
  --nav-height: 48px;

  --radius-xs:   4px;  --radius-sm:  6px;  --radius-md:  12px;
  --radius-lg:  18px;  --radius-xl: 20px;  --radius-2xl: 28px;
  --radius-full: 9999px;

  --shadow-xs:   0 1px 3px rgba(0,0,0,.06);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.05);
  --shadow-card: 0 2px 12px rgba(0,0,0,.06);

  --duration-fast:   150ms;
  --duration-normal: 260ms;
  --duration-slow:   380ms;
  --ease-standard: cubic-bezier(.25,.46,.45,.94);
  --ease-spring:   cubic-bezier(.22,1,.36,1);
  --ease-bounce:   cubic-bezier(.34,1.56,.64,1);
  --transition-base:   all var(--duration-fast) var(--ease-standard);
  --transition-spring: all var(--duration-normal) var(--ease-spring);
}

/* ── dark mode tokens ── */
[data-theme="dark"] {
  --color-text-primary:    #f5f5f7;
  --color-text-secondary:  #a1a1a6;
  --color-text-tertiary:   #6e6e73;
  --color-text-quaternary: #48484a;
  --color-link:            #2997ff;
  --color-accent:          #2997ff;
  --color-accent-hover:    #3ba4ff;
  --color-accent-press:    #1c89ff;
  --color-bg:              #000000;
  --color-bg-gray:         #0a0a0a;
  --color-bg-card:         #141416;
  --color-bg-input:        #1c1c1e;
  --color-bg-overlay:      rgba(0,0,0,.72);
  --color-sep:             rgba(255,255,255,.12);
  --color-sep-light:       rgba(255,255,255,.06);
  --color-sep-heavy:       rgba(255,255,255,.20);
  --color-fill:            rgba(142,142,147,.22);
  --color-fill-hover:      rgba(142,142,147,.32);
  --color-nav-bg:          rgba(20,20,22,1);
  --shadow-xs:   0 1px 3px rgba(0,0,0,.28);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.36);
  --shadow-card: 0 2px 12px rgba(0,0,0,.40);
}

/* ================================================================
   BASE RESET
================================================================ */
*, *::before, *::after {
  box-sizing: border-box; margin: 0; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
html {
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  height: 100%;
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  color: var(--color-text-primary);
  background: var(--color-bg);
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  display: flex; flex-direction: column;
  min-height: 100vh;
}
button, input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
a { color: var(--color-link); text-decoration: none; }
:focus-visible { outline: 3px solid rgba(0,113,227,.45); outline-offset: 2px; }

/* ================================================================
   NAV
================================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: var(--color-nav-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: .5px solid var(--color-sep-light);
  transition: background 0.3s;
}
.nav-inner {
  padding: 0 var(--section-padding-x);
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.nav-wordmark {
  font-size: 19px; font-weight: var(--weight-semibold);
  letter-spacing: -0.02em; color: var(--color-text-primary);
  cursor: pointer; user-select: none; transition: color 0.3s;
}
.nav-wordmark em { font-style: normal; color: inherit; transition: color 0.3s; }
.nav-logo {
  height: 32px;
  width: auto;
  display: block;
  color: var(--color-text-primary);
  transition: opacity var(--duration-fast) var(--ease-standard);
}
.nav-logo:hover { opacity: 0.7; }
[data-theme="dark"] .nav-logo { filter: invert(1); }

.nav-admin {
  font-size: var(--text-caption);
  color: var(--color-text-tertiary);
  cursor: pointer; transition: color var(--duration-fast) var(--ease-standard);
  padding: 6px 10px;
  border-radius: var(--radius-full);
}
.nav-share {
  background: transparent; border: none; border-radius: var(--radius-full);
  color: var(--color-text-quaternary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  transition: var(--transition-base);
}
.nav-share:hover { background: var(--color-fill); color: var(--color-text-secondary); }
.nav-admin:hover { color: var(--color-text-primary); background: var(--color-fill); }

/* ================================================================
   HERO
================================================================ */
.hero {
  background: var(--color-bg);
  padding: var(--space-24) var(--section-padding-x) var(--space-20);
  text-align: center;
  transition: background 0.3s;
}
.hero-eyebrow {
  font-size: var(--text-callout);
  font-weight: var(--weight-semibold);
  color: var(--color-accent);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}
.hero-title {
  font-size: clamp(40px, 7vw, var(--text-headline));
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-headline);
  line-height: var(--leading-headline);
  color: var(--color-text-primary);
  margin-bottom: var(--space-5);
  transition: color 0.3s;
}
.hero-title em { font-style: italic; color: var(--color-accent); transition: color 0.3s; }
.hero-sub {
  font-size: var(--text-body-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-callout);
  transition: color 0.3s;
  max-width: 480px; margin: 0 auto;
}

/* ================================================================
   SECTION
================================================================ */
.section {
  background: var(--color-bg);
  padding: var(--space-20) var(--section-padding-x);
  transition: background 0.3s;
}
.section.section-gray {
  background: var(--color-bg-gray);
  flex: 1;
  padding-top: var(--nav-height);
  padding-bottom: var(--space-10);
  padding-left: 0;
  padding-right: 0;
}

.section-header {
  margin: 0 0 var(--space-10);
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
}
.section-title {
  font-size: var(--text-title-xl);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-display);
  color: var(--color-text-primary);
  transition: color 0.3s;
}
.section-count {
  font-size: var(--text-callout);
  color: var(--color-text-tertiary);
}

/* ================================================================
   APP GRID + CARD
================================================================ */
.app-grid-wrap {
  width: 100%;
}

#app-grid {
  display: block;
}

.app-card {
  background: var(--color-bg-card);
  padding: var(--space-6);
  display: flex; flex-direction: column; align-items: flex-start;
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
  border-radius: 0;
  border-right: 1px solid var(--color-sep-light);
  border-bottom: 1px solid var(--color-sep-light);
}
.app-card:hover { background: var(--color-fill-hover); }
.app-card:active { transform: scale(.99); }

@media (max-width: 600px) {
  .section.section-gray { padding-top: var(--nav-height); padding-left: 0; padding-right: 0; }
  .app-card { padding: var(--space-4); }
}

.card-icon-wrap {
  font-size: 28px; margin-bottom: var(--space-4);
  line-height: 1;
}
.card-new { font-size: var(--text-caption); font-weight: var(--weight-semibold); color: var(--color-new); display: block; height: 16px; margin-bottom: 4px; }
.card-name {
  font-size: var(--text-title-sm);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-title);
  color: var(--color-text-primary);
  margin-bottom: var(--space-3);
  line-height: var(--leading-title);
  transition: color 0.3s;
}
.card-desc {
  font-size: var(--text-callout);
  color: var(--color-text-secondary);
  line-height: var(--leading-callout);
  transition: color 0.3s;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--space-6); }
.tag {
  font-size: 11px; font-weight: var(--weight-semibold);
  color: var(--color-text-tertiary);
  background: var(--color-fill);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  letter-spacing: 0.02em;
}
.card-share {
  position: absolute; top: var(--space-5); right: var(--space-5);
  background: transparent; border: none; border-radius: var(--radius-full);
  color: var(--color-text-quaternary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  transition: var(--transition-base);
}
.card-share:hover { background: var(--color-fill-hover); color: var(--color-text-secondary); }

/* ── Buttons — Apple pill pattern ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 36px; padding: 0 18px;
  border-radius: var(--radius-full);
  font-size: var(--text-callout);
  font-weight: var(--weight-semibold);
  cursor: pointer; border: none; text-decoration: none;
  transition: var(--transition-base);
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: #ffffff;
}
.btn-primary:hover { background: var(--color-accent-hover); text-decoration: none; }
.btn-primary:active { background: var(--color-accent-press); transform: scale(.98); }

.btn-secondary {
  background: var(--color-fill);
  color: var(--color-text-primary);
}
.btn-secondary:hover { background: var(--color-fill-hover); }
.btn-secondary:active { transform: scale(.98); }

.btn-link {
  background: none; padding: 0; height: auto;
  color: var(--color-link);
  font-size: var(--text-callout);
  font-weight: var(--weight-semibold);
}
.btn-link:hover { text-decoration: underline; opacity: .8; }
.btn-link::after { content: ' ›'; }

.btn-sm { height: 30px; padding: 0 14px; font-size: 13px; }

/* ================================================================
   EMPTY STATE
================================================================ */
.empty-state {
  grid-column: 1/-1;
  text-align: center; padding: 80px 20px;
  background: var(--color-bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}
.empty-state p { font-size: var(--text-body); color: var(--color-text-secondary); margin-bottom: var(--space-6); }

/* ================================================================
   FOOTER
================================================================ */
.footer {
  margin-top: auto;
  height: 60px;
  background: var(--color-bg-gray);
  border-top: .5px solid var(--color-sep-light);
  transition: background 0.3s;
}
.footer-inner { height: 100%; padding: 0 var(--section-padding-x); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.footer-text  { font-size: var(--text-caption); color: var(--color-text-secondary); }
.admin-hint   { font-size: var(--text-caption); color: rgba(134,134,139,.45); cursor: pointer; transition: color var(--duration-fast) var(--ease-standard); }
.admin-hint:hover { color: var(--color-text-secondary); }

/* ================================================================
   OVERLAY + MODAL
================================================================ */
.overlay {
  position: fixed; inset: 0;
  background: var(--color-bg-overlay);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity var(--duration-normal) var(--ease-standard);
}
.overlay.active { opacity: 1; pointer-events: all; }

.modal {
  background: var(--color-bg-card);
  border: .5px solid var(--color-sep-light);
  border-radius: var(--radius-2xl);
  width: min(92vw, 560px);
  max-height: 90vh; overflow-y: auto;
  padding: var(--space-8);
  display: flex; flex-direction: column; gap: var(--space-6);
  box-shadow: var(--shadow-xl, 0 16px 48px rgba(0,0,0,.14));
  transition: background 0.3s;
  animation: aw-scale-in var(--duration-normal) var(--ease-bounce) both;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.modal::-webkit-scrollbar { display: none; }
@keyframes aw-scale-in { from { opacity:0; transform:scale(.94); } to { opacity:1; transform:scale(1); } }

.modal-header { display: flex; align-items: center; justify-content: space-between; }
.modal-title  { font-size: var(--text-title-md); font-weight: var(--weight-bold); letter-spacing: var(--tracking-title); color: var(--color-text-primary); }
.btn-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--color-fill); border: none;
  color: var(--color-text-secondary); cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
  transition: var(--transition-base);
}
.btn-close:hover { background: var(--color-fill-hover); color: var(--color-text-primary); }

/* ── tabs ── */
.tabs {
  display: flex; gap: 2px;
  background: var(--color-fill);
  border-radius: var(--radius-md);
  padding: 2px;
}
.tab-btn {
  flex: 1; background: none; border: none;
  color: var(--color-text-secondary); cursor: pointer;
  font-size: var(--text-footnote); font-weight: var(--weight-medium);
  padding: 6px 10px; border-radius: 10px;
  transition: var(--transition-base);
}
.tab-btn.active {
  background: var(--color-bg-card);
  color: var(--color-text-primary);
  font-weight: var(--weight-semibold);
  box-shadow: var(--shadow-xs);
}
.tab-panel { display: none; flex-direction: column; gap: var(--space-5); }
.tab-panel.active { display: flex; }

/* ── form fields ── */
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: var(--text-footnote); font-weight: var(--weight-semibold); color: var(--color-text-secondary); }
.form-row input, .form-row textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--color-bg-input);
  border: .5px solid transparent;
  border-radius: var(--radius-sm);
  font-size: var(--text-body); font-weight: var(--weight-regular);
  color: var(--color-text-primary);
  transition: var(--transition-base);
  outline: none;
}
.form-row input:focus, .form-row textarea:focus {
  background: var(--color-bg);
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(0,113,227,.2);
}
.form-row input::placeholder, .form-row textarea::placeholder { color: var(--color-text-quaternary); }
.form-row textarea { resize: vertical; min-height: 76px; }
.form-hint { font-size: var(--text-caption); color: var(--color-text-tertiary); margin-top: 2px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }

/* ── modal buttons ── */
.btn-modal-primary {
  background: var(--color-accent); color: #fff; border: none;
  border-radius: var(--radius-full); padding: 0 22px; height: 38px;
  font-size: var(--text-callout); font-weight: var(--weight-semibold);
  cursor: pointer; transition: var(--transition-base);
}
.btn-modal-primary:hover { background: var(--color-accent-hover); }
.btn-modal-primary:active { transform: scale(.98); }

.btn-modal-secondary {
  background: var(--color-fill); color: var(--color-text-primary); border: none;
  border-radius: var(--radius-full); padding: 0 18px; height: 38px;
  font-size: var(--text-callout); font-weight: var(--weight-medium);
  cursor: pointer; transition: var(--transition-base);
}
.btn-modal-secondary:hover { background: var(--color-fill-hover); }

.btn-modal-danger {
  background: none; color: var(--color-red); border: none;
  border-radius: var(--radius-full); padding: 0 18px; height: 38px;
  font-size: var(--text-callout); font-weight: var(--weight-medium);
  cursor: pointer; transition: var(--transition-base);
}
.btn-modal-danger:hover { background: rgba(255,59,48,.08); }

.modal-actions { display: flex; gap: var(--space-3); justify-content: flex-end; flex-wrap: wrap; }

/* ── list rows (admin app list) ── */
.list-group {
  background: var(--color-bg-input);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: .5px solid var(--color-sep-light);
}
.list-row {
  display: flex; align-items: center; gap: var(--space-3);
  min-height: 52px; padding: 0 var(--space-4);
  border-bottom: .5px solid var(--color-sep-light);
  transition: background var(--duration-fast) var(--ease-standard);
}
.list-row:last-child { border-bottom: none; }
.list-row-icon { font-size: 22px; flex-shrink: 0; }
.list-row-info { flex: 1; min-width: 0; }
.list-row-title { font-size: var(--text-body); color: var(--color-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row-sub   { font-size: var(--text-caption); color: var(--color-text-tertiary); font-family: var(--font-mono); }
.list-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-list {
  background: var(--color-fill); border: none;
  border-radius: var(--radius-full);
  color: var(--color-text-secondary); cursor: pointer;
  font-size: 12px; font-weight: var(--weight-semibold);
  padding: 4px 10px; transition: var(--transition-base);
}
.btn-list:hover { background: var(--color-fill-hover); color: var(--color-text-primary); }
.btn-list.danger:hover { background: rgba(255,59,48,.1); color: var(--color-red); }

/* list row status badge */
.status-badge {
  font-size: 10px; font-weight: var(--weight-semibold);
  border-radius: var(--radius-full);
  padding: 3px 9px; flex-shrink: 0;
  line-height: 1.4;
}
.status-badge.on  { background: rgba(52,199,89,.15); color: #1a7f35; }
.status-badge.off { background: var(--color-fill);   color: var(--color-text-tertiary); }
[data-theme="dark"] .status-badge.on { background: rgba(52,199,89,.2); color: #34C759; }
/* drag handle */
.drag-handle {
  cursor: grab;
  color: var(--color-text-quaternary);
  font-size: 16px;
  padding: 4px 6px 4px 2px;
  flex-shrink: 0;
  user-select: none;
  line-height: 1;
}
.drag-handle:active { cursor: grabbing; }
.list-row.drag-over { background: var(--color-fill); border-top: 2px solid var(--color-accent); }


/* ── settings rows ── */
.setting-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: var(--space-4) 0;
  border-bottom: .5px solid var(--color-sep-light);
}
.setting-row:last-child { border-bottom: none; }
.setting-label { font-size: var(--text-body); color: var(--color-text-primary); }
.setting-desc  { font-size: var(--text-footnote); color: var(--color-text-tertiary); margin-top: 2px; }

/* iOS-style toggle */
.ios-toggle { position: relative; display: inline-block; width: 51px; height: 31px; flex-shrink: 0; }
.ios-toggle input { opacity: 0; width: 0; height: 0; }
.ios-toggle-track {
  position: absolute; inset: 0; border-radius: var(--radius-full);
  background: rgba(120,120,128,.32); cursor: pointer;
  transition: background var(--duration-fast) var(--ease-standard);
}
.ios-toggle input:checked + .ios-toggle-track { background: var(--color-green); }
.ios-toggle-track::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 27px; height: 27px; border-radius: 50%; background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.3);
  transition: transform 200ms cubic-bezier(.34,1.56,.64,1);
}
.ios-toggle input:checked + .ios-toggle-track::after { transform: translateX(20px); }

/* color swatches */
.color-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2px solid transparent; transition: transform var(--duration-fast) var(--ease-bounce);
  position: relative;
}
.swatch:hover { transform: scale(1.15); }
.swatch.active { border-color: var(--color-text-primary); }
.swatch.active::after { content:'✓'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; font-size:11px; font-weight:700; color:#fff; }

/* section divider */
.section-divider {
  font-size: var(--text-caption); font-weight: var(--weight-semibold);
  color: var(--color-text-tertiary); letter-spacing: 0.08em; text-transform: uppercase;
  padding: var(--space-4) 0 var(--space-2);
  border-bottom: .5px solid var(--color-sep-light);
}

/* category sections (homepage) */
.cat-section { display: block; }
.cat-section + .cat-section { margin-top: var(--space-10); }
.cat-header {
  font-size: var(--text-footnote);
  font-weight: 600;
  color: var(--color-text-tertiary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: var(--space-3) var(--space-6) var(--space-2);
}
.cat-header .cat-count {
  margin-left: var(--space-2);
  color: var(--color-text-quaternary);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0;
  background: transparent;
  border-top: 1px solid var(--color-sep-light);
  border-left: 1px solid var(--color-sep-light);
}
@media (max-width: 600px) {
  .cat-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .cat-header { padding: var(--space-3) var(--space-4) var(--space-2); }
  .card-name { font-size: var(--text-body); }
  .card-icon-wrap { font-size: 24px; margin-bottom: var(--space-3); }
}

/* admin list category badge */
.list-row-cat {
  font-size: var(--text-caption);
  color: var(--color-text-tertiary);
  background: var(--color-fill);
  padding: 2px var(--space-2);
  border-radius: 4px;
  margin-left: var(--space-2);
  white-space: nowrap;
}

/* pw feedback */
.pw-error   { font-size: var(--text-footnote); color: var(--color-red);   display: none; }
.pw-success { font-size: var(--text-footnote); color: var(--color-green); display: none; }
.pw-error.show, .pw-success.show { display: block; }


/* inactive card — admin list only (비활성 앱은 메인 그리드에 표시 안 됨) */
/* toast */
#toast {
  position: fixed; bottom: 32px; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: rgba(29,29,31,.92);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-full);
  color: #f5f5f7; font-size: var(--text-callout);
  padding: 8px 20px; opacity: 0;
  transition: all var(--duration-normal) var(--ease-spring);
  z-index: 9999; white-space: nowrap; pointer-events: none;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-thumb { background: var(--color-sep); border-radius: 2px; }

@media (max-width: 680px) {
  .hero { padding: var(--space-16) var(--section-padding-x) var(--space-12); }
  .section { padding: var(--space-12) var(--section-padding-x); }
  .section.section-gray { padding-top: var(--nav-height); padding-left: 0; padding-right: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-admin { display: none; }
}

/* ── card fade-in animation ── */
@keyframes cardFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.app-card {
  opacity: 0;
  animation: cardFadeIn 0.35s var(--ease-spring) both;
}

/* ── page load fade ── */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
#app-grid {
  animation: pageFadeIn 0.3s ease both;
}

/* ── dark mode toggle button ── */
.nav-dark-toggle {
  background: transparent; border: none; border-radius: var(--radius-full);
  color: var(--color-text-quaternary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  transition: var(--transition-base);
}
.nav-dark-toggle:hover { background: var(--color-fill); color: var(--color-text-secondary); }

/* ── share checkmark 애니메이션 ── */
@keyframes checkPop {
  0%   { transform: scale(0.6); opacity: 0; }
  60%  { transform: scale(1.2); }
  100% { transform: scale(1);   opacity: 1; }
}
.share-check { animation: checkPop 0.3s var(--ease-bounce) both; }
