:root {
        --bg: #f5f3ee;
        --paper: #ffffff;
        --paper-soft: #faf8f4;
        --ink: #1a1c21;
        --muted: #6b7280;
        --line: #e6e2d9;
        --line-strong: #cfc9bc;
        --red: #9e1b32;
        --red-dark: #7a1226;
        --red-soft: #f9eef0;
        --gold: #c3a05a;
        --gold-soft: #f6efe1;
        --dark: #14161b;
        --dark-soft: #1d2027;
        --green: #1f7a4d;
        --green-soft: #eaf4ee;
        --amber: #92610a;
        --amber-soft: #faf2dd;
        --font-display: "Songti SC", "STSong", "Noto Serif SC", serif;
        --focus-ring: 0 0 0 3px rgba(158, 27, 50, 0.16);
        --shadow: 0 1px 2px rgba(26, 28, 33, 0.05), 0 8px 24px rgba(26, 28, 33, 0.06);
        --shadow-strong: 0 2px 4px rgba(26, 28, 33, 0.06), 0 20px 48px rgba(26, 28, 33, 0.12);
        --shadow-modal: 0 30px 80px rgba(17, 24, 39, 0.26);
        --radius: 8px;
        --sidebar: 248px;
        --aside: 350px;
      }

      * {
        box-sizing: border-box;
      }

      html {
        scroll-behavior: smooth;
      }

      body {
        margin: 0;
        min-height: 100vh;
        background: var(--bg);
        color: var(--ink);
        font-family: -apple-system, "SF Pro Text", "PingFang SC", "Noto Sans SC",
          "Microsoft YaHei", sans-serif;
        font-size: 15px;
        line-height: 1.7;
      }

      button,
      input,
      select,
      textarea {
        font: inherit;
      }

      button {
        cursor: pointer;
      }

      svg {
        display: block;
        width: 100%;
        height: 100%;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 2;
      }

      .app {
        min-height: 100vh;
      }

      .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        min-height: 68px;
        padding: 0 30px;
        border-bottom: 1px solid var(--line);
        background: rgba(255, 255, 255, 0.92);
        backdrop-filter: blur(18px);
      }

      .brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 260px;
      }

      .brand-code {
        color: var(--red);
        font-size: 27px;
        font-weight: 700;
        line-height: 1;
      }

      .brand-title {
        font-size: 18px;
        font-weight: 700;
        line-height: 1.1;
      }

      .brand-tagline {
        color: var(--red);
        font-size: 18px;
        font-weight: 700;
        line-height: 1.1;
      }

      .brand-lockup {
        display: inline-flex;
        align-items: baseline;
        gap: 8px;
      }

      .brand-avatar {
        display: inline-flex;
        width: 34px;
        height: 34px;
        align-items: center;
        justify-content: center;
        overflow: hidden;
        border: 2px solid var(--red);
        border-radius: 50%;
        background: var(--paper);
        flex: 0 0 auto;
      }

      .brand-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 20%;
        transform: scale(1.28);
      }

      .topbar-center {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
      }

      .topbar-actions {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 10px;
        min-width: 210px;
      }

      .topbar-segment {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px;
        border: 1px solid var(--line);
        border-radius: 999px;
        background: #eef2f6;
      }

      .segment-tab {
        display: inline-flex;
        min-height: 34px;
        align-items: center;
        padding: 0 15px;
        border: 0;
        border-radius: 999px;
        color: var(--muted);
        background: transparent;
        font-size: 14px;
        font-weight: 700;
        text-decoration: none;
      }

      .segment-tab:hover,
      .segment-tab:focus-visible {
        color: var(--ink);
        outline: none;
      }

      .segment-tab.active {
        color: var(--ink);
        background: var(--paper);
        box-shadow: 0 1px 3px rgba(17, 24, 39, 0.08);
      }

      .icon-button,
      .ghost-button,
      .primary-button,
      .secondary-button,
      .nav-button,
      .text-button,
      .resource-button {
        border: 0;
        background: transparent;
      }

      .icon-button {
        display: inline-flex;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        color: var(--muted);
        background: var(--paper);
      }

      .icon-button:hover,
      .icon-button:focus-visible {
        color: var(--red);
        border-color: rgba(158, 27, 50, 0.35);
        outline: none;
      }

      .icon-button svg {
        width: 20px;
        height: 20px;
      }

      .app-shell {
        display: grid;
        grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--aside);
        gap: 18px;
        width: min(1500px, calc(100% - 32px));
        margin: 18px auto 36px;
      }

      .portal-shell {
        grid-template-columns: minmax(0, 1fr);
        width: min(1180px, calc(100% - 36px));
        margin-top: 28px;
      }

      .sidebar,
      .right-rail,
      .main-panel {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.96);
      }

      .sidebar,
      .right-rail {
        position: sticky;
        top: 90px;
        align-self: start;
        max-height: calc(100vh - 112px);
        overflow: auto;
      }

      .sidebar {
        padding: 18px;
      }

      .profile-card {
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper-soft);
      }

      .profile-top {
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .avatar {
        display: inline-flex;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        color: var(--paper);
        background: var(--red);
        font-weight: 700;
      }

      .profile-name {
        margin: 0;
        font-weight: 700;
        line-height: 1.3;
      }

      .profile-sub {
        margin: 2px 0 0;
        color: var(--muted);
        font-size: 13px;
        line-height: 1.4;
      }

      .progress-compact {
        display: grid;
        gap: 8px;
        margin-top: 16px;
      }

      .progress-line {
        display: flex;
        justify-content: space-between;
        gap: 12px;
        color: var(--muted);
        font-size: 13px;
        font-weight: 750;
      }

      .progress-line strong {
        color: var(--red);
      }

      .bar {
        height: 8px;
        overflow: hidden;
        border-radius: 999px;
        background: #e9edf3;
      }

      .bar > span {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: var(--red);
        transition: width 0.25s ease;
      }

      .nav-section {
        display: grid;
        gap: 8px;
        margin-top: 18px;
      }

      .nav-button {
        display: grid;
        grid-template-columns: 22px 1fr auto;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 0 10px;
        border-radius: var(--radius);
        color: var(--muted);
        font-weight: 800;
        text-align: left;
      }

      .nav-button:hover,
      .nav-button.active {
        color: var(--red);
        background: var(--red-soft);
      }

      .nav-button svg {
        width: 20px;
        height: 20px;
      }

      .nav-count {
        min-width: 26px;
        padding: 1px 8px;
        border-radius: 999px;
        background: var(--paper);
        color: var(--muted);
        font-size: 12px;
        text-align: center;
      }

      .sidebar-note {
        margin-top: 18px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        color: var(--muted);
        font-size: 13px;
        line-height: 1.65;
      }

      .sidebar-note strong {
        display: block;
        margin-bottom: 5px;
        color: var(--ink);
        font-size: 14px;
      }

      .main-panel {
        min-height: calc(100vh - 108px);
        overflow: hidden;
      }

      .portal-main {
        min-height: auto;
        overflow: visible;
        border: 0;
        background: transparent;
      }

      .screen {
        display: grid;
        gap: 20px;
        padding: 24px;
      }

      .screen-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 24px;
      }

      .screen-kicker {
        margin: 0 0 5px;
        color: var(--red);
        font-size: 13px;
        font-weight: 700;
      }

      h1,
      h2,
      h3,
      p {
        margin-top: 0;
      }

      h1 {
        margin-bottom: 8px;
        font-size: clamp(34px, 4vw, 56px);
        font-weight: 700;
        line-height: 1.08;
        text-wrap: pretty;
      }

      h2 {
        margin-bottom: 0;
        font-size: 24px;
        line-height: 1.25;
      }

      h3 {
        margin-bottom: 8px;
        font-size: 18px;
        line-height: 1.3;
      }

      .screen-copy {
        max-width: 690px;
        margin: 0;
        color: var(--muted);
        font-size: 16px;
      }

      .primary-button,
      .secondary-button,
      .ghost-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 42px;
        padding: 0 15px;
        border-radius: var(--radius);
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
        transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, color 0.16s ease;
      }

      .primary-button {
        color: var(--paper);
        background: var(--red);
      }

      .primary-button:hover,
      .primary-button:focus-visible {
        background: var(--red-dark);
        box-shadow: 0 8px 18px rgba(158, 27, 50, 0.2);
        transform: translateY(-1px);
        outline: none;
      }

      .primary-button:active {
        transform: scale(0.98);
      }

      .secondary-button,
      .ghost-button {
        color: var(--ink);
        border: 1px solid var(--line);
        background: var(--paper);
      }

      .secondary-button:hover,
      .secondary-button:focus-visible,
      .ghost-button:hover,
      .ghost-button:focus-visible {
        color: var(--red);
        border-color: rgba(158, 27, 50, 0.34);
        background: var(--red-soft);
        box-shadow: 0 8px 18px rgba(17, 24, 39, 0.06);
        transform: translateY(-1px);
        outline: none;
      }

      .button-icon {
        width: 18px;
        height: 18px;
      }

      .hero-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
      }

      .focus-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 210px;
        gap: 18px;
        padding: 20px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper-soft);
      }

      .focus-card strong {
        color: var(--ink);
      }

      .focus-title {
        margin-bottom: 6px;
        font-size: 20px;
        font-weight: 700;
      }

      .focus-body {
        margin-bottom: 16px;
        color: var(--muted);
      }

      .focus-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
      }

      .focus-image {
        overflow: hidden;
        min-height: 180px;
        border-radius: var(--radius);
        background: #edf1f6;
      }

      .focus-image img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .metric-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      .metric-card {
        min-height: 132px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
      }

      .metric-card span {
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
      }

      .metric-card strong {
        display: block;
        margin-top: 9px;
        font-size: 32px;
        line-height: 1.08;
      }

      .metric-card small {
        color: var(--muted);
        font-weight: 750;
      }

      .section-block {
        display: grid;
        gap: 14px;
      }

      .block-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .block-head p {
        margin: 4px 0 0;
        color: var(--muted);
        font-size: 14px;
      }

      .task-board {
        display: grid;
        gap: 10px;
      }

      .task-card {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) 116px 112px;
        gap: 12px;
        align-items: center;
        min-height: 70px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
      }

      .task-card:hover {
        border-color: rgba(158, 27, 50, 0.35);
      }

      .task-check {
        width: 18px;
        height: 18px;
        accent-color: var(--red);
      }

      .task-name {
        display: grid;
        gap: 3px;
        min-width: 0;
      }

      .task-name strong {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .task-name span {
        color: var(--muted);
        font-size: 13px;
      }

      .status-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 27px;
        width: fit-content;
        padding: 0 10px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
      }

      .status-pill.waiting {
        color: var(--muted);
        background: #eef2f6;
      }

      .status-pill.doing {
        color: var(--amber);
        background: var(--amber-soft);
      }

      .status-pill.done {
        color: var(--green);
        background: var(--green-soft);
      }

      .progress-cell {
        display: grid;
        gap: 6px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
      }

      .progress-cell .bar {
        height: 7px;
      }

      .content-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
      }

      .module-card,
      .plan-card,
      .review-card,
      .resource-row,
      .note-card {
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
      }

      .module-card {
        display: grid;
        gap: 14px;
        padding: 18px;
      }

      .module-top {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
      }

      .module-icon {
        display: inline-flex;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        border: 1px solid rgba(158, 27, 50, 0.18);
        border-radius: var(--radius);
        color: var(--red);
        background: var(--red-soft);
      }

      .app-artwork {
        display: inline-grid;
        width: 78px;
        height: 78px;
        place-items: center;
        flex: 0 0 auto;
      }

      .app-artwork img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
      }

      .app-artwork-fallback {
        width: 54px;
        height: 54px;
      }

      .module-icon svg {
        width: 22px;
        height: 22px;
      }

      .app-modal-corporate-guide .module-icon {
        width: 44px;
        height: 44px;
        align-self: center;
        border-radius: 12px;
      }

      .app-modal-corporate-guide .module-icon svg {
        width: 24px;
        height: 24px;
      }

      .module-card p {
        margin-bottom: 0;
        color: var(--muted);
      }

      .module-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .small-tag {
        display: inline-flex;
        min-height: 26px;
        align-items: center;
        padding: 0 9px;
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 800;
      }

      .right-rail {
        display: grid;
        gap: 14px;
        padding: 16px;
      }

      .rail-card {
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
      }

      .rail-card h3 {
        font-size: 16px;
      }

      .rail-list {
        display: grid;
        gap: 10px;
        margin: 0;
        padding: 0;
        list-style: none;
      }

      .rail-list li {
        display: grid;
        gap: 3px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--line);
      }

      .rail-list li:last-child {
        padding-bottom: 0;
        border-bottom: 0;
      }

      .rail-list strong {
        font-size: 14px;
      }

      .rail-list span {
        color: var(--muted);
        font-size: 12px;
      }

      .quote-card {
        color: var(--paper);
        background: #151b2a;
      }

      .quote-card h3,
      .quote-card p {
        color: var(--paper);
      }

      .quote-card p {
        margin-bottom: 0;
        opacity: 0.78;
      }

      .weekly-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 10px;
      }

      .plan-card {
        display: grid;
        gap: 10px;
        min-height: 210px;
        padding: 14px;
      }

      .plan-day {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        font-weight: 700;
      }

      .plan-card ul {
        display: grid;
        gap: 8px;
        margin: 0;
        padding: 0;
        list-style: none;
      }

      .plan-card li {
        padding: 8px;
        border-radius: var(--radius);
        background: var(--paper-soft);
        color: var(--muted);
        font-size: 13px;
      }

      .resource-tools {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .search-input {
        width: min(380px, 100%);
        min-height: 42px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        color: var(--ink);
      }

      .search-input:focus,
      .task-input:focus,
      .task-select:focus,
      textarea:focus {
        border-color: var(--red);
        outline: 3px solid rgba(158, 27, 50, 0.13);
      }

      .resource-list {
        display: grid;
        gap: 10px;
      }

      .resource-row {
        display: grid;
        grid-template-columns: 84px minmax(0, 1fr) 118px 112px;
        gap: 12px;
        align-items: center;
        min-height: 70px;
        padding: 14px;
      }

      .resource-row p {
        margin: 2px 0 0;
        color: var(--muted);
        font-size: 13px;
      }

      .resource-type {
        color: var(--red);
        font-size: 13px;
        font-weight: 700;
      }

      .resource-date {
        color: var(--muted);
        font-size: 13px;
        font-weight: 750;
      }

      .resource-button,
      .text-button {
        color: var(--red);
        font-weight: 700;
      }

      .review-grid {
        display: grid;
        grid-template-columns: 0.82fr 1.18fr;
        gap: 14px;
      }

      .review-card,
      .note-card {
        padding: 18px;
      }

      .review-score {
        display: grid;
        place-items: center;
        min-height: 260px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper-soft);
      }

      .score-ring {
        display: grid;
        place-items: center;
        width: 180px;
        height: 180px;
        border-radius: 50%;
        background:
          conic-gradient(var(--red) var(--score), #e8edf4 0),
          var(--paper);
      }

      .score-ring-inner {
        display: grid;
        place-items: center;
        width: 132px;
        height: 132px;
        border-radius: 50%;
        background: var(--paper);
      }

      .score-ring strong {
        font-size: 42px;
        line-height: 1;
      }

      .score-ring span {
        color: var(--muted);
        font-size: 13px;
      }

      .note-stack {
        display: grid;
        gap: 12px;
      }

      .note-card textarea {
        width: 100%;
        min-height: 140px;
        resize: vertical;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        color: var(--ink);
        line-height: 1.7;
      }

      .empty-state {
        padding: 24px;
        border: 1px dashed var(--line-strong);
        border-radius: var(--radius);
        color: var(--muted);
        text-align: center;
      }

      .task-dialog {
        width: min(460px, calc(100% - 32px));
        padding: 0;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        box-shadow: var(--shadow);
      }

      .task-dialog::backdrop {
        background: rgba(17, 24, 39, 0.42);
      }

      .app-modal-backdrop {
        position: fixed;
        inset: 0;
        z-index: 120;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 24px;
        background: rgba(17, 24, 39, 0.46);
        backdrop-filter: blur(6px);
      }

      .app-modal {
        display: grid;
        grid-template-rows: auto minmax(0, 1fr);
        width: min(1120px, 100%);
        max-height: 90vh;
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.76);
        border-radius: 16px;
        background: var(--paper);
        box-shadow: var(--shadow-modal);
      }

      .app-modal-head {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 16px;
        min-height: 72px;
        padding: 14px 76px;
        border-bottom: 1px solid var(--line);
        background: #ffffff;
      }

      .app-modal-title {
        display: flex;
        min-width: 0;
        align-items: center;
        justify-content: center;
        gap: 14px;
        text-align: left;
      }

      .modal-artwork {
        width: 58px;
        height: 58px;
      }

      .app-modal-title-copy {
        min-width: 0;
      }

      .app-modal-title-copy p,
      .app-modal-title-copy h2,
      .app-modal-title-copy span {
        margin: 0;
      }

      .app-modal-title-copy p {
        color: var(--red);
        font-size: 12px;
        font-weight: 700;
      }

      .app-modal-title-copy h2 {
        font-size: 21px;
        line-height: 1.2;
      }

      .app-modal-title-copy span {
        display: block;
        margin-top: 3px;
        color: var(--muted);
        font-size: 13px;
        font-weight: 650;
        line-height: 1.45;
      }

      .app-modal-content {
        min-height: 0;
        overflow: auto;
        background: #ffffff;
        scrollbar-gutter: stable;
      }

      .app-modal-content .screen {
        padding: 20px;
      }

      .app-modal-content .embedded-screen {
        padding: 16px;
      }

      .app-modal-content .embedded-frame-wrap {
        min-height: 0;
      }

      .app-modal-content .embedded-frame {
        height: min(740px, calc(90vh - 206px));
        min-height: 620px;
      }

      .app-modal-backdrop-payroll-tool {
        align-items: stretch;
        padding: 8px;
      }

      .app-modal-payroll-tool {
        width: min(1680px, calc(100vw - 16px));
        height: calc(100dvh - 16px);
        max-height: none;
        border-radius: 12px;
      }

      .app-modal-payroll-tool .app-modal-head {
        align-items: center;
        min-height: 60px;
        padding: 9px 12px;
      }

      .app-modal-payroll-tool .modal-artwork {
        width: 46px;
        height: 46px;
      }

      .app-modal-payroll-tool .app-modal-title-copy p,
      .app-modal-payroll-tool .app-modal-title-copy span {
        display: none;
      }

      .app-modal-payroll-tool .app-modal-title-copy h2 {
        font-size: 20px;
      }

      .app-modal-payroll-tool .app-modal-content {
        overflow: hidden;
      }

      .app-modal-payroll-tool .app-modal-content .embedded-screen {
        height: 100%;
        padding: 0;
      }

      .app-modal-payroll-tool .embedded-screen > .screen-header {
        display: none;
      }

      .app-modal-payroll-tool .embedded-frame-wrap {
        height: 100%;
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
      }

      .app-modal-payroll-tool .app-modal-content .embedded-frame {
        height: 100%;
        min-height: 0;
      }

      .app-modal-backdrop-cheque-consistency {
        align-items: stretch;
        padding: 8px;
      }

      .app-modal-cheque-consistency {
        width: min(1680px, calc(100vw - 16px));
        height: calc(100dvh - 16px);
        max-height: none;
        border-radius: 12px;
      }

      .app-modal-cheque-consistency .app-modal-head {
        min-height: 60px;
        padding: 9px 12px;
      }

      .app-modal-cheque-consistency .modal-artwork {
        width: 46px;
        height: 46px;
      }

      .app-modal-cheque-consistency .app-modal-title-copy p,
      .app-modal-cheque-consistency .app-modal-title-copy span {
        display: none;
      }

      .app-modal-cheque-consistency .app-modal-title-copy h2 {
        font-size: 20px;
      }

      .app-modal-cheque-consistency .app-modal-content {
        overflow: hidden;
      }

      .app-modal-cheque-consistency .app-modal-content .embedded-screen {
        height: 100%;
        padding: 0;
      }

      .app-modal-cheque-consistency .embedded-screen > .screen-header {
        display: none;
      }

      .app-modal-cheque-consistency .embedded-frame-wrap {
        height: 100%;
        min-height: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
      }

      .app-modal-cheque-consistency .app-modal-content .embedded-frame {
        height: 100%;
        min-height: 0;
      }

      .app-modal-head .icon-button {
        position: absolute;
        top: 50%;
        right: 16px;
        width: 42px;
        height: 42px;
        border-color: transparent;
        background: var(--paper-soft);
        transform: translateY(-50%);
      }

      .app-modal-head .icon-button:hover,
      .app-modal-head .icon-button:focus-visible {
        color: var(--ink);
        border-color: var(--line);
        background: #eef2f6;
        box-shadow: none;
        transform: translateY(-50%);
      }

      .dialog-content {
        display: grid;
        gap: 15px;
        padding: 20px;
      }

      .dialog-head,
      .dialog-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      label {
        display: grid;
        gap: 7px;
        color: var(--ink);
        font-size: 13px;
        font-weight: 700;
      }

      .task-input,
      .task-select {
        min-height: 42px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        color: var(--ink);
      }

      .toast {
        position: fixed;
        right: 24px;
        bottom: 24px;
        z-index: 80;
        max-width: min(360px, calc(100% - 48px));
        padding: 12px 14px;
        border: 1px solid rgba(158, 27, 50, 0.24);
        border-radius: var(--radius);
        background: var(--paper);
        color: var(--ink);
        box-shadow: var(--shadow);
        opacity: 0;
        transform: translateY(8px);
        transition: opacity 0.18s ease, transform 0.18s ease;
        pointer-events: none;
      }

      .toast.show {
        opacity: 1;
        transform: translateY(0);
      }

      .brand-button {
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--ink);
        text-align: left;
        cursor: pointer;
      }

      .portal-main {
        min-width: 0;
      }

      .portal-screen {
        gap: 22px;
        padding: 0;
      }

      .portal-hero {
        position: relative;
        display: grid;
        grid-template-columns: minmax(0, 1fr) 254px;
        align-items: stretch;
        gap: 18px;
        min-height: 0;
        padding: 0;
        overflow: visible;
      }

      .portal-hero::after {
        display: none;
      }

      .portal-hero-main {
        position: relative;
        z-index: 1;
        overflow: hidden;
        min-height: 254px;
        padding: 28px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        box-shadow: var(--shadow);
      }

      .portal-hero-main::before {
        position: absolute;
        top: -140px;
        right: -140px;
        width: 280px;
        height: 280px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(158, 27, 50, 0.08) 0%, transparent 70%);
        content: "";
        pointer-events: none;
      }

      .hero-greeting {
        display: flex;
        align-items: center;
        gap: 14px;
        margin-bottom: 16px;
      }

      .hero-avatar {
        display: inline-flex;
        width: 56px;
        height: 56px;
        overflow: hidden;
        padding: 0;
        border: 3px solid var(--red);
        border-radius: 50%;
        background: var(--paper);
        box-shadow: 0 10px 28px rgba(158, 27, 50, 0.16);
        cursor: pointer;
        flex: 0 0 auto;
      }

      .hero-avatar-interaction {
        position: relative;
        display: inline-flex;
        width: 56px;
        height: 56px;
        flex: 0 0 auto;
      }

      .hero-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 20%;
        transform: scale(1.22);
      }

      .app-artwork-corporate-guide,
      .app-artwork-payroll-tool,
      .app-artwork-cheque-consistency,
      .app-artwork-atm-card-expiry-reminder {
        overflow: visible;
        border: 1px solid rgba(98, 67, 70, 0.1);
        border-radius: 20px;
        background: #fff;
        box-shadow: 0 10px 22px rgba(57, 30, 34, 0.13), inset 0 1px 0 #fff;
      }

      .app-artwork-corporate-guide img,
      .app-artwork-payroll-tool img,
      .app-artwork-cheque-consistency img,
      .app-artwork-atm-card-expiry-reminder img {
        width: 92%;
        height: 92%;
        filter: drop-shadow(0 5px 5px rgba(61, 33, 36, 0.08));
      }

      .hero-hello {
        margin: 0;
        color: var(--muted);
        font-size: 14px;
        font-weight: 700;
      }

      .hero-hello strong {
        display: block;
        color: var(--ink);
        font-size: 22px;
        font-weight: 700;
        line-height: 1.2;
      }

      .hero-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 22px;
      }

      .chip-button {
        display: inline-flex;
        min-height: 38px;
        align-items: center;
        gap: 6px;
        padding: 0 14px;
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--ink);
        background: var(--paper-soft);
        font-weight: 700;
      }

      .chip-button:hover,
      .chip-button:focus-visible {
        border-color: var(--red);
        color: var(--red);
        outline: none;
      }

      .chip-button svg {
        width: 16px;
        height: 16px;
      }

      .chip-button-red {
        color: #ffffff;
        border-color: var(--red);
        background: var(--red);
      }

      .chip-button-red:hover,
      .chip-button-red:focus-visible {
        color: #ffffff;
        background: var(--red-dark);
      }

      .portal-hero-card {
        position: relative;
        z-index: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-width: 0;
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        box-shadow: var(--shadow);
      }

      .portal-hero-card h2 {
        margin-bottom: 14px;
        font-size: 17px;
        line-height: 1.25;
      }

      .quick-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .quick-tile {
        min-height: 74px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper-soft);
      }

      .quick-tile-full {
        grid-column: 1 / -1;
      }

      .quick-tile span {
        display: block;
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
      }

      .quick-tile strong {
        display: block;
        margin-top: 4px;
        color: var(--ink);
        font-size: 24px;
        font-weight: 700;
        line-height: 1.15;
      }

      .portal-hero h1 {
        margin-bottom: 8px;
        font-size: clamp(34px, 4vw, 46px);
        font-weight: 700;
        line-height: 1.18;
      }

      .portal-hero .screen-copy {
        max-width: 620px;
        font-size: 16px;
      }

      .launcher-tools {
        display: grid;
        grid-template-columns: minmax(260px, 0.7fr) minmax(0, 1fr);
        gap: 14px;
        align-items: center;
      }

      .search-shell {
        display: grid;
        grid-template-columns: 20px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        min-height: 44px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
      }

      .search-shell span {
        color: var(--muted);
      }

      .search-shell input {
        width: 100%;
        min-height: 40px;
        border: 0;
        outline: none;
        background: transparent;
        color: var(--ink);
      }

      .category-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: flex-end;
      }

      .category-tab {
        min-height: 36px;
        padding: 0 12px;
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--muted);
        background: var(--paper);
        font-size: 13px;
        font-weight: 700;
      }

      .category-tab.active,
      .category-tab:hover {
        border-color: rgba(158, 27, 50, 0.28);
        color: var(--red);
        background: var(--red-soft);
      }

      .app-card-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(208px, 1fr));
        gap: 14px;
      }

      .app-card {
        position: relative;
        display: grid;
        grid-template-rows: auto auto minmax(58px, 1fr) auto auto;
        gap: 12px;
        min-height: 244px;
        justify-items: center;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        cursor: pointer;
        overflow: hidden;
        text-align: center;
        transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
      }

      .app-card::before {
        position: absolute;
        inset: 0 0 auto;
        height: 3px;
        background: transparent;
        content: "";
        transition: background-color 0.18s ease;
      }

      .app-card:hover {
        border-color: var(--line-strong);
        box-shadow: 0 18px 34px rgba(17, 24, 39, 0.09);
        transform: translateY(-3px);
      }

      .app-card:hover::before {
        background: var(--red);
      }

      .app-card:active {
        transform: translateY(-1px);
      }

      .app-card.is-placeholder {
        background: linear-gradient(135deg, var(--paper), #f8fafc);
      }

      .app-card-top,
      .app-card-meta {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
      }

      .app-card-top {
        position: relative;
        min-height: 88px;
      }

      .app-card-badges {
        position: absolute;
        top: 0;
        right: 0;
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 6px;
        min-width: 0;
      }

      .app-badge {
        display: inline-flex;
        min-height: 22px;
        align-items: center;
        padding: 0 8px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
      }

      .app-badge-green {
        color: var(--green);
        background: var(--green-soft);
      }

      .app-badge-amber {
        color: var(--amber);
        background: var(--amber-soft);
      }

      .app-badge-slate {
        color: var(--muted);
        background: #eef2f6;
      }

      .app-card p {
        margin-bottom: 0;
        color: var(--muted);
        font-size: 14px;
        line-height: 1.62;
      }

      .app-card h3 {
        margin-bottom: 0;
        font-size: 22px;
        letter-spacing: 0;
      }

      .app-card-meta {
        color: var(--muted);
        font-size: 13px;
        font-weight: 800;
      }

      .app-card .primary-button {
        width: 100%;
        align-self: end;
      }

      .launcher-artwork {
        width: 88px;
        height: 88px;
      }

      .app-card-corporate-guide .module-icon,
      .app-card-corporate-guide .small-tag {
        color: var(--red);
        border-color: rgba(158, 27, 50, 0.18);
        background: var(--red-soft);
      }

      .app-card-payroll-tool .module-icon,
      .app-card-payroll-tool .small-tag {
        color: #0f766e;
        border-color: rgba(15, 118, 110, 0.18);
        background: #ecfdf5;
      }

      .app-card-cheque-consistency .module-icon,
      .app-card-cheque-consistency .small-tag {
        color: #9a3412;
        border-color: rgba(154, 52, 18, 0.18);
        background: #fff7ed;
      }

      .app-card-atm-card-expiry-reminder .module-icon,
      .app-card-atm-card-expiry-reminder .small-tag {
        color: #b45309;
        border-color: rgba(180, 83, 9, 0.2);
        background: #fffbeb;
      }

      .app-card-future-tools .module-icon,
      .app-card-future-tools .small-tag {
        color: #1d4ed8;
        border-color: rgba(29, 78, 216, 0.18);
        background: #eff6ff;
      }

      .recent-strip {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
      }

      .recent-app {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 66px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        color: var(--ink);
        font-weight: 700;
        text-align: left;
      }

      .recent-app .module-icon {
        width: 38px;
        height: 38px;
        margin: 0;
        flex: 0 0 auto;
      }

      .rail-link {
        display: grid;
        gap: 3px;
        width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        color: inherit;
        text-align: left;
      }

      .rail-muted {
        margin-bottom: 0;
        color: var(--muted);
        font-size: 13px;
      }

      .future-board {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
      }

      .tucked-board {
        grid-template-columns: minmax(0, 1fr);
      }

      .future-card {
        display: grid;
        gap: 10px;
        min-height: 190px;
        align-content: start;
        padding: 20px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: linear-gradient(180deg, var(--paper), #fbfcfd);
        box-shadow: 0 8px 20px rgba(17, 24, 39, 0.04);
      }

      .future-card p {
        margin-bottom: 0;
        color: var(--muted);
      }

      .tucked-card {
        grid-template-columns: 46px minmax(0, 1fr) auto;
        min-height: 0;
        align-items: center;
        background: var(--paper);
      }

      .tucked-card .module-icon {
        margin: 0;
      }

      .tucked-card h2,
      .tucked-card p {
        grid-column: 2;
      }

      .tucked-card h2 {
        margin-bottom: 0;
      }

      .tucked-card .secondary-button {
        grid-column: 3;
        grid-row: 1 / span 2;
      }

      .corporate-screen {
        gap: 14px;
        background: #f6f7f9;
      }

      .corporate-mini-header {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr) 44px;
        align-items: center;
        min-height: 46px;
        border-bottom: 1px solid var(--line);
        background: #ffffff;
      }

      .corporate-mini-header strong {
        min-width: 0;
        color: var(--ink);
        font-size: 18px;
        font-weight: 700;
        line-height: 1.25;
        text-align: center;
      }

      .mini-back {
        color: var(--ink);
        font-size: 34px;
        line-height: 1;
      }

      .mini-back.ghost {
        visibility: hidden;
      }

      .corporate-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .choice-panel-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(180px, 0.34fr);
        gap: 12px;
        align-items: start;
      }

      .choice-panel-head p {
        margin-bottom: 0;
        color: var(--muted);
      }

      .choice-next-hint {
        display: block;
        padding: 10px 12px;
        border: 1px solid rgba(158, 27, 50, 0.16);
        border-radius: var(--radius);
        background: var(--red-soft);
        color: #8f0f18;
        font-size: 12px;
        font-weight: 700;
        line-height: 1.45;
      }

      .choice-next-hint.active {
        border-color: rgba(22, 128, 75, 0.22);
        background: #eefaf3;
        color: var(--green);
      }

      .choice-panel,
      .corporate-result {
        display: grid;
        gap: 12px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
      }

      .choice-panel > p {
        margin-bottom: 0;
        color: var(--muted);
      }

      .choice-grid-portal {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
      }

      .choice-card-portal {
        display: grid;
        grid-template-columns: minmax(108px, 0.3fr) minmax(0, 1fr) auto;
        gap: 10px;
        min-height: 84px;
        align-content: start;
        align-items: start;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #ffffff;
        color: var(--ink);
        text-align: left;
        cursor: pointer;
        transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
      }

      .choice-card-portal:hover,
      .choice-card-portal.active {
        border-color: rgba(158, 27, 50, 0.36);
        background: var(--red-soft);
        box-shadow: 0 12px 26px rgba(17, 24, 39, 0.06);
        transform: translateY(-1px);
      }

      .choice-title {
        color: var(--ink);
        font-size: 16px;
        font-weight: 700;
        line-height: 1.35;
      }

      .choice-desc {
        display: block;
        min-width: 0;
        padding-left: 14px;
        border-left: 1px solid var(--line);
        color: var(--muted);
        font-size: 13px;
        line-height: 1.45;
        overflow-wrap: anywhere;
      }

      .choice-action {
        align-self: center;
        white-space: nowrap;
        color: var(--red);
        font-size: 12px;
        font-weight: 700;
      }

      .start-selector-panel {
        gap: 14px;
      }

      .start-selector-head {
        display: grid;
        gap: 4px;
      }

      .start-selector-head h2 {
        font-size: clamp(22px, 2.5vw, 28px);
        line-height: 1.18;
      }

      .start-selector-board {
        display: grid;
        grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
        gap: 12px;
      }

      .start-selector-section {
        display: grid;
        gap: 10px;
        min-width: 0;
      }

      .start-selector-section h3 {
        margin: 0;
        color: var(--muted);
        font-size: 13px;
        font-weight: 700;
      }

      .start-choice-grid {
        display: grid;
        gap: 8px;
      }

      .customer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .business-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .start-choice {
        display: grid;
        gap: 5px;
        min-height: 74px;
        align-content: center;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #ffffff;
        color: var(--ink);
        text-align: left;
      }

      .start-choice strong {
        font-size: 16px;
        line-height: 1.25;
      }

      .start-choice span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.35;
      }

      .start-choice.active,
      .start-choice:hover,
      .start-choice:focus-visible {
        border-color: rgba(158, 27, 50, 0.36);
        background: var(--red-soft);
        outline: none;
      }

      .business-choice {
        min-height: 68px;
      }

      .business-choice.disabled {
        color: #9aa2ad;
        background: #f7f8fb;
      }

      .choice-actions,
      .corporate-result-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
      }

      .check-choice {
        grid-template-columns: 20px minmax(0, 1fr);
        cursor: pointer;
      }

      .check-choice .choice-copy {
        display: grid;
        grid-template-columns: minmax(108px, 0.34fr) minmax(0, 1fr);
        gap: 14px;
        min-width: 0;
      }

      .check-choice input,
      .corporate-check input {
        accent-color: var(--red);
      }

      .warning-panel {
        border-color: rgba(154, 103, 0, 0.25);
        background: var(--amber-soft);
      }

      .corporate-trail {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .corporate-trail span {
        display: inline-flex;
        min-height: 30px;
        align-items: center;
        padding: 0 10px;
        border: 1px solid var(--line);
        border-radius: 999px;
        color: var(--muted);
        background: var(--paper);
        font-size: 13px;
        font-weight: 700;
      }

      .corporate-trail span.done {
        color: var(--red);
        border-color: rgba(158, 27, 50, 0.2);
        background: var(--red-soft);
      }

      .corporate-trail strong {
        display: inline-flex;
        min-height: 30px;
        align-items: center;
        padding: 0 10px;
        border: 1px solid rgba(17, 24, 39, 0.1);
        border-radius: 999px;
        background: #ffffff;
        color: var(--ink);
        font-size: 13px;
        font-weight: 700;
        line-height: 1.4;
      }

      .primary-button.is-soft-disabled {
        border-color: rgba(154, 103, 0, 0.2);
        background: var(--amber-soft);
        color: #705000;
      }

      .corporate-progress {
        display: grid;
        gap: 8px;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper-soft);
      }

      .corporate-groups {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 14px;
      }

      .corporate-group,
      .corporate-notes {
        display: grid;
        align-content: start;
        gap: 12px;
        padding: 16px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #ffffff;
      }

      .corporate-checklist {
        display: grid;
        gap: 10px;
      }

      .corporate-check {
        display: grid;
        grid-template-columns: 20px minmax(0, 1fr);
        gap: 9px;
        align-items: center;
        padding: 10px 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper-soft);
        font-size: 14px;
        font-weight: 750;
      }

      .corporate-check.has-note {
        align-items: start;
        padding-block: 11px;
      }

      .corporate-check.has-note input {
        margin-top: 2px;
      }

      .corporate-check:hover {
        border-color: rgba(158, 27, 50, 0.26);
        background: #ffffff;
      }

      .material-copy {
        display: grid;
        gap: 5px;
        min-width: 0;
      }

      .corporate-check.is-compact .material-copy {
        min-height: 22px;
        align-content: center;
      }

      .material-title {
        color: var(--ink);
        line-height: 1.35;
        overflow-wrap: anywhere;
      }

      .material-note {
        display: block;
        padding-top: 6px;
        border-top: 1px solid var(--line);
        color: var(--muted);
        font-weight: 650;
        line-height: 1.55;
        overflow-wrap: anywhere;
      }

      .corporate-notes p {
        margin-bottom: 0;
        color: var(--muted);
      }

      .embedded-screen {
        padding: 18px;
      }

      .embedded-screen > .screen-header,
      .future-screen > .screen-header {
        padding: 18px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
      }

      .embedded-screen > .screen-header h1,
      .future-screen > .screen-header h1,
      .corporate-result .screen-header h1 {
        font-size: clamp(24px, 3vw, 32px);
        line-height: 1.18;
      }

      .embedded-frame-wrap {
        overflow: hidden;
        min-height: 760px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: #ffffff;
        box-shadow: 0 8px 22px rgba(17, 24, 39, 0.04);
      }

      .embedded-frame {
        display: block;
        width: 100%;
        min-height: 760px;
        height: calc(100vh - 190px);
        border: 0;
        background: var(--paper);
      }

      .site-record-footer {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 8px 14px;
        width: min(1120px, calc(100% - 32px));
        margin: -16px auto 28px;
        color: var(--muted);
        font-size: 13px;
        font-weight: 750;
        line-height: 1.6;
        text-align: center;
      }

      .site-record-footer a {
        color: var(--muted);
        text-decoration: none;
      }

      .site-record-footer a:hover,
      .site-record-footer a:focus-visible {
        color: var(--red);
        outline: none;
        text-decoration: underline;
        text-underline-offset: 3px;
      }

      [data-density="compact"] .screen {
        gap: 14px;
        padding: 18px;
      }

      [data-density="compact"] .task-card,
      [data-density="compact"] .resource-row {
        min-height: 58px;
        padding: 10px 12px;
      }

      @media (max-width: 1180px) {
        :root {
          --sidebar: 220px;
          --aside: 320px;
        }

        .app-shell {
          grid-template-columns: var(--sidebar) minmax(0, 1fr);
        }

        .portal-shell {
          grid-template-columns: minmax(0, 1fr);
          width: min(1120px, calc(100% - 32px));
        }

        .right-rail {
          grid-column: 1 / -1;
          position: static;
          grid-template-columns: repeat(3, minmax(0, 1fr));
          max-height: none;
        }

        .metric-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .app-card-grid {
          grid-template-columns: repeat(3, minmax(0, 1fr));
        }
      }

      @media (max-width: 860px) {
        .topbar {
          align-items: center;
          flex-direction: row;
          min-height: 64px;
          padding: 12px 14px;
        }

        .brand,
        .topbar-actions {
          min-width: 0;
        }

        .brand-tagline {
          display: none;
        }

        .brand-avatar {
          width: 30px;
          height: 30px;
        }

        .topbar-center {
          display: none;
        }

        .app-shell {
          grid-template-columns: 1fr;
          width: min(100% - 24px, 1500px);
        }

        .portal-shell {
          width: min(100% - 24px, 1120px);
        }

        .site-record-footer {
          width: min(100% - 24px, 1120px);
          margin-top: -8px;
        }

        .sidebar {
          position: static;
          max-height: none;
        }

        .app-modal-backdrop {
          align-items: stretch;
          padding: 10px;
        }

        .app-modal {
          width: 100%;
          height: calc(100dvh - 20px);
          max-height: none;
          border-radius: 14px;
        }

        .app-modal-head {
          align-items: flex-start;
          min-height: 66px;
          padding: 12px 62px;
        }

        .app-modal-title {
          align-items: center;
          justify-content: center;
          text-align: center;
        }

        .app-modal-title .modal-artwork {
          width: 46px;
          height: 46px;
        }

        .app-modal-title-copy h2 {
          font-size: 19px;
        }

        .app-modal-title-copy span {
          font-size: 12px;
        }

        .app-modal-content .screen {
          padding: 16px;
        }

        .app-modal-content .embedded-frame {
          height: calc(100dvh - 172px);
          min-height: 580px;
        }

        .nav-section {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .focus-card {
          grid-template-columns: 1fr;
        }

        .content-grid,
        .review-grid,
        .weekly-grid,
        .right-rail,
        .future-board {
          grid-template-columns: 1fr;
        }

        .task-card {
          grid-template-columns: 28px minmax(0, 1fr);
        }

        .task-card > .status-pill,
        .task-card > .progress-cell,
        .task-card > .resource-button {
          grid-column: 2;
        }

        .task-card > .resource-button {
          justify-self: start;
        }

        .resource-tools,
        .screen-header,
        .block-head,
        .portal-hero,
        .corporate-toolbar {
          align-items: flex-start;
          flex-direction: column;
        }

        .choice-panel-head {
          grid-template-columns: 1fr;
        }

        .resource-row {
          grid-template-columns: 1fr;
        }

        .launcher-tools {
          grid-template-columns: 1fr;
        }

        .category-tabs {
          justify-content: flex-start;
        }

        .choice-grid-portal,
        .corporate-groups,
        .recent-strip {
          grid-template-columns: 1fr;
        }

        .app-card-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 560px) {
        h1 {
          font-size: 28px;
        }

        .screen {
          padding: 16px;
        }

        .portal-shell {
          width: min(100% - 20px, 1120px);
          margin-top: 12px;
        }

        .portal-hero {
          grid-template-columns: 1fr;
          min-height: 0;
          gap: 12px;
        }

        .portal-hero::after {
          display: none;
        }

        .portal-hero .screen-copy {
          font-size: 14px;
        }

        .nav-section {
          grid-template-columns: 1fr;
        }

        .metric-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .brand-code {
          font-size: 24px;
        }

        .brand-title {
          font-size: 18px;
        }

        .portal-hero-main {
          min-height: 0;
          padding: 20px;
        }

        .portal-hero-card {
          width: 100%;
          min-width: 0;
        }

        .app-card-grid {
          grid-template-columns: 1fr;
        }

        .app-card {
          grid-template-columns: 1fr;
          grid-template-rows: auto auto auto auto auto;
          min-height: 226px;
          align-items: center;
          padding: 14px;
          text-align: center;
        }

        .app-card-top {
          grid-row: auto;
          align-self: center;
          justify-content: center;
          min-height: 82px;
        }

        .app-card-top .small-tag {
          display: none;
        }

        .app-card-badges {
          display: none;
        }

        .app-card h3,
        .app-card p,
        .app-card-meta,
        .app-card .primary-button {
          grid-column: 1;
        }

        .app-card h3 {
          font-size: 20px;
        }

        .app-card p {
          font-size: 13px;
        }

        .app-card .primary-button {
          min-height: 38px;
          justify-self: center;
          width: min(168px, 100%);
        }

        .launcher-artwork {
          width: 82px;
          height: 82px;
        }

        .tucked-card {
          grid-template-columns: 42px minmax(0, 1fr);
        }

        .tucked-card .secondary-button {
          grid-column: 2;
          grid-row: auto;
          justify-self: start;
        }

        .choice-panel {
          padding: 12px;
        }

        .start-selector-panel {
          gap: 10px;
        }

        .start-selector-head h2 {
          font-size: 22px;
        }

        .start-selector-board {
          grid-template-columns: 1fr;
          gap: 10px;
        }

        .customer-grid,
        .business-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .start-choice,
        .business-choice {
          min-height: 54px;
          padding: 10px;
        }

        .start-choice strong {
          font-size: 16px;
        }

        .start-choice span {
          display: none;
        }

        .choice-panel-head > div > p:not(.screen-kicker),
        .choice-next-hint {
          font-size: 12px;
          line-height: 1.4;
        }

        .choice-card-portal,
        .check-choice .choice-copy {
          grid-template-columns: minmax(0, 1fr) auto;
        }

        .check-choice {
          grid-template-columns: 20px minmax(0, 1fr);
        }

        .check-choice .choice-copy {
          grid-template-columns: 1fr;
        }

        .choice-card-portal {
          min-height: 58px;
          padding: 12px;
        }

        .choice-action {
          align-self: center;
        }

        .choice-desc {
          display: none;
        }

        .embedded-screen {
          padding: 12px;
        }

        .embedded-frame-wrap,
        .embedded-frame {
          min-height: 720px;
        }

        .app-modal-content .embedded-frame-wrap,
        .app-modal-content .embedded-frame {
          min-height: 0;
        }

        .app-modal-content .embedded-frame {
          height: calc(100dvh - 168px);
        }
      }

      /* 2026-07 portal preview: compact business workspace and accessible launcher. */
      .segment-icon {
        display: inline-flex;
        width: 16px;
        height: 16px;
        margin-right: 7px;
      }

      .portal-shell {
        width: min(1240px, calc(100% - 40px));
        margin-top: 22px;
      }

      .portal-screen {
        gap: 18px;
      }

      .portal-hero {
        grid-template-columns: minmax(0, 1fr) 300px;
        gap: 14px;
      }

      .portal-hero-main {
        min-height: 220px;
        padding: 26px 28px;
        box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
      }

      .portal-hero-main::before {
        display: none;
      }

      .hero-greeting {
        margin-bottom: 12px;
      }

      .hero-avatar {
        width: 48px;
        height: 48px;
        border-width: 2px;
        box-shadow: none;
      }

      .hero-avatar-interaction {
        width: 48px;
        height: 48px;
      }

      .hero-avatar:focus-visible {
        outline: 3px solid rgba(158, 27, 50, 0.2);
        outline-offset: 3px;
      }

      .hero-hello strong {
        font-size: 19px;
      }

      .portal-hero h1 {
        margin-bottom: 6px;
        font-size: 36px;
        line-height: 1.22;
      }

      .portal-hero .screen-copy {
        font-size: 15px;
      }

      .hero-actions {
        margin-top: 18px;
      }

      .chip-button,
      .category-tab,
      .app-badge {
        border-radius: 999px;
      }

      .chip-button {
        min-height: 40px;
        transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
      }

      .portal-hero-card {
        justify-content: flex-start;
        padding: 18px;
        box-shadow: 0 14px 34px rgba(17, 24, 39, 0.06);
      }

      .recent-head {
        display: flex;
        align-items: center;
        gap: 9px;
        min-height: 34px;
      }

      .recent-head h2 {
        margin: 0;
        font-size: 16px;
      }

      .recent-head-icon {
        display: inline-flex;
        width: 18px;
        height: 18px;
        color: var(--red);
      }

      .hero-recent-list {
        display: grid;
        gap: 8px;
        margin-top: 10px;
      }

      .hero-recent-item {
        display: grid;
        grid-template-columns: 38px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 10px;
        min-height: 50px;
        padding: 6px 9px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        color: var(--ink);
        background: var(--paper-soft);
        font-weight: 700;
        text-align: left;
        transition: border-color 0.16s ease, background-color 0.16s ease;
      }

      .hero-recent-item:hover,
      .hero-recent-item:focus-visible {
        border-color: rgba(158, 27, 50, 0.34);
        background: var(--red-soft);
        outline: none;
      }

      .hero-recent-artwork {
        width: 38px;
        height: 38px;
      }

      .hero-recent-arrow,
      .button-arrow,
      .command-arrow {
        display: inline-flex;
        width: 17px;
        height: 17px;
      }

      .recent-empty {
        display: grid;
        justify-items: center;
        align-content: center;
        gap: 10px;
        min-height: 150px;
        color: var(--muted);
        font-size: 13px;
        text-align: center;
      }

      .recent-empty img,
      .launcher-empty img,
      .command-empty img {
        width: 40px;
        height: 52px;
        opacity: 0.7;
      }

      .launcher-section {
        padding: 20px;
      }

      .launcher-section .block-head {
        margin-bottom: 14px;
      }

      .launcher-section .block-head h2 {
        font-size: 21px;
      }

      .launcher-section .block-head p {
        margin: 3px 0 0;
        color: var(--muted);
        font-size: 13px;
      }

      .launcher-count {
        color: var(--muted);
        font-size: 13px;
        font-weight: 700;
      }

      .launcher-search {
        display: grid;
        grid-template-columns: 20px minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px;
        min-height: 46px;
        margin-bottom: 16px;
        padding: 0 13px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        color: var(--muted);
        background: var(--paper-soft);
        transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
      }

      .launcher-search:focus-within {
        border-color: rgba(158, 27, 50, 0.5);
        background: var(--paper);
        box-shadow: var(--focus-ring);
      }

      .launcher-search > span {
        display: inline-flex;
        width: 19px;
        height: 19px;
      }

      .launcher-search input {
        width: 100%;
        min-height: 42px;
        border: 0;
        outline: none;
        color: var(--ink);
        background: transparent;
      }

      kbd {
        display: inline-flex;
        min-height: 24px;
        align-items: center;
        padding: 0 7px;
        border: 1px solid var(--line-strong);
        border-radius: 5px;
        color: var(--muted);
        background: var(--paper);
        font-family: inherit;
        font-size: 11px;
        font-weight: 700;
        line-height: 1;
      }

      .app-card-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 12px;
      }

      .app-card {
        grid-template-rows: 82px auto auto minmax(68px, 1fr) auto auto;
        gap: 9px;
        min-height: 312px;
        padding: 15px;
        cursor: pointer;
        outline: none;
        box-shadow: none;
      }

      .app-card:focus-visible {
        border-color: rgba(158, 27, 50, 0.52);
        box-shadow: var(--focus-ring);
      }

      .app-card-top {
        min-height: 82px;
      }

      .launcher-artwork {
        width: 78px;
        height: 78px;
      }

      .app-card-badges {
        position: static;
        justify-content: center;
        min-height: 22px;
      }

      .app-badge {
        gap: 4px;
      }

      .badge-check {
        display: inline-flex;
        width: 12px;
        height: 12px;
      }

      .app-card h3 {
        font-size: 19px;
        line-height: 1.25;
      }

      .app-card p {
        font-size: 13px;
        line-height: 1.55;
      }

      .app-card-meta {
        min-height: 38px;
        align-items: flex-start;
        font-size: 12px;
        line-height: 1.5;
      }

      .app-card-action {
        display: inline-flex;
        width: 100%;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        gap: 8px;
      }

      .app-card:hover .button-arrow,
      .app-card:focus-visible .button-arrow {
        transform: translateX(2px);
      }

      .button-arrow {
        transition: transform 0.16s ease;
      }

      .launcher-empty,
      .command-empty {
        display: grid;
        justify-items: center;
        gap: 8px;
        min-height: 240px;
        align-content: center;
        padding: 20px;
        color: var(--muted);
        text-align: center;
      }

      .launcher-empty strong,
      .command-empty strong {
        color: var(--ink);
        font-size: 17px;
      }

      .app-modal-head .icon-button {
        width: 44px;
        height: 44px;
      }

      .start-choice:disabled,
      .start-choice.disabled {
        cursor: not-allowed;
        opacity: 0.52;
      }

      .start-choice:disabled:hover {
        border-color: var(--line);
        background: var(--paper-soft);
      }

      .command-backdrop {
        position: fixed;
        inset: 0;
        z-index: 90;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: min(16vh, 140px) 20px 20px;
        background: rgba(17, 24, 39, 0.48);
        backdrop-filter: blur(6px);
      }

      .command-palette {
        width: min(620px, 100%);
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        box-shadow: var(--shadow-modal);
        animation: commandEnter 0.16s ease-out both;
      }

      @keyframes commandEnter {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
      }

      .command-search {
        display: grid;
        grid-template-columns: 22px minmax(0, 1fr) auto;
        align-items: center;
        gap: 12px;
        min-height: 58px;
        padding: 0 15px;
        border-bottom: 1px solid var(--line);
      }

      .command-search > span {
        display: inline-flex;
        width: 21px;
        height: 21px;
        color: var(--muted);
      }

      .command-search input {
        width: 100%;
        min-height: 54px;
        border: 0;
        outline: none;
        color: var(--ink);
        background: transparent;
        font-size: 16px;
      }

      .command-body {
        max-height: min(480px, 62vh);
        overflow-y: auto;
        padding: 10px;
      }

      .command-label {
        padding: 4px 8px 8px;
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
      }

      .command-results {
        display: grid;
        gap: 5px;
      }

      .command-result {
        display: grid;
        grid-template-columns: 46px minmax(0, 1fr) 18px;
        align-items: center;
        gap: 12px;
        min-height: 62px;
        padding: 8px 10px;
        border: 1px solid transparent;
        border-radius: var(--radius);
        color: var(--ink);
        background: transparent;
        text-align: left;
      }

      .command-result:hover,
      .command-result:focus-visible {
        border-color: rgba(158, 27, 50, 0.24);
        background: var(--red-soft);
        outline: none;
      }

      .command-artwork {
        width: 46px;
        height: 46px;
      }

      .command-result-copy {
        display: grid;
        gap: 2px;
        min-width: 0;
      }

      .command-result-copy strong,
      .command-result-copy small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .command-result-copy small {
        color: var(--muted);
      }

      @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
          scroll-behavior: auto !important;
          animation-duration: 0.01ms !important;
          animation-iteration-count: 1 !important;
          transition-duration: 0.01ms !important;
        }
      }

      @media (max-width: 1180px) {
        .app-card-grid {
          grid-template-columns: repeat(3, minmax(0, 1fr));
        }
      }

      @media (max-width: 860px) {
        .portal-shell {
          width: min(100% - 24px, 1240px);
        }

        .portal-hero {
          display: grid;
          grid-template-columns: minmax(0, 1fr) 260px;
          align-items: stretch;
        }

        .app-card-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 680px) {
        .topbar-actions {
          gap: 7px;
        }

        .topbar-actions .action-refresh,
        .topbar-actions .action-density {
          display: none;
        }

        .portal-hero {
          grid-template-columns: 1fr;
        }

        .portal-hero-card {
          min-height: 0;
        }

        .hero-recent-list {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .hero-recent-item:nth-child(n + 3) {
          display: none;
        }
      }

      @media (max-width: 560px) {
        .topbar {
          min-height: 60px;
          padding: 9px 12px;
        }

        .brand-code {
          font-size: 22px;
        }

        .brand-title {
          font-size: 16px;
        }

        .brand-avatar {
          width: 28px;
          height: 28px;
        }

        .topbar-actions .icon-button {
          width: 38px;
          height: 38px;
        }

        .portal-shell {
          width: min(100% - 16px, 1240px);
          margin-top: 8px;
        }

        .portal-screen {
          gap: 12px;
        }

        .portal-hero-main {
          padding: 18px;
        }

        .portal-hero h1 {
          font-size: 29px;
        }

        .hero-actions {
          display: grid;
          grid-template-columns: repeat(3, minmax(0, 1fr));
          gap: 7px;
        }

        .chip-button {
          min-width: 0;
          justify-content: center;
          padding: 0 8px;
          font-size: 12px;
        }

        .chip-button svg {
          display: none;
        }

        .hero-recent-list {
          grid-template-columns: 1fr;
        }

        .launcher-section {
          padding: 15px;
        }

        .launcher-search kbd {
          display: none;
        }

        .launcher-search {
          grid-template-columns: 19px minmax(0, 1fr);
        }

        .app-card-grid {
          grid-template-columns: 1fr;
        }

        .app-card {
          grid-template-rows: 82px auto auto auto auto auto;
          min-height: 0;
          padding: 16px;
        }

        .app-card-meta {
          min-height: 0;
        }

        .app-card-action {
          width: min(220px, 100%);
        }

        .command-backdrop {
          padding: 70px 10px 10px;
        }

        .command-body {
          max-height: calc(100dvh - 160px);
        }
      }

      /* 2026-07-17 Kimi visual proposal: burgundy, ink, warm paper, and unified line icons. */
      ::selection {
        background: rgba(158, 27, 50, 0.14);
      }

      body {
        background: var(--bg);
      }

      .launcher-count,
      .app-card-meta,
      .metric strong,
      .site-record-footer {
        font-variant-numeric: tabular-nums;
      }

      .topbar {
        min-height: 60px;
        border-color: var(--line);
        background: rgba(245, 243, 238, 0.9);
        backdrop-filter: blur(18px);
      }

      .brand {
        min-width: 250px;
        gap: 10px;
      }

      .brand-mark {
        display: block;
        width: 38px;
        height: 38px;
        flex: 0 0 auto;
      }

      .brand-wordmark {
        position: relative;
        color: var(--ink);
        font-size: 21px;
        font-weight: 700;
        line-height: 1;
      }

      .brand-wordmark::after {
        position: absolute;
        right: 0;
        bottom: -7px;
        left: 0;
        width: 26px;
        height: 2px;
        background: var(--gold);
        content: "";
      }

      .brand-platform {
        padding-left: 12px;
        border-left: 1px solid var(--line-strong);
        color: var(--amber);
        font-size: 12px;
        font-weight: 700;
      }

      .brand-study,
      .brand-motto {
        font-size: 13px;
        font-weight: 700;
        white-space: nowrap;
      }

      .brand-study {
        color: var(--ink);
      }

      .brand-motto {
        color: var(--red);
      }

      .topbar-segment {
        border-color: transparent;
        border-radius: var(--radius);
        background: transparent;
      }

      .segment-tab {
        position: relative;
        border-radius: 0;
        font-weight: 700;
      }

      .segment-tab.active {
        background: transparent;
        box-shadow: none;
      }

      .segment-tab.active::after {
        position: absolute;
        right: 14px;
        bottom: 1px;
        left: 14px;
        height: 2px;
        background: var(--red);
        content: "";
      }

      .brand-easter-egg {
        position: fixed;
        top: 66px;
        left: 18px;
        z-index: 90;
        display: flex;
        align-items: center;
        gap: 12px;
        width: max-content;
        max-width: calc(100vw - 36px);
        padding: 11px 38px 11px 11px;
        border: 1px solid rgba(195, 160, 90, 0.46);
        border-radius: 16px;
        color: #f3efe6;
        background: linear-gradient(135deg, #1b1d24, #14161b);
        box-shadow:
          0 20px 50px rgba(20, 22, 27, 0.32),
          inset 0 1px 0 rgba(255, 255, 255, 0.06);
        animation: brand-easter-in 0.38s cubic-bezier(0.34, 1.56, 0.64, 1) both;
      }

      .brand-easter-egg strong {
        display: block;
        margin-top: 1px;
        color: #f3efe6;
        font-family: var(--font-display);
        font-size: 19px;
        font-weight: 600;
        line-height: 1.3;
        white-space: nowrap;
      }

      .brand-easter-avatar {
        position: relative;
        display: inline-flex;
        width: 56px;
        height: 56px;
        overflow: hidden;
        border: 2px solid var(--gold);
        border-radius: 50%;
        background: #7a1226;
        box-shadow: 0 0 0 3px rgba(195, 160, 90, 0.14);
        flex: 0 0 auto;
        animation: brand-easter-avatar-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.08s both;
      }

      .brand-easter-person {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 20%;
        transform: scale(1.2);
      }

      .brand-easter-copy {
        display: block;
        min-width: 0;
      }

      .brand-easter-label {
        display: block;
        color: var(--gold);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 0.14em;
        line-height: 1.35;
        white-space: nowrap;
      }

      .brand-easter-close {
        position: absolute;
        top: 7px;
        right: 8px;
        display: grid;
        width: 24px;
        height: 24px;
        padding: 5px;
        border: 0;
        border-radius: 50%;
        color: #918a7d;
        background: transparent;
        cursor: pointer;
        place-items: center;
      }

      .brand-easter-close:hover,
      .brand-easter-close:focus-visible {
        color: #f3efe6;
        background: rgba(255, 255, 255, 0.08);
        outline: none;
      }

      .brand-easter-close svg {
        width: 14px;
        height: 14px;
        fill: none;
        stroke: currentColor;
        stroke-linecap: round;
        stroke-linejoin: round;
        stroke-width: 1.8;
      }

      @keyframes brand-easter-in {
        from { opacity: 0; transform: translateY(-7px) scale(0.92); }
        to { opacity: 1; transform: translateY(0) scale(1); }
      }

      @keyframes brand-easter-avatar-in {
        from { transform: scale(0.65); }
        to { transform: scale(1); }
      }

      @media (prefers-reduced-motion: reduce) {
        .brand-easter-egg,
        .brand-easter-avatar {
          animation: none;
        }
      }

      .portal-shell {
        width: min(1240px, calc(100% - 40px));
      }

      .portal-hero {
        overflow: hidden;
        gap: 0;
        border: 1px solid #2a2e37;
        border-radius: var(--radius);
        color: #ece7dd;
        background: var(--dark);
        box-shadow: var(--shadow-strong);
      }

      .portal-hero-main {
        min-height: 264px;
        padding: 34px;
        border: 0;
        border-radius: 0;
        color: #ece7dd;
        background: transparent;
        box-shadow: none;
      }

      .hero-greeting {
        margin-bottom: 12px;
      }

      .hero-hello {
        color: var(--gold);
        font-size: 12px;
        font-weight: 700;
      }

      .portal-hero h1 {
        margin: 0 0 8px;
        color: #ffffff;
        font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
        font-size: 40px;
        font-weight: 600;
        line-height: 1.25;
      }

      .portal-hero .screen-copy {
        max-width: 650px;
        color: #b8b4ab;
      }

      .chip-button {
        border-color: rgba(255, 255, 255, 0.16);
        color: #ece7dd;
        background: rgba(255, 255, 255, 0.06);
        font-weight: 700;
        backdrop-filter: blur(6px);
      }

      .chip-button svg {
        color: var(--gold);
      }

      .chip-button:hover,
      .chip-button:focus-visible {
        border-color: rgba(195, 160, 90, 0.72);
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
      }

      .portal-hero-card {
        margin: 16px 16px 16px 0;
        padding: 16px;
        border-color: rgba(255, 255, 255, 0.12);
        color: #ece7dd;
        background: var(--dark-soft);
        box-shadow: none;
      }

      .portal-hero-card h2,
      .recent-head-icon {
        color: #ffffff;
      }

      .hero-recent-item {
        border-color: rgba(255, 255, 255, 0.1);
        color: #ece7dd;
        background: rgba(255, 255, 255, 0.04);
        font-weight: 700;
      }

      .hero-recent-item:hover,
      .hero-recent-item:focus-visible {
        border-color: rgba(195, 160, 90, 0.58);
        color: #ffffff;
        background: rgba(255, 255, 255, 0.08);
      }

      .hero-recent-arrow {
        color: var(--gold);
      }

      .hero-recent-artwork {
        border: 0;
        border-radius: var(--radius);
        background: transparent;
        box-shadow: none;
      }

      .recent-empty {
        color: #aaa69e;
      }

      .launcher-section {
        border-color: var(--line);
        background: rgba(255, 255, 255, 0.7);
        box-shadow: var(--shadow);
      }

      .launcher-section .block-head h2,
      .app-card h3 {
        font-family: "Songti SC", "STSong", "Noto Serif SC", serif;
        font-weight: 600;
      }

      .launcher-search {
        background: var(--paper-soft);
      }

      .app-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 14px;
      }

      .app-card {
        position: relative;
        grid-template-rows: 60px auto minmax(68px, 1fr) auto auto;
        gap: 10px;
        min-height: 286px;
        overflow: hidden;
        padding: 18px;
        border-color: var(--line);
        border-radius: var(--radius);
        background: var(--paper);
        box-shadow: var(--shadow);
        text-align: left;
        transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1), border-color 0.2s ease, box-shadow 0.2s ease;
        animation: launcher-card-in 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
      }

      .app-card:nth-child(2) { animation-delay: 40ms; }
      .app-card:nth-child(3) { animation-delay: 80ms; }
      .app-card:nth-child(4) { animation-delay: 120ms; }
      .app-card:nth-child(5) { animation-delay: 160ms; }

      @keyframes launcher-card-in {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
      }

      .app-card::before {
        height: 3px;
        background: linear-gradient(90deg, var(--red), var(--gold));
        opacity: 0;
      }

      .app-card:hover,
      .app-card:focus-visible {
        border-color: var(--line-strong);
        box-shadow: var(--shadow-strong);
        transform: translateY(-3px);
      }

      .app-card:hover::before,
      .app-card:focus-visible::before {
        opacity: 1;
      }

      .app-card-top {
        min-height: 56px;
        justify-content: flex-start;
      }

      .launcher-artwork {
        width: 56px;
        height: 56px;
        border: 0;
        border-radius: var(--radius);
        background: transparent;
        box-shadow: none;
      }

      .launcher-artwork img,
      .hero-recent-artwork img,
      .command-artwork img,
      .modal-artwork img {
        width: 100%;
        height: 100%;
        filter: none;
      }

      .app-card-badges {
        position: absolute;
        top: 18px;
        right: 18px;
        min-height: 0;
      }

      .app-badge {
        font-size: 10px;
        font-weight: 700;
      }

      .app-card h3 {
        margin: 0;
        font-size: 18px;
      }

      .app-card p {
        margin: 0;
        color: var(--muted);
      }

      .app-card-meta {
        min-height: 0;
        color: var(--muted);
      }

      .app-card .primary-button {
        width: auto;
        min-height: 34px;
        justify-content: flex-start;
        padding: 0;
        color: var(--red);
        background: transparent;
        font-weight: 700;
      }

      .app-card:hover .primary-button,
      .app-card:focus-visible .primary-button {
        color: var(--red-dark);
        background: transparent;
      }

      .modal-artwork,
      .command-artwork {
        border: 0;
        border-radius: var(--radius);
        background: transparent;
        box-shadow: none;
      }

      .app-modal-head,
      .command-panel,
      .toast {
        border-color: var(--line);
      }

      .site-record-footer {
        border-color: var(--line);
        background: rgba(245, 243, 238, 0.92);
      }

      @media (max-width: 680px) {
        .portal-hero-card {
          margin: 0 14px 14px;
        }
      }

      @media (max-width: 560px) {
        .brand {
          min-width: 0;
        }

        .brand-mark {
          width: 34px;
          height: 34px;
        }

        .brand-wordmark {
          font-size: 19px;
        }

        .brand-platform {
          display: none;
        }

        .brand-study,
        .brand-motto {
          font-size: 12px;
        }

        .brand-easter-egg {
          top: 58px;
          right: auto;
          left: 12px;
          max-width: calc(100vw - 24px);
        }

        .portal-hero-main {
          min-height: 0;
          padding: 24px 18px;
        }

        .portal-hero h1 {
          font-size: 30px;
        }

        .hero-actions {
          grid-template-columns: 1fr;
        }

        .chip-button {
          justify-content: flex-start;
          min-height: 44px;
          padding: 0 14px;
          font-size: 13px;
        }

        .chip-button svg {
          display: block;
        }

        .launcher-section {
          padding: 14px;
        }

        .app-card {
          grid-template-rows: 60px auto auto auto auto;
          min-height: 0;
        }
      }
