  :root {
      --bg: #ffffff;
      --font-family: 'ONEMobilePOP', sans-serif;
      --surface: #99ce94;
      --card: #f5fce7;
      --accent: #000000;
      --accentb: #fad957;
      --accent2: #e67e22;
      --text: #2c1810;
      --text-muted: #8c6b5a;
      --border: #ffffff;
      --tag-bg: #fef0e7;
      --shadow: 0 4px 24px rgba(44, 24, 16, 0.08);
      --filter-id: url(#glass-distortion);
      --glass-tint: 255, 255, 255;
      --glass-tint-opacity: 0.35;
      --activebtn: #efbb38;
  }

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

  html {
      overflow-x: hidden;
  }

  @font-face {
      font-family: 'Hungeul';
      src: url('fonts/hungeul.woff') format('woff');
      font-weight: normal;
      font-style: normal;
      font-display: swap;
  }

  @font-face {
      font-family: 'ONEMobilePOP';
      src: url('fonts/ONEMobilePOP.woff') format('woff');
      font-weight: normal;
      font-style: normal;
      font-display: swap;
  }

  body {
      background: var(--bg);
      font-family: var(--font-family);
      color: var(--text);
      min-height: 100vh;
      padding: 100px 10px 60px;
      overflow-x: hidden;
  }

  /* ── 배경 장식 ── */
  body::before {
      content: '';

      position: fixed;
      inset: 0;
      pointer-events: none;
      z-index: 1;
  }

  /* ── 헤더 ── */
  header {
      max-width: 740px;
      margin: 9px 90px 40px;
      text-align: center;
      animation: fadeDown .6s ease both;
  }

  .home-content {
      max-width: 760px;
      margin: 0 auto;
  }

  .home-content > header {
      margin: 9px auto 40px;
  }

  .notice-panel {
      margin: 24px auto 0;
      padding: 22px 24px;
      background: var(--card);
      border: 10px solid var(--border);
      border-radius: 16px;
      box-shadow: var(--shadow);
  }

  .notice-panel-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding-bottom: 14px;
      border-bottom: 1px solid var(--border);
  }

  .notice-panel-heading h2 {
      font-size: 1.1rem;
      color: var(--text);
  }

  .notice-panel-heading a {
      color: var(--accent);
      font-size: .8rem;
      text-decoration: none;
      white-space: nowrap;
  }

  .notice-items {
      list-style: none;
  }

  .notice-items li {
      border-bottom: 1px solid var(--border);
  }

  .notice-items li:last-child {
      border-bottom: 0;
  }

  .notice-items a {
      display: block;
      padding: 14px 2px;
      color: var(--text);
      font-size: .92rem;
      line-height: 1.5;
      text-decoration: none;
  }

  .notice-items a:hover {
      color: var(--accent);
  }

  .notice-items a {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 12px;
  }

  .notice-title {
      min-width: 0;
      word-break: keep-all;
      overflow-wrap: break-word;
  }

  .notice-date {
      flex: none;
      color: var(--text-muted);
      font-size: .78rem;
      font-variant-numeric: tabular-nums;
  }

  .notice-state {
      padding: 28px 8px;
      color: var(--text-muted);
      font-size: .9rem;
      text-align: center;
  }

  header h1 {
      font-size: clamp(1.8rem, 5vw, 2.6rem);
      font-weight: 700;
      line-height: 1.2;
      color: var(--text);
  }

  header p {
      margin-top: 10px;
      font-size: .88rem;
      color: var(--text-muted);
      font-weight: 300;
  }

  /* ── 검색 패널 ── */
  .search-panel {
      max-width: 760px;
      margin: 10px auto 32px;
      background: var(--card);
      border: 5px solid var(--border);
      border-radius: 20px;
      padding: 28px 30px;
      box-shadow: var(--shadow);
      animation: fadeUp .6s .1s ease both;
      z-index: 10;
  }

  .search-grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 14px;
  }

  @media(max-width:520px) {
      .search-grid {
          grid-template-columns: 1fr;
      }
  }

  .field label {
      display: block;
      font-size: .75rem;
      font-weight: 500;
      color: var(--text-muted);
      letter-spacing: .06em;
      text-transform: uppercase;
      z-index: 10;
      margin-bottom: 6px;
  }

  .field input,
  .field select {
      width: 100%;
      padding: 11px 14px;
      border: 1.5px solid var(--border);
      border-radius: 10px;
      background: var(--surface);
      font-family: var(--font-family);
      font-size: .9rem;
      color: var(--text);
      outline: none;
      transition: border-color .2s;
  }

  .field input:focus,
  .field select:focus {
      border-color: var(--accent2);
  }

  .search-actions {
      margin-top: 18px;
      display: flex;
      z-index: 10;
      gap: 10px;
      align-items: center;
      flex-wrap: wrap;
  }

  .btn-primary {
      background: var(--accentb);
      color: #fff;
      border: 1.5px solid var(--activebtn);
      border-radius: 10px;
      padding: 12px 29px;
      font-family: var(--font-family);
      font-size: .9rem;
      font-weight: 500;
      cursor: pointer;
      transition: background .2s, transform .1s;
  }

  .btn-primary:hover {
      background: #efbb38;
  }

  .btn-primary:active {
      transform: scale(.97);
  }

  .btn-secondary {
      background: transparent;
      color: var(--text-muted);
      border: 1.5px solid var(--border);
      border-radius: 10px;
      padding: 11px 20px;
      font-family: var(--font-family);
      font-size: .88rem;
      cursor: pointer;
      transition: border-color .2s;
  }

  .btn-secondary:hover {
      border-color: var(--accent2);
      color: var(--text);
  }

  .api-hint {
      font-size: .75rem;
      color: var(--text-muted);
      margin-top: 12px;
      line-height: 1.6;
  }

  .api-hint a {
      color: var(--accent2);
      text-decoration: none;
  }

  .api-hint a:hover {
      text-decoration: underline;
  }

  /* ── 결과 영역 ── */
  #result {
      max-width: 760px;
      margin: 0 auto;
      z-index: 10;
  }

  /* ── 날짜 네비게이션 ── */
  .date-nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 20px;
      animation: fadeUp .4s ease both;
  }

  .date-nav-title {
      font-family: var(--font-family);
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--text);
  }

  .date-nav-btn {
      background: var(--card);
      border: 1.5px solid var(--border);
      border-radius: 8px;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 1rem;
      color: var(--text-muted);
      transition: border-color .2s, color .2s;
  }

  .date-nav-btn:hover {
      border-color: var(--accent2);
      color: var(--text);
  }

  /* ── 급식 카드 ── */
  .meal-card {
      background: var(--card);
      border: 6px solid var(--border);
      border-radius: 20px;
      overflow: hidden;
      box-shadow: var(--shadow);
      margin-bottom: 20px;
      animation: fadeUp .5s ease both;
  }

  .meal-card-header {
      display: flex;
      align-items: center;
      gap: 14px;
      padding: 18px 24px;
      border-bottom: 1px solid var(--border);
      background: var(--surface);
  }

  .type-조식 {
      background: #fff3e0;
  }

  .type-중식 {
      background: #fce4ec;
  }

  .type-석식 {
      background: #e8f5e9;
  }

  .meal-card-title {
      font-family: var(--font-family);
      font-size: 1.1rem;
      font-weight: 600;
  }

  .meal-card-date {
      font-size: .78rem;
      color: var(--text-muted);
      margin-top: 2px;
  }

  .meal-card-body {
      padding: 20px 24px;
  }

  /* 메뉴 리스트 */
  .menu-list {
      list-style: none;
      display: flex;
      flex-direction: column;
      gap: 10px;
      margin-bottom: 20px;
  }

  .menu-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
  }

  .menu-name {
      font-size: .92rem;
      font-weight: 400;
      flex: 1;
  }

  .menu-allergen {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: .72rem;
      line-height: 1.2;
      color: var(--text-muted);
      background: var(--tag-bg);
      border-radius: 6px;
      padding: 2px 7px;
      flex-shrink: 0;
  }

  .menu-separator {
      height: 1px;
      background: var(--border);
      margin: 6px 0;
  }

  /* 영양 정보 */
  .nutrition-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
      gap: 10px;
      border-top: 1px solid var(--border);
      padding-top: 16px;
  }

  .nutrition-item {
      background: var(--surface);
      border-radius: 8px;
      padding: 10px 12px;
      text-align: center;
  }

  .nutrition-label {
      font-size: .7rem;
      color: var(--text-muted);
      letter-spacing: .04em;
      margin-bottom: 4px;
  }

  .nutrition-value {
      font-size: .95rem;
      font-weight: 600;
      color: var(--accent);
  }

  .nutrition-unit {
      font-size: .68rem;
      color: var(--text-muted);
      font-weight: 400;
  }

  /* ── 상태 메시지 ── */
  .state-box {
      text-align: center;
      padding: 60px 20px;
      color: var(--text-muted);
      animation: fadeUp .4s ease both;
  }

  .state-box .state-icon {
      font-size: 3rem;
      margin-bottom: 12px;
  }

  .state-box p {
      font-size: .9rem;
      line-height: 1.7;
  }

  /* ── 로딩 스피너 ── */
  .spinner {
      width: 36px;
      height: 36px;
      border: 3px solid var(--border);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .7s linear infinite;
      margin: 0 auto 14px;
  }

  /* ── 코드 예시 패널 ── */
  .code-panel {
      max-width: 760px;
      margin: 40px auto 0;
      background: #1e1410;
      border-radius: 16px;
      overflow: hidden;
      box-shadow: var(--shadow);
      animation: fadeUp .6s .3s ease both;
  }

  .code-panel-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 220px;
      background: #2c1c14;
      border-bottom: 1px solid #3d2a1e;
  }

  .code-panel-title {
      font-size: .8rem;
      color: #e8c9a0;
      font-weight: 500;
      letter-spacing: .08em;
      text-transform: uppercase;
  }

  .dot-row {
      display: flex;
      gap: 6px;
  }

  .dot {
      width: 10px;
      height: 10px;
      border-radius: 50%;
  }

  .dot-r {
      background: #c0392b;
  }

  .dot-y {
      background: #e67e22;
  }

  .dot-g {
      background: #27ae60;
  }

  pre {
      padding: 20px 24px;
      font-size: .78rem;
      line-height: 1.7;
      color: #d4a88a;
      overflow-x: auto;
      font-family: 'Fira Code', 'Courier New', monospace;
  }

  .kw {
      color: #e74c3c;
  }

  .fn {
      color: #f39c12;
  }

  .str {
      color: #2ecc71;
  }

  .cm {
      color: #7f8c8d;
  }

  .vr {
      color: #3498db;
  }

  /* ── 알레르기 범례 ── */
  .allergen-legend {
      max-width: 760px;
      margin: 24px auto 0;
      background: var(--card);
      border: 6px solid var(--border);
      border-radius: 16px;
      padding: 20px 24px;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
      animation: fadeUp .6s .2s ease both;
  }

  .allergen-legend h3 {
      font-size: .78rem;
      font-weight: 500;
      color: var(--text-muted);
      text-transform: uppercase;
      letter-spacing: .1em;
      margin-bottom: 12px;
  }

  .allergen-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 7px;
  }

  .allergen-tag {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      font-size: .72rem;
      line-height: 1.2;
      background: var(--tag-bg);
      border: 1px solid var(--border);
      border-radius: 6px;
      padding: 3px 9px;
      color: var(--text-muted);
  }

  /* Base Navbar Styles — Liquid Glass */
  .navbar {
      display: flex;
      position: fixed;
      top: 10px;
      left: 10px;
      right: 10px;
      justify-content: space-between;
      align-items: center;
      padding: 1rem 2rem 1rem;
      border-radius: 40px;
      color: black;
      z-index: 1000;
      isolation: isolate;
      transition: box-shadow .3s ease;
  }

  /* Layer 1: the refractive glass body itself (blur + distortion + saturation) */
  .navbar::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 40px;
      background: rgba(var(--glass-tint), var(--glass-tint-opacity));
      -webkit-backdrop-filter: var(--filter-id, url(#glass-distortion)) blur(14px) saturate(180%);
      backdrop-filter: var(--filter-id, url(#glass-distortion)) blur(14px) saturate(180%);
      z-index: -2;
  }

  /* Layer 2: specular highlights and depth — sits above the blur, below content */
  .navbar::after {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 40px;
      pointer-events: none;
      background: linear-gradient(180deg, rgba(255, 255, 255, 0.5) 0%, rgba(255, 255, 255, 0) 40%);
      box-shadow:
          inset 0 1px 1px 0 rgba(255, 255, 255, 0.75),
          inset 0 -1px 1px 0 rgba(255, 255, 255, 0.25),
          inset 0 0 12px 2px rgba(255, 255, 255, 0.18),
          0 8px 32px rgba(17, 17, 26, 0.12),
          0 2px 8px rgba(17, 17, 26, 0.08);
      border: 1px solid rgba(255, 255, 255, 0.35);
      mix-blend-mode: normal;
      z-index: -1;
  }

  .navbar:hover::after {
      box-shadow:
          inset 0 1px 1px 0 rgba(255, 255, 255, 0.85),
          inset 0 -1px 1px 0 rgba(255, 255, 255, 0.3),
          inset 0 0 16px 3px rgba(255, 255, 255, 0.22),
          0 10px 36px rgba(17, 17, 26, 0.14),
          0 2px 8px rgba(17, 17, 26, 0.08);
  }

  .nav-menu {
      z-index: 1;
      display: flex;
      align-items: center;
      margin: 0;
      list-style: none;
      gap: 2.5rem;
  }

  .nav-menu > li {
      display: flex;
      align-items: center;
  }

  .nav-menu a {
      color: black;
      text-decoration: none;
      z-index: 1001;
  }

  /* Hide Hamburger Button on Desktop */
  .hamburger {
      display: none;
      cursor: pointer;
      border: none;
      flex-direction: column;
      gap: 5px;
  }

  .bar {
      display: block;
      width: 20px;
      height: 3px;
      background-color: black;
      transition: all 0.3s ease;
  }

  /* ── 폰트 전환기 ── */
  .font-switcher {
      display: flex;
      align-items: center;
      gap: 8px;
  }

  .font-switcher-label {
      font-size: .82rem;
      color: black;
      white-space: nowrap;
  }

  #font-select {
      appearance: none;
      -webkit-appearance: none;
      border: 1px solid rgba(0,0,0,.14);
      background: rgba(255,255,255,.5);
      color: black;
      border-radius: 10px;
      padding: 7px 28px 7px 10px;
      font-family: var(--font-family);
      font-size: .8rem;
      outline: none;
      cursor: pointer;
  }

  #font-select:focus {
      border-color: var(--accent2);
  }

  /* Mobile Screen Layout (Widths less than 768px) */
  @media (max-width: 768px) {
      .hamburger {
          display: flex;
          z-index: 1001;
      }

      /* Slide-out Menu Container */
      .nav-menu::before {
          content: '';
          position: absolute;
          inset: 0;
          background: rgba(var(--glass-tint), 0.55);
          -webkit-backdrop-filter: blur(18px) saturate(180%);
          backdrop-filter: blur(18px) saturate(180%);
          border-radius: 45px;
          border: 1px solid rgba(255, 255, 255, 0.35);
          box-shadow:
              inset 0 1px 1px 0 rgba(255, 255, 255, 0.7),
              inset 0 0 12px 2px rgba(255, 255, 255, 0.15),
              -8px 0 32px rgba(17, 17, 26, 0.12);
      }

      .nav-menu {
          position: fixed;
          z-index: 1000;
          right: -100%;
          top: 0;
          flex-direction: column;
          border-radius: 45px;
          width: 60%;
          height: 100vh;
          padding-top: 5rem;
          gap: 3rem;
          transition: 0.3s ease;
          box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
      }

      .nav-menu li {
          width: 100%;
          padding: 5px 12px;
          z-index: 1002;
      }

      .font-switcher {
          width: 100%;
          justify-content: space-between;
          padding: 0 4px;
      }

      #font-select {
          flex: 1;
          max-width: 160px;
      }

      /* State when menu is toggled active */
      .nav-menu.active {
          right: 5%;
      }

      /* Hamburger to "X" Morphing Animations */
      .hamburger.active .bar:nth-child(1) {
          transform: translateY(8px) rotate(45deg);
      }

      .hamburger.active .bar:nth-child(2) {
          opacity: 0;
      }

      .hamburger.active .bar:nth-child(3) {
          transform: translateY(-8px) rotate(-45deg);
      }
  }

  /* ── 애니메이션 ── */
  @keyframes fadeDown {
      from {
          opacity: 0;
          transform: translateY(-16px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes fadeUp {
      from {
          opacity: 0;
          transform: translateY(16px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes spin {
      to {
          transform: rotate(360deg);
      }
  }

  .glass-surface__filter {
      pointer-events: none;
      opacity: 0;
      z-index: -1;
      width: 100%;
      height: 100%;
      position: absolute;
      inset: 0;
  }
