/* Verbatim base stylesheet extracted from teachers.html. Parent Portal shares the exact Teacher Study base visual system. */
@import url('https://cdn.jsdelivr.net/npm/lxgw-wenkai-lite-webfont@1.1.0/style.css');
      :root {
        /* ── 国风主色板：朱砂 · 石绿 · 赤金 · 宣纸（沿用旧变量名，只换掉取值） ── */
        --c-lime: #c8922a; /* 赤金 · 奖励/学生管理 */
        --c-emerald: #14806c; /* 石绿 · 课堂教学工具 */
        --c-slate: #4a3b28; /* 墨色 · 分组工具 + 密码锁 UI */
        --c-navy: #c1732e; /* 赭石 · 教学单元 */
        --c-mint: #8b4a6b; /* 胭脂紫 · 课堂互动游戏 */

        --gf-cinnabar: #b23a2e;
        --gf-cinnabar-deep: #832a21;
        --gf-jade: #0f6b5c;
        --gf-jade-deep: #0a4a40;
        --gf-gold: #c89b3c;
        --gf-gold-bright: #e9c168;
        --gf-gold-pale: #f3dfa8;

        --bg: #f4e8cd;
        --card-bg: #fbf3de;
        --text: #362b1d;
        --text-muted: #7a6a50;
        --border: rgba(200, 155, 60, 0.28);
        --surface: #f0e0bb;
        --arrow: #d9c9a0;

        --font-zh: 'KaiTi-CJK', 'LXGW WenKai Lite', serif;
        --radius: 16px;
        --shadow: 0 4px 14px rgba(54, 43, 29, 0.1);
      }

      .font-en {
        font-family: KaiTi-CJK, LXGW WenKai Lite, serif !important;
      }

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

      body {
        font-family: var(--font-zh);
        background:
          radial-gradient(60rem 40rem at 8% -8%, rgba(15, 107, 92, 0.14) 0%, transparent 55%),
          radial-gradient(50rem 40rem at 96% 6%, rgba(178, 58, 46, 0.1) 0%, transparent 55%),
          var(--bg);
        background-image:
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23C89B3C' stroke-width='1.1' opacity='0.3'%3E%3Cpath d='M10 40c-4 0-6-4-3-7 -2-4 2-8 6-6 1-4 6-6 9-3 3-3 8-1 8 3 4-1 7 2 6 6 4 1 5 6 1 8 -1 3-5 4-7 2 -2 3-6 2-7-1 -3 2-6 0-7-2 -3 1-6-2-6 0z'/%3E%3C/g%3E%3C/svg%3E"),
          radial-gradient(60rem 40rem at 8% -8%, rgba(15, 107, 92, 0.14) 0%, transparent 55%),
          radial-gradient(50rem 40rem at 96% 6%, rgba(178, 58, 46, 0.1) 0%, transparent 55%),
          var(--bg);
        background-size:
          140px 140px,
          auto,
          auto,
          auto;
        color: var(--text);
        -webkit-font-smoothing: antialiased;
      }

      .site-header {
        background: linear-gradient(135deg, var(--gf-jade-deep) 0%, var(--gf-jade) 100%);
        background-image:
          url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140' viewBox='0 0 140 140'%3E%3Cg fill='none' stroke='%23F3DFA8' stroke-width='1.1' opacity='0.16'%3E%3Cpath d='M10 40c-4 0-6-4-3-7 -2-4 2-8 6-6 1-4 6-6 9-3 3-3 8-1 8 3 4-1 7 2 6 6 4 1 5 6 1 8 -1 3-5 4-7 2 -2 3-6 2-7-1 -3 2-6 0-7-2 -3 1-6-2-6 0z'/%3E%3C/g%3E%3C/svg%3E"),
          linear-gradient(135deg, var(--gf-jade-deep) 0%, var(--gf-jade) 100%);
        min-height: 85px;
        padding: 16px 24px;
        position: relative;
        text-align: center;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(10, 74, 64, 0.25);
      }

      .site-header h1::after {
        content: '';
        display: inline-block;
        width: 10px;
        height: 10px;
        border-radius: 2px;
        background: var(--gf-gold-bright);
        margin-left: 10px;
        opacity: 0.9;
        vertical-align: middle;
        transform: rotate(45deg);
      }

      .site-header::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--gf-gold), var(--gf-cinnabar-deep), var(--gf-gold));
      }

      .site-header .back-link {
        position: absolute;
        left: 24px;
        top: 50%;
        transform: translateY(-50%);
        display: inline-flex;
        align-items: center;
        gap: 6px;
        text-decoration: none;
        font-weight: bold;
        font-size: 1.05rem;
        line-height: 1;
        transition: opacity 0.2s ease;
        z-index: 2;
        white-space: nowrap;
        color: #fff;
      }
      .site-header .back-link:hover {
        opacity: 0.75;
      }
      .circle-arrow-icon {
        width: 22px;
        height: 22px;
        flex-shrink: 0;
      }

      .site-header h1 {
        font-size: 1.9rem;
        color: var(--gf-gold-pale);
        letter-spacing: 2px;
        line-height: 1.2;
        z-index: 2;
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.35);
      }

      .container {
        width: 94%;
        max-width: 1080px;
        margin: 0 auto 50px;
        display: flex;
        flex-direction: column;
        gap: 35px;
        position: relative;
        z-index: 2;
        /* 🌟 核心修改：补偿删掉搜索栏后失去的顶部空间 */
        padding-top: 35px;
      }

      /* 🧭 顶部分类导航 */
      /* 页眉和分类导航一起吸顶，上下滚动时都固定在顶部 */
      .sticky-top {
        position: sticky;
        top: 0;
        z-index: 30;
      }

      .tab-nav {
        position: sticky;
        top: 0;
        z-index: 20;
        background: rgba(244, 232, 205, 0.92);
        backdrop-filter: blur(8px);
        border-bottom: 1px solid var(--border);
      }
      .tab-nav-inner {
        width: 94%;
        max-width: 1080px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        gap: 6px;
        overflow-x: auto;
        padding: 10px 0;
      }
      .tab-btn {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
        padding: 9px 18px;
        border-radius: 999px;
        border: none;
        background: transparent;
        color: var(--text-muted);
        font-family: var(--font-zh);
        font-size: 0.95rem;
        font-weight: bold;
        cursor: pointer;
        white-space: nowrap;
        transition:
          background 0.2s ease,
          color 0.2s ease;
      }
      .tab-btn svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
      }
      .tab-btn:hover {
        background: var(--surface);
        color: var(--text);
      }
      .tab-btn.active {
        background: var(--tab-color, var(--c-emerald));
        color: #fff;
      }
      .tab-btn[hidden] {
        display: none;
      }

      .tool-section {
        display: none;
      }
      .tool-section.active {
        display: block;
      }

      .section-title {
        font-size: 1.3rem;
        font-weight: bold;
        color: var(--text);
        border-left: 6px solid var(--c-slate);
        padding-left: 14px;
        margin-bottom: 18px;
        letter-spacing: 1px;
        display: flex;
        align-items: center;
        gap: 12px;
      }
      .section-title-main {
        display: inline-flex;
        align-items: center;
        gap: 12px;
      }

      .title-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        background: var(--card-bg);
        border: 1px solid var(--border);
        box-shadow: 0 2px 6px rgba(54, 43, 29, 0.08);
      }
      .title-icon svg {
        width: 20px;
        height: 20px;
      }

      .grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 20px;
      }

      /* 🗂️ 选项卡样式（参考图标方块 + 居中文字 + 轻微悬浮变亮） */
      .grid.tile-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 16px;
      }
      .card.tile-card {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 16px 14px;
        min-height: 0;
      }
      .card.tile-card::after {
        content: none;
      }
      .card.tile-card .card-icon {
        grid-row: auto;
        grid-column: auto;
        width: 100%;
        height: auto;
        aspect-ratio: 4 / 3;
        border-radius: 14px;
        font-size: 2rem;
        transform: none;
        transition:
          background 0.3s ease,
          color 0.3s ease,
          filter 0.3s ease;
      }
      .card.tile-card .card-title {
        grid-row: auto;
        grid-column: auto;
        align-self: center;
        align-items: center;
        text-align: center;
      }
      .card.tile-card .card-desc {
        grid-row: auto;
        grid-column: auto;
        align-self: auto;
        text-align: center;
      }
      .card.tile-card.emerald-hover .card-icon {
        background: rgba(20, 128, 108, 0.14);
        color: var(--c-emerald);
        border-color: transparent;
      }
      .card.tile-card.mint-hover .card-icon {
        background: rgba(139, 74, 107, 0.14);
        color: var(--c-mint);
        border-color: transparent;
      }
      .card.tile-card.slate-hover .card-icon {
        background: rgba(74, 59, 40, 0.08);
        color: var(--c-slate);
        border-color: transparent;
      }
      .card.tile-card.emerald-hover:hover .card-icon {
        background: rgba(20, 128, 108, 0.24);
        color: var(--c-emerald);
        transform: none;
        filter: brightness(1.05);
      }
      .card.tile-card.mint-hover:hover .card-icon {
        background: rgba(139, 74, 107, 0.24);
        color: var(--c-mint);
        transform: none;
        filter: brightness(1.05);
      }
      .card.tile-card.slate-hover:hover .card-icon {
        background: rgba(74, 59, 40, 0.16);
        color: var(--c-slate);
        transform: none;
        filter: brightness(1.05);
      }
      .card.tile-card.emerald-hover:hover .card-title {
        color: var(--c-emerald);
      }
      .card.tile-card.mint-hover:hover .card-title {
        color: var(--c-mint);
      }
      .card.tile-card.slate-hover:hover .card-title {
        color: var(--c-slate);
      }

      .unit-list {
        display: flex;
        flex-direction: column;
        gap: 14px;
      }
      .unit-item {
        position: relative;
        background-color: var(--card-bg);
        border-radius: var(--radius);
        padding: 18px 20px;
        text-decoration: none;
        color: var(--text);
        box-shadow: var(--shadow);
        border: 1px solid var(--border);
        border-left: 4px solid var(--border);
        transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 16px;
      }
      .unit-item:hover {
        transform: translateX(4px);
        box-shadow: 0 16px 35px rgba(0, 0, 0, 0.06);
        border-left-color: var(--c-navy);
      }
      .unit-icon {
        width: 50px;
        height: 50px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 12px;
        color: var(--text-muted);
        transition: all 0.3s ease;
      }
      .unit-item:hover .unit-icon {
        background: var(--c-navy);
        color: #fff;
        border-color: var(--c-navy);
      }
      .unit-icon{background:transparent;border-color:transparent}
      .unit-icon img{width:100%;height:100%;object-fit:contain;display:block}
      /* v6: Chinese unit icons 50px -> 72px, scoped to the Chinese panel only */
      .subject-panel[data-subject="cn"] .unit-icon { width: 72px; height: 72px; border-radius: 16px; }
      .subject-panel[data-subject="cn"] .unit-item { padding: 20px 22px; gap: 18px; }

      .unit-item:hover .unit-icon{background:transparent;border-color:transparent}
      .unit-text {
        flex: 1;
        min-width: 0;
      }
      .unit-title {
        font-size: 1.1rem;
        font-weight: bold;
        display: flex;
        align-items: center;
        gap: 8px;
      }
      .unit-title .sub-title {
        font-size: 0.75rem;
        font-weight: bold;
        padding: 3px 8px;
        border-radius: 6px;
        background: var(--surface);
        color: var(--text-muted);
        border: 1px solid var(--border);
      }
      .unit-desc {
        font-size: 0.85rem;
        color: var(--text-muted);
        line-height: 1.4;
        margin-top: 4px;
      }
      .unit-arrow {
        font-size: 2rem;
        color: var(--arrow);
        font-weight: 300;
        transition:
          transform 0.3s ease,
          color 0.3s ease;
        flex-shrink: 0;
      }
      .unit-item:hover .unit-arrow {
        transform: translateX(5px);
        color: var(--c-navy);
      }

      /* 📘 教学单元 → 学科子分类（中文 / 数学 / 科学） */
      .subject-tabs {
        display: flex;
        gap: 8px;
        margin-bottom: 20px;
        flex-wrap: wrap;
      }
      .subject-tab-btn {
        border: 1px solid var(--border);
        background: var(--card-bg);
        color: var(--text-muted);
        font-family: var(--font-zh);
        font-size: 0.92rem;
        font-weight: bold;
        padding: 8px 18px;
        border-radius: 999px;
        cursor: pointer;
        transition:
          background 0.2s ease,
          color 0.2s ease,
          border-color 0.2s ease;
      }
      .subject-tab-btn:hover {
        border-color: var(--subj-color, var(--c-navy));
        color: var(--text);
      }
      .subject-tab-btn.active {
        background: var(--subj-color, var(--c-navy));
        border-color: var(--subj-color, var(--c-navy));
        color: #fff;
      }
      .subject-panel {
        display: none;
      }
      .subject-panel.active {
        display: block;
      }

      /* 📗 数学单元手风琴 */
      .math-units {
        display: flex;
        flex-direction: column;
        gap: 14px;
      }
      .math-unit {
        background-color: var(--card-bg);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        border-left: 4px solid var(--border);
        box-shadow: var(--shadow);
        overflow: hidden;
      }
      .math-unit-head {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 12px;
        padding: 16px 20px;
      }
      .math-unit-toggle {
        flex: 1 1 auto;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 16px;
        border: none;
        background: none;
        padding: 0;
        text-align: left;
        cursor: pointer;
        font-family: var(--font-zh);
        color: var(--text);
      }
      .math-unit-resources { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; }
      @media (max-width: 600px) {
        .math-unit[data-unit="2"] .math-unit-head, .math-unit[data-unit="3"] .math-unit-head { flex-wrap: wrap; gap: 8px; }
        .math-unit[data-unit="2"] .math-unit-toggle, .math-unit[data-unit="3"] .math-unit-toggle { flex: 1 0 100%; }
        .math-unit[data-unit="2"] .math-unit-meta, .math-unit[data-unit="3"] .math-unit-meta { margin-left: auto; }
      }
      .focus-wall-pin {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 7px 12px;
        border-radius: 999px;
        background: var(--gf-gold-pale);
        color: #7A5A00;
        font-family: var(--font-zh);
        font-size: 0.8rem;
        font-weight: bold;
        text-decoration: none;
        border: 1px solid transparent;
        transition: border-color 0.2s ease;
      }
      .focus-wall-pin:hover {
        border-color: var(--gf-gold);
      }
      .focus-wall-pin .sub-title {
        display: none;
      }
      .math-unit .unit-icon {
        font-size: 1.2rem;
        font-weight: bold;
        color: var(--gf-jade);
        background: rgba(15, 107, 92, 0.1);
        border-color: transparent;
      }
      .math-unit-meta {
        flex-shrink: 0;
        font-size: 0.8rem;
        color: var(--text-muted);
        font-weight: bold;
      }
      .math-unit-chev {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        color: var(--text-muted);
        transition: transform 0.2s ease;
      }
      .math-unit.open .math-unit-chev {
        transform: rotate(180deg);
      }
      .math-unit-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.25s ease;
      }
      .math-unit.open .math-unit-body {
        /* tall enough for any unit on a phone, so nothing in an open unit is cut off */
        max-height: 2400px;
      }
      .math-unit-body-inner {
        padding: 0 20px 20px;
      }
      .unit-item.live-lesson {
        border-left-color: var(--gf-jade);
        margin-bottom: 14px;
      }
      .unit-item.live-lesson .unit-icon {
        color: var(--gf-jade);
        background: rgba(15, 107, 92, 0.12);
        border-color: transparent;
      }
      .unit-item.live-lesson:hover .unit-arrow,
      .unit-item.live-lesson:hover {
        border-left-color: var(--gf-jade-deep);
      }
      .unit-item.live-lesson:hover .unit-icon {
        background: var(--gf-jade);
        color: #fff;
      }
      .lesson-chip-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(56px, 1fr));
        gap: 8px;
      }
      .lesson-chip {
        aspect-ratio: 1;
        border-radius: 10px;
        background: var(--surface);
        border: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        color: var(--arrow);
        font-family: var(--font-zh);
        font-weight: bold;
      }
      .lesson-sec + .lesson-sec {
        margin-top: 12px;
      }
      .lesson-sec-label {
        display: flex;
        align-items: baseline;
        gap: 8px;
        font-family: var(--font-zh);
        font-weight: bold;
        font-size: 0.9rem;
        color: var(--text);
        margin-bottom: 6px;
      }
      .lesson-sec-label b {
        display: inline-grid;
        place-items: center;
        width: 22px;
        height: 22px;
        border-radius: 6px;
        background: var(--sec-c);
        color: #fff;
        font-size: 0.8rem;
      }
      .lesson-sec-label .font-en {
        font-size: 0.75rem;
        color: var(--text-muted);
      }
      .lesson-sec[data-sec='A'] { --sec-c: #e8872b; --sec-bg: #ffe7cc; }
      .lesson-sec[data-sec='B'] { --sec-c: #2f7fb8; --sec-bg: #ddeffb; }
      .lesson-sec[data-sec='C'] { --sec-c: #2f9a6a; --sec-bg: #ddf3e8; }
      .lesson-sec[data-sec='D'] { --sec-c: #7d52b3; --sec-bg: #eee3f8; }

      /* 📗 单元练习侧栏：挂在单元手风琴里课时格子右侧的空白处 */
      .math-unit-body-inner.has-extra {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 20px;
      }
      .math-unit-body-inner.has-extra > .math-unit-lessons {
        flex: 1 1 420px;
        min-width: 280px;
      }
      .unit-extra {
        display: flex;
        flex-direction: column;
        flex: 0 0 260px;
        border-radius: var(--radius);
        border: 1px solid var(--border);
        background: linear-gradient(160deg, #fff6e1, var(--card-bg));
        box-shadow: var(--shadow);
        overflow: hidden;
      }
      .unit-extra-item {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 16px 18px;
      }
      .unit-extra-item + .unit-extra-item {
        border-top: 1px dashed var(--border);
      }
      .unit-extra .unit-extra-icon { font-size: 28px; line-height: 1; }
      .unit-extra h4 {
        display: flex;
        align-items: baseline;
        flex-wrap: wrap;
        gap: 6px;
        font-size: 1rem;
        color: var(--text);
      }
      .unit-extra h4 .font-en { font-size: 0.72rem; color: var(--text-muted); font-weight: normal; }
      .unit-extra p { font-size: 0.82rem; line-height: 1.55; color: var(--text-muted); }
      .unit-extra .unit-extra-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        margin-top: 4px;
        padding: 9px 16px;
        border-radius: 999px;
        background: var(--c-navy);
        color: #fff;
        font-weight: bold;
        font-size: 0.86rem;
        text-decoration: none;
        transition: background 0.15s ease;
      }
      .unit-extra .unit-extra-link:hover { background: var(--gf-cinnabar-deep); }
      @media (max-width: 760px) {
        .math-unit-body-inner.has-extra { flex-direction: column; }
        .unit-extra { flex: 1 1 auto; }
      }

      .lesson-chip.live {
        background: var(--sec-bg);
        border: 2px solid transparent;
        border-bottom: 4px solid var(--sec-c);
        color: var(--sec-c);
        font-size: 1.25rem;
        text-decoration: none;
        transition: transform 0.15s ease, border-color 0.15s ease;
      }
      .lesson-chip.live.check-chip {
        background: var(--surface);
        border: 2px dashed var(--sec-c);
        border-bottom: 4px solid var(--sec-c);
        font-size: 0.95rem;
      }
      .lesson-chip.live:hover,
      .lesson-chip.live:focus-visible {
        transform: translateY(-2px);
        border-color: var(--sec-c);
        outline: none;
      }
      .lesson-tip {
        position: fixed;
        z-index: 1000;
        max-width: 280px;
        padding: 10px 14px;
        border-radius: 12px;
        background: var(--card-bg);
        border: 1px solid var(--border);
        border-top: 4px solid var(--tip-c, var(--gf-jade));
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
        font-family: var(--font-zh);
        color: var(--text);
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.12s ease;
      }
      .lesson-tip.show {
        opacity: 1;
      }
      .lesson-tip-title {
        font-weight: bold;
        font-size: 1rem;
      }
      .lesson-tip-en {
        font-size: 0.78rem;
        color: var(--text-muted);
        margin-bottom: 4px;
      }
      .lesson-tip-desc {
        font-size: 0.88rem;
        line-height: 1.5;
      }
      .lesson-chip svg {
        width: 12px;
        height: 12px;
      }

      /* 📙 空学科占位状态 */
      .empty-state {
        background: var(--card-bg);
        border: 1px dashed var(--border);
        border-radius: var(--radius);
        padding: 46px 24px;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
      }
      .empty-state-icon {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px;
        background: var(--gf-gold-pale);
        color: var(--gf-gold);
        font-size: 1.3rem;
      }
      .empty-state-title {
        font-size: 1.05rem;
        font-weight: bold;
        color: var(--text);
      }
      .empty-state-desc {
        font-size: 0.85rem;
        color: var(--text-muted);
      }

      .card {
        background-color: var(--card-bg);
        border-radius: var(--radius);
        padding: 20px 18px;
        text-decoration: none;
        color: var(--text);
        box-shadow: var(--shadow);
        border: 1px solid var(--border);
        border-top: 4px solid var(--border);
        transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
        cursor: pointer;
        position: relative;
        display: grid;
        grid-template-columns: auto 1fr auto;
        grid-template-rows: auto auto;
        gap: 10px 16px;
        align-items: center;
        min-height: 115px;
      }

      /* 🐯 老虎异形卡片 */



      /* 🐘 大象异形卡片 */



      .card::after {
        content: '›';
        grid-row: 1 / 3;
        grid-column: 3;
        font-size: 2.2rem;
        color: var(--arrow);
        font-family: KaiTi-CJK, LXGW WenKai Lite, serif;
        font-weight: 300;
        margin-left: 4px;
        transition:
          transform 0.3s ease,
          color 0.3s ease;
      }

      .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 16px 35px rgba(0, 0, 0, 0.06);
        z-index: 10;
      }

      .card.slate-hover:hover {
        border-top-color: var(--c-slate);
      }
      .card.emerald-hover:hover {
        border-top-color: var(--c-emerald);
      }
      .card.mint-hover:hover {
        border-top-color: var(--c-mint);
      }

      .card.slate-hover:hover::after {
        transform: translateX(5px);
        color: var(--c-slate);
      }
      .card.emerald-hover:hover::after {
        transform: translateX(5px);
        color: var(--c-emerald);
      }
      .card.mint-hover:hover::after {
        transform: translateX(5px);
        color: var(--c-mint);
      }

      .lock-badge {
        position: absolute;
        top: -12px;
        right: -12px;
        width: 34px;
        height: 34px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--surface);
        border: 2px solid var(--border);
        color: var(--text-muted);
        box-shadow: 0 4px 10px rgba(74, 59, 40, 0.06);
        transition: all 0.3s ease;
        z-index: 3;
      }
      .tiger-shape .lock-badge,
      .elephant-shape .lock-badge {
        top: -2px;
        right: -2px;
      }
      .lock-badge svg {
        width: 14px;
        height: 14px;
        stroke: currentColor;
      }
      .locked-card:hover .lock-badge {
        transform: scale(1.15) rotate(8deg);
        background: #fff;
        border-color: var(--c-slate);
        color: var(--c-slate);
      }

      .lock-overlay {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.6);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 2;
        border-radius: inherit;
      }
      .lock-hint {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 100px;
        padding: 6px 14px;
        border-radius: 6px;
        background: var(--c-slate);
        color: #fff;
        font-size: 0.8rem;
        font-weight: 500;
        letter-spacing: 1px;
        white-space: nowrap;
        transform: translateY(10px);
        transition: all 0.3s ease;
      }
      .locked-card:hover .lock-overlay {
        opacity: 1;
      }
      .locked-card:hover .lock-hint {
        transform: translateY(0);
      }

      .card-icon {
        grid-row: 1 / 3;
        grid-column: 1;
        width: 58px;
        height: 58px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.8rem;
        margin: 0;
        flex-shrink: 0;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 14px;
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        color: var(--text-muted);
        z-index: 1;
      }

      .card-icon svg.icon-dress {
        width: 1.8rem;
        height: 1.8rem;
      }

      .slate-hover:hover .card-icon {
        background: var(--c-slate);
        color: white;
        border-color: var(--c-slate);
        transform: translateY(-2px) rotate(-4deg);
      }
      .emerald-hover:hover .card-icon {
        background: var(--c-emerald);
        color: white;
        border-color: var(--c-emerald);
        transform: translateY(-2px) rotate(-4deg);
      }
      .mint-hover:hover .card-icon {
        background: var(--c-mint);
        color: white;
        border-color: var(--c-mint);
        transform: translateY(-2px) rotate(-4deg);
      }

      .card-title {
        grid-row: 1;
        grid-column: 2;
        font-size: 1.15rem;
        font-weight: bold;
        line-height: 1.2;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        text-align: left;
        align-self: end;
      }
      .card-title .sub-title {
        font-size: 0.75rem;
        font-weight: bold;
        padding: 3px 8px;
        border-radius: 6px;
        letter-spacing: 0.5px;
        background: var(--surface);
        color: var(--text-muted);
        border: 1px solid var(--border);
        transition: all 0.3s ease;
      }

      .slate-hover:hover .card-title .sub-title {
        color: var(--c-slate);
        background: rgba(74, 59, 40, 0.08);
        border-color: rgba(74, 59, 40, 0.15);
      }
      .emerald-hover:hover .card-title .sub-title {
        color: var(--c-emerald);
        background: rgba(20, 128, 108, 0.08);
        border-color: rgba(20, 128, 108, 0.15);
      }
      .mint-hover:hover .card-title .sub-title {
        color: var(--c-mint);
        background: rgba(139, 74, 107, 0.08);
        border-color: rgba(139, 74, 107, 0.15);
      }

      .card-desc {
        grid-row: 2;
        grid-column: 2;
        font-size: 0.85rem;
        color: var(--text-muted);
        line-height: 1.4;
        margin: 0;
        text-align: left;
        align-self: start;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
      }

      /* ⭐ 常用工具 */
      .fav-pin {
        position: absolute;
        top: -10px;
        left: -10px;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        border: 2px solid #fff;
        background: var(--card-bg);
        box-shadow: 0 3px 8px rgba(74, 59, 40, 0.18);
        font-size: 1rem;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: var(--arrow);
        z-index: 5;
        transition:
          transform 0.2s ease,
          color 0.2s ease,
          background 0.2s ease;
      }
      .fav-pin:hover {
        transform: scale(1.15) rotate(-8deg);
      }
      .fav-pin.on {
        color: #fff;
        background: var(--c-lime);
        border-color: #fff;
      }


      /* 模态框 */
      #modal-overlay {
        position: fixed;
        inset: 0;
        background: rgba(54, 43, 29, 0.82);
        z-index: 1000;
        display: none;
        justify-content: center;
        align-items: center;
        backdrop-filter: blur(8px);
      }
      .lock-box {
        background: #fff;
        padding: 40px;
        border-radius: 16px;
        text-align: center;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
        border: 1px solid var(--border);
        border-top: 6px solid var(--c-slate);
      }

      .password-input {
        font-family: 'LXGW WenKai Lite', monospace;
        font-size: 2rem;
        padding: 12px;
        width: 180px;
        text-align: center;
        border: 2px solid var(--border);
        border-radius: 8px;
        letter-spacing: 5px;
        background: #fff;
        color: var(--text);
        outline: none;
        transition: border-color 0.2s;
      }
      .password-input:focus {
        border-color: var(--c-slate);
      }
      .submit-btn {
        margin-top: 24px;
        padding: 12px 40px;
        background: var(--c-slate);
        color: white;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        font-weight: bold;
        font-size: 1.1rem;
        letter-spacing: 2px;
        transition: all 0.2s ease;
      }
      .submit-btn:hover {
        background: #2a2013;
      }

      @media (max-width: 768px) {
        .site-header {
          min-height: 90px;
          padding: 50px 16px 14px;
        }
        .site-header .back-link {
          left: 50%;
          top: 12px;
          transform: translateX(-50%);
        }
        .site-header h1 {
          font-size: 1.6rem;
        }
        .grid {
          grid-template-columns: 1fr;
        }
        .grid.tile-grid {
          grid-template-columns: repeat(2, 1fr);
          gap: 12px;
        }


      }

      /* Class mascot artwork matches the approved nametag prints. */
      .card.locked-card.elephant-shape .teacher-class-mascot,
      .card.locked-card.tiger-shape .teacher-class-mascot{display:block;width:52px;height:52px;object-fit:contain;margin:8px auto 0;pointer-events:none}
      @media(max-width:640px){.card.locked-card.elephant-shape .teacher-class-mascot,.card.locked-card.tiger-shape .teacher-class-mascot{width:42px;height:42px;margin:5px auto 0}}
