/* ============================================================
   학원전자 디자인 시스템 v1.0
   tokens · typography · components · animations
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  /* === COLORS === */
  --hj-bg:           #F7F8FB;
  --hj-bg-2:         #EEF1F7;
  --hj-surface:      #FFFFFF;
  --hj-surface-2:    #FAFBFD;
  --hj-glass:        rgba(255, 255, 255, 0.7);
  --hj-overlay:      rgba(15, 23, 42, 0.6);

  --hj-primary:      #2F3CE8;
  --hj-primary-600:  #2532C2;
  --hj-primary-700:  #1C2899;
  --hj-primary-50:   #EEF0FE;
  --hj-primary-100:  #DDE1FD;

  --hj-accent:       #00C4A7;
  --hj-accent-600:   #00A88F;
  --hj-accent-50:    #E0F8F4;

  --hj-warn:         #F59E0B;
  --hj-warn-50:      #FEF3C7;
  --hj-danger:       #EF4444;
  --hj-danger-50:    #FEE2E2;
  --hj-success:      #10B981;
  --hj-success-50:   #D1FAE5;
  --hj-violet:       #7C3AED;
  --hj-violet-50:    #EDE9FE;

  --hj-text:         #0B1220;
  --hj-text-2:       #2C3849;
  --hj-text-3:       #5A6878;
  --hj-text-muted:   #94A3B8;
  --hj-text-on-dark: #F1F5F9;

  --hj-border:       #E5E7EB;
  --hj-border-2:     #EFF1F5;
  --hj-border-strong:#CBD5E1;

  /* === TYPOGRAPHY === */
  --hj-font: 'Pretendard Variable','Pretendard',-apple-system,BlinkMacSystemFont,'Apple SD Gothic Neo','Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  --hj-font-mono: 'JetBrains Mono','D2Coding','Menlo',monospace;

  /* === RADIUS === */
  --hj-r-sm: 8px;
  --hj-r:    12px;
  --hj-r-md: 16px;
  --hj-r-lg: 20px;
  --hj-r-xl: 28px;
  --hj-r-pill: 999px;

  /* === SHADOW === */
  --hj-shadow-1:  0 1px 2px rgba(11,18,32,.05), 0 1px 3px rgba(11,18,32,.04);
  --hj-shadow-2:  0 4px 8px -2px rgba(11,18,32,.08), 0 2px 4px -1px rgba(11,18,32,.04);
  --hj-shadow-3:  0 12px 24px -8px rgba(11,18,32,.12), 0 4px 8px -2px rgba(11,18,32,.06);
  --hj-shadow-4:  0 24px 48px -12px rgba(11,18,32,.18), 0 8px 16px -4px rgba(11,18,32,.08);
  --hj-shadow-glow: 0 0 0 1px rgba(47,60,232,.10), 0 12px 32px -8px rgba(47,60,232,.25);
  --hj-shadow-card-hover: 0 24px 56px -16px rgba(47,60,232,.20), 0 8px 16px -4px rgba(11,18,32,.08);

  /* === MOTION === */
  --hj-ease:         cubic-bezier(.4, 0, .2, 1);
  --hj-ease-out:     cubic-bezier(.16, 1, .3, 1);
  --hj-ease-spring:  cubic-bezier(.34, 1.56, .64, 1);
  --hj-d-fast:   .15s;
  --hj-d:        .25s;
  --hj-d-slow:   .45s;

  /* === LAYOUT === */
  --hj-container: 1200px;
  --hj-nav-h:     68px;
}

/* === BASE === */
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--hj-font);
  font-feature-settings: "ss01","ss02","cv01","cv02";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--hj-bg);
  color: var(--hj-text);
  line-height: 1.65;
  font-size: 15px;
  letter-spacing: -0.01em;
  min-height: 100vh;
}
a { color: var(--hj-primary); text-decoration: none; transition: color var(--hj-d-fast) var(--hj-ease); }
a:hover { color: var(--hj-primary-700); }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--hj-primary-100); color: var(--hj-primary-700); }

/* === ICONS === */
.hj-i { width: 20px; height: 20px; flex-shrink: 0; vertical-align: middle; stroke-width: 1.75; }
.hj-i-sm { width: 16px; height: 16px; }
.hj-i-lg { width: 24px; height: 24px; }
.hj-i-xl { width: 32px; height: 32px; }

/* === CONTAINER === */
.hj-container { max-width: var(--hj-container); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .hj-container { padding: 0 18px; } }

/* === NAV (TOP BAR) === */
.hj-nav {
  position: sticky; top: 0; z-index: 90;
  height: var(--hj-nav-h);
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid rgba(229,231,235,.7);
}
.hj-nav-inner {
  max-width: var(--hj-container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.hj-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; color: var(--hj-text);
  letter-spacing: -0.025em;
}
.hj-brand-mark {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--hj-primary), var(--hj-violet));
  border-radius: 9px;
  position: relative;
  box-shadow: 0 6px 14px -4px rgba(47,60,232,.5), inset 0 1px 0 rgba(255,255,255,.2);
}
.hj-brand-mark::after {
  content: 'H'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 900; font-size: 16px; letter-spacing: -0.05em;
  text-shadow: 0 1px 2px rgba(0,0,0,.15);
}

.hj-nav-menu {
  display: flex; align-items: center; gap: 2px;
  flex: 1; justify-content: center;
}
.hj-nav-link {
  position: relative;
  padding: 10px 16px;
  font-size: 14px; font-weight: 600;
  color: var(--hj-text-3);
  border-radius: 10px;
  transition: all var(--hj-d-fast) var(--hj-ease);
}
.hj-nav-link:hover {
  color: var(--hj-text);
  background: var(--hj-primary-50);
}
.hj-nav-link[aria-current="page"] {
  color: var(--hj-primary);
  background: var(--hj-primary-50);
}
.hj-nav-link[aria-current="page"]::after {
  content: '';
  position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--hj-primary), var(--hj-accent));
  border-radius: 2px;
}

.hj-nav-cta { display: flex; align-items: center; gap: 8px; }
.hj-nav-burger {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border: 1px solid var(--hj-border); border-radius: 10px;
  background: var(--hj-surface); color: var(--hj-text);
}
.hj-nav-burger:hover { border-color: var(--hj-primary); color: var(--hj-primary); }

/* user pill */
.hj-user-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 8px 6px 12px;
  background: var(--hj-surface); border: 1px solid var(--hj-border);
  border-radius: var(--hj-r-pill);
  font-size: 13px; font-weight: 600; color: var(--hj-text-2);
  transition: all var(--hj-d-fast) var(--hj-ease);
}
.hj-user-pill:hover { border-color: var(--hj-primary); color: var(--hj-primary); }
.hj-user-avatar {
  width: 26px; height: 26px;
  background: linear-gradient(135deg, var(--hj-primary), var(--hj-violet));
  color: #fff; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}

/* === MOBILE DRAWER === */
@media (max-width: 880px) {
  .hj-nav-menu { display: none; }
  .hj-nav-burger { display: inline-flex; }
}

.hj-drawer {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.55);
  backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0; pointer-events: none;
  transition: opacity var(--hj-d) var(--hj-ease);
}
.hj-drawer[data-open="true"] { opacity: 1; pointer-events: auto; }
.hj-drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 320px; max-width: 86vw;
  background: var(--hj-surface);
  padding: 24px;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%);
  transition: transform var(--hj-d) var(--hj-ease-out);
  overflow-y: auto;
}
.hj-drawer[data-open="true"] .hj-drawer-panel { transform: translateX(0); }
.hj-drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px; padding-bottom: 18px;
  border-bottom: 1px solid var(--hj-border);
}
.hj-drawer-link {
  padding: 14px 16px;
  font-size: 15px; font-weight: 600;
  color: var(--hj-text-2);
  border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
}
.hj-drawer-link:hover, .hj-drawer-link[aria-current="page"] {
  background: var(--hj-primary-50); color: var(--hj-primary);
}
.hj-drawer-divider { height: 1px; background: var(--hj-border); margin: 12px 0; }

/* === BUTTONS === */
.hj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px;
  font-size: 14px; font-weight: 700;
  border-radius: var(--hj-r);
  border: 1.5px solid transparent;
  background: transparent; color: var(--hj-text);
  letter-spacing: -0.01em;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--hj-d-fast) var(--hj-ease);
  user-select: none;
}
.hj-btn:disabled, .hj-btn[aria-disabled="true"] {
  opacity: .55; cursor: not-allowed;
}
.hj-btn-primary {
  background: var(--hj-primary); color: #fff;
  box-shadow: 0 6px 14px -4px rgba(47,60,232,.4), inset 0 1px 0 rgba(255,255,255,.15);
}
.hj-btn-primary:hover:not(:disabled) {
  background: var(--hj-primary-600); transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(47,60,232,.5), inset 0 1px 0 rgba(255,255,255,.2);
  color: #fff;
}
.hj-btn-primary:active:not(:disabled) { transform: translateY(0); }
.hj-btn-grad {
  background: linear-gradient(135deg, var(--hj-primary), var(--hj-violet));
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(47,60,232,.55);
}
.hj-btn-grad:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 36px -12px rgba(47,60,232,.65);
  color: #fff;
}
.hj-btn-accent {
  background: var(--hj-accent); color: #052E27;
  box-shadow: 0 6px 14px -4px rgba(0,196,167,.45);
}
.hj-btn-accent:hover:not(:disabled) {
  background: var(--hj-accent-600); transform: translateY(-1px); color: #052E27;
}
.hj-btn-outline {
  background: var(--hj-surface); color: var(--hj-text);
  border-color: var(--hj-border);
}
.hj-btn-outline:hover:not(:disabled) {
  border-color: var(--hj-primary); color: var(--hj-primary);
  transform: translateY(-1px);
}
.hj-btn-ghost {
  background: transparent; color: var(--hj-text-2);
}
.hj-btn-ghost:hover:not(:disabled) {
  background: var(--hj-bg-2); color: var(--hj-text);
}
.hj-btn-danger {
  background: var(--hj-danger); color: #fff;
}
.hj-btn-danger:hover:not(:disabled) { background: #DC2626; color: #fff; }
.hj-btn-sm { padding: 8px 14px; font-size: 13px; gap: 6px; border-radius: 10px; }
.hj-btn-lg { padding: 16px 28px; font-size: 16px; gap: 10px; }
.hj-btn-block { width: 100%; }

/* === BADGES === */
.hj-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--hj-r-pill);
  background: var(--hj-bg-2); color: var(--hj-text-3);
  border: 1px solid var(--hj-border);
}
.hj-badge-primary { background: var(--hj-primary-50); color: var(--hj-primary-700); border-color: transparent; }
.hj-badge-accent  { background: var(--hj-accent-50); color: #035C4F; border-color: transparent; }
.hj-badge-warn    { background: var(--hj-warn-50);  color: #92400E; border-color: transparent; }
.hj-badge-danger  { background: var(--hj-danger-50); color: #991B1B; border-color: transparent; }
.hj-badge-violet  { background: var(--hj-violet-50); color: #5B21B6; border-color: transparent; }
.hj-badge-grad    {
  background: linear-gradient(135deg, var(--hj-primary), var(--hj-violet));
  color: #fff; border-color: transparent;
}
.hj-tier-free    { background: #F1F5F9; color: #475569; }
.hj-tier-basic   { background: #DBEAFE; color: #1E3A8A; }
.hj-tier-premium { background: linear-gradient(135deg,#FBBF24,#F59E0B); color: #4C1D02; }
.hj-tier-vip     { background: linear-gradient(135deg, var(--hj-violet), var(--hj-primary)); color: #fff; box-shadow: 0 4px 10px -2px rgba(124,58,237,.4); }

/* === CARDS === */
.hj-card {
  background: var(--hj-surface);
  border: 1px solid var(--hj-border);
  border-radius: var(--hj-r-md);
  padding: 24px;
  transition: all var(--hj-d) var(--hj-ease);
}
.hj-card-glass {
  background: var(--hj-glass);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255,255,255,.5);
}
.hj-card-hover { cursor: pointer; }
.hj-card-hover:hover {
  transform: translateY(-4px);
  border-color: rgba(47,60,232,.3);
  box-shadow: var(--hj-shadow-card-hover);
}
.hj-card-grad {
  position: relative; background: var(--hj-surface); overflow: hidden;
}
.hj-card-grad::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--hj-primary-50), var(--hj-accent-50) 60%, var(--hj-violet-50));
  opacity: .55; z-index: 0;
}
.hj-card-grad > * { position: relative; z-index: 1; }

/* === FORMS === */
.hj-fg { margin-bottom: 16px; }
.hj-label {
  display: block; margin-bottom: 6px;
  font-size: 12px; font-weight: 700; color: var(--hj-text-3);
  letter-spacing: 0.02em;
}
.hj-input, .hj-select, .hj-textarea {
  width: 100%;
  padding: 12px 14px;
  background: var(--hj-surface);
  border: 1.5px solid var(--hj-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--hj-text);
  transition: all var(--hj-d-fast) var(--hj-ease);
}
.hj-input:focus, .hj-select:focus, .hj-textarea:focus {
  outline: none;
  border-color: var(--hj-primary);
  box-shadow: 0 0 0 4px var(--hj-primary-50);
}
.hj-textarea { resize: vertical; min-height: 110px; line-height: 1.7; }
.hj-input::placeholder, .hj-textarea::placeholder { color: var(--hj-text-muted); }

/* === SECTIONS === */
.hj-section { padding: 80px 0; position: relative; }
.hj-section-tight { padding: 56px 0; }
@media (max-width: 700px) {
  .hj-section { padding: 56px 0; }
  .hj-section-tight { padding: 40px 0; }
}

.hj-section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.hj-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  font-size: 12px; font-weight: 700;
  color: var(--hj-primary);
  background: var(--hj-primary-50);
  border-radius: var(--hj-r-pill);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}
.hj-h1 {
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--hj-text);
}
.hj-h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
  color: var(--hj-text);
}
.hj-h3 {
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 800;
  line-height: 1.4;
  letter-spacing: -0.02em;
  color: var(--hj-text);
}
.hj-lead {
  font-size: clamp(15px, 1.5vw, 17px);
  color: var(--hj-text-3);
  line-height: 1.75;
  margin-top: 14px;
}
.hj-grad-text {
  background: linear-gradient(135deg, var(--hj-primary), var(--hj-violet) 70%, var(--hj-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* === HERO + ANTI-GRAVITY === */
.hj-hero {
  position: relative;
  padding: 120px 0 80px;
  overflow: hidden;
  isolation: isolate;
}
.hj-hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 50% at 20% 20%, rgba(47,60,232,.12) 0%, transparent 60%),
    radial-gradient(50% 50% at 80% 30%, rgba(0,196,167,.10) 0%, transparent 60%),
    radial-gradient(70% 60% at 60% 90%, rgba(124,58,237,.10) 0%, transparent 60%);
}
.hj-hero-grid {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(11,18,32,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,18,32,.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 30%, transparent 80%);
}
.hj-blob {
  position: absolute; pointer-events: none; z-index: -1;
  filter: blur(60px); opacity: .6;
  border-radius: 50%;
  animation: hj-float-1 18s ease-in-out infinite;
}
.hj-blob-1 { width: 460px; height: 460px; background: var(--hj-primary); top: -10%; left: -8%; }
.hj-blob-2 { width: 380px; height: 380px; background: var(--hj-accent); top: 30%; right: -6%; animation-name: hj-float-2; animation-duration: 22s; }
.hj-blob-3 { width: 320px; height: 320px; background: var(--hj-violet); bottom: -10%; left: 30%; animation-name: hj-float-3; animation-duration: 26s; }

@keyframes hj-float-1 { 0%,100% { transform: translate(0,0) scale(1); } 33% { transform: translate(40px,-30px) scale(1.05); } 66% { transform: translate(-25px,40px) scale(.95); } }
@keyframes hj-float-2 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-30px,40px) scale(1.08); } }
@keyframes hj-float-3 { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(40px,-50px) scale(.92); } }

@keyframes hj-bob {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.hj-bob { animation: hj-bob 4s ease-in-out infinite; }

/* === REVEAL ON SCROLL === */
.hj-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--hj-ease-out), transform .7s var(--hj-ease-out); }
.hj-reveal.is-visible { opacity: 1; transform: translateY(0); }
.hj-reveal-delay-1 { transition-delay: .08s; }
.hj-reveal-delay-2 { transition-delay: .16s; }
.hj-reveal-delay-3 { transition-delay: .24s; }
.hj-reveal-delay-4 { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  .hj-reveal { opacity: 1; transform: none; transition: none; }
  .hj-blob, .hj-bob { animation: none; }
}

/* === GRIDS === */
.hj-grid { display: grid; gap: 20px; }
.hj-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hj-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hj-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.hj-grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
@media (max-width: 900px) {
  .hj-grid-3, .hj-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .hj-grid-2, .hj-grid-3, .hj-grid-4 { grid-template-columns: 1fr; }
  .hj-grid { gap: 14px; }
}

/* === FEATURE CARD (homepage) === */
.hj-feat {
  position: relative;
  background: var(--hj-surface);
  border: 1px solid var(--hj-border);
  border-radius: var(--hj-r-lg);
  padding: 28px;
  transition: all var(--hj-d) var(--hj-ease);
  overflow: hidden;
  isolation: isolate;
}
.hj-feat::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(135deg, transparent 60%, rgba(47,60,232,.04) 100%);
  opacity: 0; transition: opacity var(--hj-d) var(--hj-ease);
}
.hj-feat:hover {
  transform: translateY(-6px);
  border-color: rgba(47,60,232,.3);
  box-shadow: var(--hj-shadow-card-hover);
}
.hj-feat:hover::before { opacity: 1; }
.hj-feat-icon {
  width: 52px; height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--hj-primary-50), var(--hj-accent-50));
  border-radius: 14px;
  color: var(--hj-primary);
  margin-bottom: 18px;
}
.hj-feat-icon .hj-i { width: 26px; height: 26px; }
.hj-feat h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; letter-spacing: -0.02em; }
.hj-feat p { font-size: 14px; color: var(--hj-text-3); line-height: 1.7; }

/* === SUB-NAV CHIPS (categories) === */
.hj-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.hj-chip {
  padding: 9px 16px;
  font-size: 13px; font-weight: 600;
  color: var(--hj-text-2);
  background: var(--hj-surface);
  border: 1px solid var(--hj-border);
  border-radius: var(--hj-r-pill);
  transition: all var(--hj-d-fast) var(--hj-ease);
  white-space: nowrap;
}
.hj-chip:hover { border-color: var(--hj-primary); color: var(--hj-primary); }
.hj-chip[aria-current="page"], .hj-chip-active {
  background: var(--hj-primary); border-color: var(--hj-primary); color: #fff;
}

/* === STAT === */
.hj-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.hj-stat {
  background: var(--hj-surface);
  border: 1px solid var(--hj-border);
  border-radius: var(--hj-r);
  padding: 18px;
}
.hj-stat-num { font-size: 28px; font-weight: 900; color: var(--hj-primary); letter-spacing: -0.03em; }
.hj-stat-label { font-size: 12px; color: var(--hj-text-muted); margin-top: 4px; font-weight: 600; }

/* === NOTICE / ALERT === */
.hj-notice { padding: 12px 16px; border-radius: 10px; font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.hj-notice-info    { background: var(--hj-primary-50); color: var(--hj-primary-700); }
.hj-notice-success { background: var(--hj-success-50); color: #065F46; }
.hj-notice-warn    { background: var(--hj-warn-50); color: #92400E; }
.hj-notice-danger  { background: var(--hj-danger-50); color: #991B1B; }

/* === TABLE === */
.hj-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.hj-table thead th { text-align: left; padding: 12px 14px; font-weight: 700; color: var(--hj-text-3); background: var(--hj-bg-2); }
.hj-table tbody td { padding: 12px 14px; border-top: 1px solid var(--hj-border-2); }
.hj-table tbody tr:hover { background: var(--hj-bg-2); }

/* === LIST ROW (community/etc) === */
.hj-row {
  display: block;
  padding: 18px 22px;
  background: var(--hj-surface);
  border: 1px solid var(--hj-border);
  border-radius: var(--hj-r-md);
  margin-bottom: 10px;
  transition: all var(--hj-d-fast) var(--hj-ease);
  color: inherit;
}
.hj-row:hover { border-color: var(--hj-primary); transform: translateX(2px); box-shadow: var(--hj-shadow-2); }
.hj-row h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--hj-text); }
.hj-row p { font-size: 13px; color: var(--hj-text-3); line-height: 1.6; }
.hj-row-meta { display: flex; gap: 12px; font-size: 12px; color: var(--hj-text-muted); margin-top: 10px; flex-wrap: wrap; }

/* === EMPTY === */
.hj-empty {
  text-align: center; padding: 60px 24px;
  color: var(--hj-text-muted);
}
.hj-empty-icon {
  width: 56px; height: 56px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--hj-bg-2); border-radius: 50%;
  color: var(--hj-text-3);
}
.hj-empty h3 { font-size: 16px; font-weight: 700; color: var(--hj-text-2); margin-bottom: 6px; }

/* === FOOTER === */
.hj-footer {
  margin-top: 80px;
  padding: 56px 0 40px;
  border-top: 1px solid var(--hj-border);
  background: var(--hj-surface);
  color: var(--hj-text-3);
}
.hj-footer-cols { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 800px) { .hj-footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; } }
@media (max-width: 480px) { .hj-footer-cols { grid-template-columns: 1fr; } }
.hj-footer h4 { font-size: 13px; font-weight: 800; color: var(--hj-text); margin-bottom: 14px; letter-spacing: -0.01em; }
.hj-footer-link { display: block; padding: 6px 0; font-size: 13px; color: var(--hj-text-3); }
.hj-footer-link:hover { color: var(--hj-primary); }
.hj-footer-bot {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px;
  padding-top: 24px; border-top: 1px solid var(--hj-border);
  font-size: 12px;
}

/* === TOAST === */
.hj-toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--hj-text); color: #fff;
  padding: 14px 24px; border-radius: var(--hj-r-pill);
  font-size: 13px; font-weight: 700;
  box-shadow: 0 16px 40px -8px rgba(11,18,32,.3);
  opacity: 0; pointer-events: none;
  transition: all var(--hj-d) var(--hj-ease-out);
  z-index: 300;
  max-width: 90vw;
}
.hj-toast[data-show="true"] { opacity: 1; transform: translateX(-50%) translateY(0); }

/* === PAGE-SPECIFIC CLASS ALIASES (library/community/partners/my/ai/club/pay) === */
/* Library */
.lib-hero { max-width: var(--hj-container); margin: 0 auto; padding: 56px 24px 16px; }
.lib-hero h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.lib-hero p { color: var(--hj-text-3); font-size: 15px; line-height: 1.7; }
.lib-cats { max-width: var(--hj-container); margin: 0 auto; padding: 16px 24px 18px; display: flex; gap: 8px; overflow-x: auto; flex-wrap: wrap; }
.lib-cat { padding: 9px 16px; background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-pill); font-size: 13px; font-weight: 600; color: var(--hj-text-2); transition: all var(--hj-d-fast) var(--hj-ease); white-space: nowrap; }
.lib-cat:hover { border-color: var(--hj-primary); color: var(--hj-primary); }
.lib-cat.active { background: var(--hj-primary); border-color: var(--hj-primary); color: #fff; }
.lib-grid { max-width: var(--hj-container); margin: 0 auto; padding: 0 24px 60px; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.lib-card { background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-md); padding: 22px; transition: all var(--hj-d) var(--hj-ease); display: flex; flex-direction: column; gap: 10px; color: var(--hj-text); position: relative; text-decoration: none; }
.lib-card:hover { border-color: rgba(47,60,232,.3); transform: translateY(-3px); box-shadow: var(--hj-shadow-card-hover); }
.lib-card-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--hj-text-3); background: var(--hj-bg-2); padding: 4px 10px; border-radius: var(--hj-r-pill); width: fit-content; }
.lib-card h3 { font-size: 16px; font-weight: 800; line-height: 1.4; letter-spacing: -0.02em; }
.lib-card .desc { font-size: 13px; color: var(--hj-text-3); line-height: 1.6; flex: 1; }
.lib-card .meta { display: flex; gap: 10px; font-size: 11px; color: var(--hj-text-muted); padding-top: 8px; border-top: 1px solid var(--hj-border-2); }
.lib-lock { position: absolute; top: 14px; right: 14px; background: var(--hj-warn-50); color: #92400E; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: var(--hj-r-pill); display: inline-flex; align-items: center; gap: 4px; }
.lib-empty { max-width: 600px; margin: 60px auto; text-align: center; padding: 40px; color: var(--hj-text-muted); }

/* Community */
.com-hero { max-width: 1100px; margin: 0 auto; padding: 56px 24px 16px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 14px; }
.com-hero h1 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.com-hero p { color: var(--hj-text-3); font-size: 14px; }
.com-cats { max-width: 1100px; margin: 0 auto; padding: 0 24px 18px; display: flex; gap: 8px; overflow-x: auto; flex-wrap: wrap; }
.com-cat { padding: 9px 16px; background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-pill); font-size: 13px; font-weight: 600; color: var(--hj-text-2); white-space: nowrap; transition: all var(--hj-d-fast) var(--hj-ease); }
.com-cat:hover { border-color: var(--hj-primary); color: var(--hj-primary); }
.com-cat.active { background: var(--hj-primary); border-color: var(--hj-primary); color: #fff; }
.com-list { max-width: 880px; margin: 0 auto; padding: 0 24px 60px; }
.com-row { background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-md); padding: 18px 22px; margin-bottom: 10px; display: block; color: var(--hj-text); transition: all var(--hj-d-fast) var(--hj-ease); text-decoration: none; }
.com-row:hover { border-color: var(--hj-primary); transform: translateX(2px); box-shadow: var(--hj-shadow-2); }
.com-row .meta-top { display: flex; gap: 10px; font-size: 12px; color: var(--hj-text-3); margin-bottom: 6px; align-items: center; flex-wrap: wrap; }
.com-row .cat-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; padding: 3px 9px; background: var(--hj-bg-2); border-radius: var(--hj-r-pill); }
.com-row h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; color: var(--hj-text); letter-spacing: -0.015em; }
.com-row .preview { font-size: 13px; color: var(--hj-text-3); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.6; }
.com-row .meta-bot { display: flex; gap: 14px; font-size: 12px; color: var(--hj-text-muted); margin-top: 10px; }
.empty { text-align: center; padding: 60px 24px; color: var(--hj-text-muted); }
.write-area { max-width: 760px; margin: 0 auto; padding: 24px; background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-lg); }
.write-area h2 { font-size: 18px; font-weight: 800; margin-bottom: 16px; letter-spacing: -0.02em; }
.fg { margin-bottom: 14px; }
.fg label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 6px; color: var(--hj-text-3); }
.fg input, .fg select, .fg textarea { width: 100%; padding: 12px; border: 1.5px solid var(--hj-border); border-radius: 10px; font-family: inherit; font-size: 14px; background: var(--hj-surface); color: var(--hj-text); transition: border-color var(--hj-d-fast) var(--hj-ease); }
.fg input:focus, .fg select:focus, .fg textarea:focus { outline: none; border-color: var(--hj-primary); box-shadow: 0 0 0 4px var(--hj-primary-50); }
.fg textarea { resize: vertical; min-height: 200px; line-height: 1.7; }
.notice { background: var(--hj-warn-50); color: #92400E; padding: 12px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 18px; line-height: 1.7; }
.err { background: var(--hj-danger-50); color: #991B1B; padding: 12px 14px; border-radius: 10px; font-size: 13px; margin-bottom: 14px; }
.post-detail { max-width: 760px; margin: 0 auto; padding: 32px 24px 60px; }
.post-meta { display: flex; gap: 12px; font-size: 13px; color: var(--hj-text-3); margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.post-detail h1 { font-size: clamp(22px, 3vw, 28px); font-weight: 800; margin-bottom: 14px; line-height: 1.4; letter-spacing: -0.025em; }
.post-body { font-size: 15px; line-height: 1.9; white-space: pre-wrap; color: var(--hj-text); background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-md); padding: 24px; margin-bottom: 18px; }
.post-actions { display: flex; gap: 8px; margin-bottom: 32px; align-items: center; flex-wrap: wrap; }
.like-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; background: var(--hj-surface); border: 1.5px solid var(--hj-border); border-radius: var(--hj-r-pill); cursor: pointer; font-family: inherit; font-size: 13px; font-weight: 600; color: var(--hj-text-3); transition: all var(--hj-d-fast) var(--hj-ease); }
.like-btn:hover { border-color: var(--hj-danger); color: var(--hj-danger); }
.like-btn.liked { background: var(--hj-danger); border-color: var(--hj-danger); color: #fff; }
.delete-btn { padding: 9px 14px; background: none; border: 1.5px solid var(--hj-border); border-radius: var(--hj-r-pill); cursor: pointer; font-family: inherit; font-size: 12px; color: var(--hj-text-muted); }
.delete-btn:hover { color: var(--hj-danger); border-color: var(--hj-danger); }
.comments-h { font-size: 14px; font-weight: 800; margin-bottom: 14px; color: var(--hj-text); letter-spacing: -0.01em; }
.cmt { background: var(--hj-surface); border: 1px solid var(--hj-border-2); border-radius: 12px; padding: 14px 18px; margin-bottom: 8px; }
.cmt-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--hj-text-muted); margin-bottom: 6px; }
.cmt-author { font-weight: 700; color: var(--hj-text-3); }
.cmt-body { font-size: 14px; line-height: 1.7; white-space: pre-wrap; color: var(--hj-text); }
.cmt-form { display: flex; gap: 8px; margin-top: 14px; }
.cmt-form textarea { flex: 1; padding: 12px; border: 1.5px solid var(--hj-border); border-radius: 10px; font-family: inherit; font-size: 14px; resize: vertical; min-height: 80px; }
.author-tag { display: inline-block; background: var(--hj-primary-50); color: var(--hj-primary); font-size: 10px; font-weight: 800; padding: 2px 7px; border-radius: 6px; margin-left: 4px; }

/* Partners */
.p-hero { max-width: var(--hj-container); margin: 0 auto; padding: 56px 24px 12px; }
.p-hero h1 { font-size: clamp(28px, 4vw, 38px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.p-hero p { color: var(--hj-text-3); font-size: 15px; line-height: 1.7; }
.p-hero .promise { display: inline-block; margin-top: 12px; padding: 8px 16px; background: linear-gradient(90deg, var(--hj-warn-50), #FDE68A); border-radius: var(--hj-r-pill); font-size: 13px; font-weight: 700; color: #92400E; }
.p-cats { max-width: var(--hj-container); margin: 0 auto; padding: 18px 24px; display: flex; gap: 8px; overflow-x: auto; flex-wrap: wrap; }
.p-cat { padding: 9px 16px; background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-pill); font-size: 13px; font-weight: 600; color: var(--hj-text-2); transition: all var(--hj-d-fast) var(--hj-ease); white-space: nowrap; }
.p-cat:hover { border-color: var(--hj-primary); color: var(--hj-primary); }
.p-cat.active { background: var(--hj-primary); border-color: var(--hj-primary); color: #fff; }
.p-grid { max-width: var(--hj-container); margin: 0 auto; padding: 0 24px 60px; display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.p-card { background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-lg); padding: 22px; transition: all var(--hj-d) var(--hj-ease); display: flex; flex-direction: column; color: var(--hj-text); position: relative; text-decoration: none; }
.p-card:hover { border-color: rgba(47,60,232,.3); transform: translateY(-3px); box-shadow: var(--hj-shadow-card-hover); }
.p-card-cat { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: var(--hj-text-3); background: var(--hj-bg-2); padding: 4px 10px; border-radius: var(--hj-r-pill); width: fit-content; margin-bottom: 10px; }
.p-card-name { font-size: 18px; font-weight: 800; margin-bottom: 6px; letter-spacing: -0.015em; }
.p-card-summary { font-size: 13px; color: var(--hj-text-3); line-height: 1.6; flex: 1; margin-bottom: 14px; }
.p-card-meta { display: flex; gap: 10px; font-size: 11px; color: var(--hj-text-muted); padding-top: 10px; border-top: 1px solid var(--hj-border-2); align-items: center; }
.p-card-coupons { display: inline-flex; align-items: center; gap: 4px; background: var(--hj-success-50); color: #065F46; font-weight: 800; padding: 3px 9px; border-radius: var(--hj-r-pill); font-size: 11px; }

/* My (sidebar layout) */
.my-wrap { max-width: 1100px; margin: 0 auto; padding: 32px 24px 60px; }
.my-side { display: grid; grid-template-columns: 240px 1fr; gap: 28px; }
@media (max-width: 760px) { .my-side { grid-template-columns: 1fr; } }
.my-menu { background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-md); padding: 14px; height: fit-content; position: sticky; top: 88px; }
.my-menu a { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 14px; font-weight: 600; color: var(--hj-text-3); border-radius: 10px; margin-bottom: 2px; text-decoration: none; transition: all var(--hj-d-fast) var(--hj-ease); }
.my-menu a:hover { background: var(--hj-bg-2); color: var(--hj-text); }
.my-menu a.active { background: var(--hj-primary-50); color: var(--hj-primary); }
.my-h1 { font-size: clamp(22px, 3vw, 26px); font-weight: 800; margin-bottom: 18px; letter-spacing: -0.025em; }
.tier-card { background: linear-gradient(135deg, var(--hj-primary) 0%, var(--hj-violet) 100%); color: #fff; border-radius: var(--hj-r-lg); padding: 24px; margin-bottom: 18px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 14px; box-shadow: 0 12px 28px -10px rgba(47,60,232,.45); }
.tier-card h2 { font-size: 13px; font-weight: 600; opacity: .85; margin-bottom: 4px; }
.tier-card .tier-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.tier-card .upgrade-link { padding: 10px 18px; background: rgba(255,255,255,.2); border-radius: 10px; color: #fff; font-weight: 700; font-size: 13px; backdrop-filter: blur(10px); transition: all var(--hj-d-fast) var(--hj-ease); text-decoration: none; }
.tier-card .upgrade-link:hover { background: rgba(255,255,255,.3); color: #fff; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r); padding: 16px; }
.stat-card .num { font-size: 24px; font-weight: 800; color: var(--hj-primary); letter-spacing: -0.02em; }
.stat-card .label { font-size: 12px; color: var(--hj-text-muted); margin-top: 2px; font-weight: 600; }
.card { background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-md); padding: 24px; margin-bottom: 18px; }
.card h2 { font-size: 16px; font-weight: 800; margin-bottom: 14px; letter-spacing: -0.015em; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.tree-item { display: flex; gap: 8px; align-items: center; background: var(--hj-bg-2); padding: 10px 12px; border-radius: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.tree-item input.label { flex: 1; min-width: 120px; background: var(--hj-surface); border: 1.5px solid var(--hj-border); padding: 8px 10px; border-radius: 8px; font-family: inherit; font-size: 13px; }
.tree-item input.url { flex: 2; min-width: 180px; background: var(--hj-surface); border: 1.5px solid var(--hj-border); padding: 8px 10px; border-radius: 8px; font-family: inherit; font-size: 13px; }
.tree-item input.icon { width: 60px; background: var(--hj-surface); border: 1.5px solid var(--hj-border); padding: 8px; border-radius: 8px; font-family: inherit; font-size: 18px; text-align: center; }
.tree-item button { background: none; border: 1.5px solid var(--hj-border); border-radius: 8px; width: 32px; height: 32px; font-size: 14px; cursor: pointer; }
.tree-item button:hover { border-color: var(--hj-primary); color: var(--hj-primary); }

/* AI */
.ai-hero { max-width: 1100px; margin: 0 auto; padding: 40px 24px 12px; }
.ai-hero h1 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.ai-hero p { color: var(--hj-text-3); font-size: 14px; line-height: 1.7; }
.ai-tag { display: inline-block; background: linear-gradient(90deg, var(--hj-violet), var(--hj-primary)); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: var(--hj-r-pill); margin-bottom: 8px; letter-spacing: 0.04em; }
.ai-tabs { max-width: 1100px; margin: 0 auto; padding: 14px 24px; display: flex; gap: 8px; flex-wrap: wrap; }
.ai-tab { padding: 10px 18px; background: var(--hj-surface); border: 1px solid var(--hj-border); border-radius: var(--hj-r-pill); font-size: 13px; font-weight: 600; color: var(--hj-text-3); transition: all var(--hj-d-fast) var(--hj-ease); text-decoration: none; }
.ai-tab:hover { border-color: var(--hj-primary); color: var(--hj-primary); }
.ai-tab.active { background: var(--hj-primary); border-color: var(--hj-primary); color: #fff; }

/* Club */
.club-hero { max-width: 1100px; margin: 0 auto; padding: 40px 24px 12px; }
.club-hero h1 { font-size: clamp(26px, 3.5vw, 34px); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 6px; }
.club-hero p { color: var(--hj-text-3); font-size: 14px; line-height: 1.7; }
.club-tag { display: inline-block; background: linear-gradient(90deg, var(--hj-violet), var(--hj-primary)); color: #fff; font-size: 11px; font-weight: 800; padding: 4px 10px; border-radius: var(--hj-r-pill); margin-bottom: 8px; letter-spacing: 0.04em; }

/* === LEGACY SHIMS (for pages still using old class names) === */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; font-family: inherit; text-decoration: none; transition: all var(--hj-d-fast) var(--hj-ease); }
.btn-primary { background: var(--hj-primary); color: #fff; }
.btn-primary:hover { background: var(--hj-primary-600); color: #fff; }
.btn-outline { background: var(--hj-surface); color: var(--hj-text); border: 1.5px solid var(--hj-border); }
.btn-outline:hover { border-color: var(--hj-primary); color: var(--hj-primary); }
.btn-emerald, .btn-accent { background: var(--hj-accent); color: #fff; }
.btn-amber { background: var(--hj-warn); color: #fff; }
.btn-violet { background: var(--hj-violet); color: #fff; }
.btn-rose, .btn-danger { background: var(--hj-danger); color: #fff; }
.btn-disabled { background: var(--hj-bg-2); color: var(--hj-text-muted); cursor: not-allowed; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.tier-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 6px; letter-spacing: .02em; }
.tier-free { background: #F1F5F9; color: #475569; }
.tier-basic { background: #DBEAFE; color: #1E3A8A; }
.tier-premium { background: linear-gradient(135deg,#FBBF24,#F59E0B); color: #4C1D02; }
.tier-vip { background: linear-gradient(135deg, var(--hj-violet), var(--hj-primary)); color: #fff; }
