      :root {
        --bg-1: #eef3ff;
        --bg-2: #d9e4fb;
        --card: #ffffff;
        --text: #122136;
        --muted: #4f607a;
        --accent: #1f5fd0;
        --accent-hover: #174ba6;
        --border: #d3ddf1;
        --shadow: 0 18px 40px rgba(21, 41, 74, 0.12);
        --switch-track: #c8d6f3;
        --switch-knob: #ffffff;
        --tool-fg: #111111;
        --tool-fg-muted: #2a2a2a;
        --menu-bg: #ffffff;
        --menu-shadow: 0 14px 28px rgba(16, 36, 72, 0.2);
        --social-icon-size: 26px;
      }

      body.dark-mode {
        --bg-1: #12161f;
        --bg-2: #1c2433;
        --card: #1a2332;
        --text: #e7edf8;
        --muted: #b8c4dc;
        --accent: #7aa8ff;
        --accent-hover: #9dbdff;
        --border: #33435f;
        --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
        --switch-track: #3a4e73;
        --switch-knob: #d9e6ff;
        --tool-fg: #f2f4f8;
        --tool-fg-muted: #f2f4f8;
        --menu-bg: #202b3d;
        --menu-shadow: 0 16px 30px rgba(0, 0, 0, 0.42);
      }

      * {
        box-sizing: border-box;
      }

      body {
        margin: 0;
        min-height: 100vh;
        font-family: "Segoe UI", "Avenir Next", "Helvetica Neue", sans-serif;
        color: var(--text);
        background:
          radial-gradient(circle at 22% 10%, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 46%),
          linear-gradient(145deg, var(--bg-1), var(--bg-2));
        display: grid;
        place-items: center;
        padding: 24px;
        transition: background 0.25s ease, color 0.25s ease;
      }

      body.dark-mode {
        background:
          radial-gradient(circle at 22% 10%, rgba(120, 146, 194, 0.2), rgba(255, 255, 255, 0) 46%),
          linear-gradient(145deg, var(--bg-1), var(--bg-2));
      }

      .app {
        width: min(860px, 100%);
        background: var(--card);
        border: 1px solid var(--border);
        border-radius: 18px;
        box-shadow: var(--shadow);
        overflow: hidden;
        transition: background 0.25s ease, border-color 0.25s ease;
      }

      .top {
        padding: 22px 24px 18px;
        border-bottom: 1px solid var(--border);
        background: linear-gradient(180deg, rgba(249, 251, 255, 0.92), rgba(241, 246, 255, 0.92));
        text-align: center;
        transition: border-color 0.25s ease;
      }

      body.dark-mode .top {
        background: linear-gradient(180deg, rgba(30, 40, 57, 0.9), rgba(24, 33, 48, 0.9));
      }

      #site-title {
        margin: 0;
        font-size: clamp(1.2rem, 2.2vw, 1.5rem);
        letter-spacing: 0.01em;
      }

      #progress-text {
        margin: 6px 0 0;
        color: var(--muted);
        font-size: 0.95rem;
      }

      .content {
        padding: 24px;
      }

      #milestone-title {
        margin: 0 0 18px;
        text-align: center;
        font-size: clamp(1.6rem, 3vw, 2rem);
      }

      .milestone-image-wrap {
        display: flex;
        justify-content: center;
        margin-bottom: 14px;
      }

      #milestone-image {
        width: 150px;
        height: 150px;
        object-fit: contain;
        display: block;
        background: transparent;
      }

      .fact {
        margin: 0;
        line-height: 1.64;
        color: var(--text);
        font-size: 1.04rem;
      }

      .fact + .fact {
        margin-top: 14px;
      }

      .controls {
        margin-top: 26px;
        display: grid;
        gap: 14px;
        justify-items: center;
      }

      .nav {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 14px;
      }

      .social-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        flex-wrap: nowrap;
      }

      .share-btn,
      .gift-btn {
        appearance: none;
        border: none;
        width: 42px;
        height: 42px;
        border-radius: 10px;
        background: transparent;
        color: var(--tool-fg);
        font-size: 0;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: transform 0.2s ease, opacity 0.2s ease;
      }

      .share-btn:hover,
      .gift-btn:hover {
        opacity: 0.8;
        transform: translateY(-1px);
      }

      .gift-wrap {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }

      .gift-wrap[hidden] {
        display: none !important;
      }

      .gift-wrap .gift-menu {
        position: absolute;
        top: 0;
        right: 100%;
        left: auto;
        transform: none;
        display: flex;
        flex-direction: column;
        gap: 6px;
        min-width: 190px;
        padding: 8px;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--menu-bg);
        box-shadow: var(--menu-shadow);
        z-index: 12;
      }

      .gift-menu[hidden] {
        display: none !important;
      }

      .gift-item {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        text-decoration: none;
        color: var(--text);
        padding: 8px 10px;
        border-radius: 8px;
        border: 1px solid transparent;
        font-size: 0.95rem;
        line-height: 1.25;
        white-space: nowrap;
      }

      .gift-item:hover {
        background: rgba(127, 149, 185, 0.16);
        border-color: var(--border);
      }

      @media (hover: hover) and (pointer: fine) {
        .gift-item:hover {
          background: rgba(76, 128, 210, 0.24);
          border-color: rgba(76, 128, 210, 0.45);
        }

        body.dark-mode .gift-item:hover {
          background: rgba(144, 177, 232, 0.24);
          border-color: rgba(175, 200, 242, 0.5);
        }
      }

      .gift-item-icon {
        width: 1.2rem;
        text-align: center;
      }

      #share-facebook-btn {
        position: relative;
        color: transparent;
        font-size: 0;
      }

      #share-facebook-btn::before {
        content: "";
        width: var(--social-icon-size);
        height: var(--social-icon-size);
        border-radius: 999px;
        display: inline-flex;
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        background-image: url("icons/facebook-light.svg");
      }

      body.dark-mode #share-facebook-btn::before {
        width: calc(var(--social-icon-size) * 0.8);
        height: calc(var(--social-icon-size) * 0.8);
        border-radius: 0;
        background-image: url("icons/facebook-dark.svg");
      }

      #share-x-btn {
        position: relative;
      }

      #share-x-btn::before {
        content: "";
        width: var(--social-icon-size);
        height: var(--social-icon-size);
        display: inline-flex;
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
        background-image: url("icons/x-light.svg");
      }

      body.dark-mode #share-x-btn::before {
        background-image: url("icons/x-dark.svg");
      }

      #share-email-btn,
      #copy-link-btn,
      #gift-menu-btn {
        position: relative;
      }

      #share-email-btn::before,
      #copy-link-btn::before {
        content: "";
        width: var(--social-icon-size);
        height: var(--social-icon-size);
        display: inline-flex;
        background-position: center;
        background-repeat: no-repeat;
        background-size: contain;
      }

      #share-email-btn::before {
        background-image: url("icons/email-light.svg");
      }

      body.dark-mode #share-email-btn::before {
        background-image: url("icons/email-dark.svg");
      }

      #copy-link-btn::before {
        background-image: url("icons/link-light.svg");
      }

      body.dark-mode #copy-link-btn::before {
        background-image: url("icons/link-dark.svg");
      }

      #gift-menu-btn::before {
        content: "🎁";
        font-size: 1.6rem;
        line-height: 1;
        color: var(--tool-fg-muted);
        display: inline-flex;
      }

      .nav button {
        appearance: none;
        border: none;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        background: var(--accent);
        color: #ffffff;
        font-size: 1.2rem;
        cursor: pointer;
        transition: transform 0.2s ease, background-color 0.2s ease;
      }

      .nav button:hover {
        background: var(--accent-hover);
        transform: translateY(-1px);
      }

      .nav button:focus-visible,
      .theme-toggle:focus-visible,
      .share-btn:focus-visible,
      .gift-btn:focus-visible,
      .gift-item:focus-visible {
        outline: 3px solid #89aef2;
        outline-offset: 2px;
      }

      .theme-row {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        color: var(--muted);
        font-size: 0.92rem;
      }

      .theme-toggle {
        appearance: none;
        border: 1px solid var(--border);
        width: 56px;
        height: 30px;
        border-radius: 999px;
        background: var(--switch-track);
        cursor: pointer;
        position: relative;
        transition: background-color 0.2s ease, border-color 0.2s ease;
      }

      .theme-toggle::after {
        content: "";
        position: absolute;
        top: 3px;
        left: 4px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: var(--switch-knob);
        transition: transform 0.2s ease;
      }

      body.dark-mode .theme-toggle::after {
        transform: translateX(25px);
      }

      .error {
        margin: 16px 0 0;
        color: #ba2a37;
        font-weight: 600;
      }

      .copy-toast {
        position: fixed;
        left: 50%;
        top: 24px;
        bottom: auto;
        transform: translate(-50%, -100%);
        margin: 0;
        padding: 8px 14px;
        border-radius: 999px;
        border: 1px solid var(--border);
        background: var(--menu-bg);
        color: var(--text);
        font-size: 0.9rem;
        box-shadow: var(--menu-shadow);
        pointer-events: none;
        z-index: 30;
      }

      @media (max-width: 640px) {
        body {
          place-items: start center;
          padding: 8px 14px;
        }

        .top {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
          text-align: left;
          padding: 14px 16px 10px;
        }

        #site-title {
          flex: 1 1 auto;
          text-align: left;
        }

        #progress-text {
          margin: 0;
          flex: 0 0 auto;
          text-align: right;
          white-space: nowrap;
        }

        .content {
          padding: 18px 16px 20px;
        }

        .social-row {
          gap: 8px;
        }

        .gift-menu {
          min-width: 174px;
        }
      }
