/*
 * EmlogStudio theme styles
 * Local assets only; compatible with the PHP 7.2+ Emlog theme templates.
 */

:root {
      color-scheme: dark;
      --bg: #020403;
      --panel: rgba(12, 17, 15, 0.96);
      --panel-strong: #0d1110;
      --panel-soft: rgba(255, 255, 255, 0.035);
      --line: rgba(220, 239, 231, 0.12);
      --line-strong: rgba(220, 239, 231, 0.24);
      --text: #f2f7f4;
      --muted: #8b9691;
      --subtle: #56605c;
      --green: #18e276;
      --green-bright: #63ffab;
      --green-dark: #063d24;
      --red: #ff5c50;
      --amber: #f0b55f;
      --blue: #38bdf8;
      --violet: #9d7cff;
      --tag-palette-1: #42d392;
      --tag-palette-2: #2dd4bf;
      --tag-palette-3: #38bdf8;
      --tag-palette-4: #fbbf24;
      --tag-palette-5: #fb923c;
      --tag-palette-6: #f87171;
      --tag-palette-7: #a3e635;
      --tag-palette-8: #67e8f9;
      --radius-xl: 24px;
      --radius-lg: 18px;
      --radius-md: 13px;
      --shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
      --font-xs: 11px;
      --font-sm: 12px;
      --font-md: 14px;
      --font-body: "Microsoft YaHei UI", "PingFang SC", sans-serif;
      --font-display: Bahnschrift, "DIN Alternate", "Microsoft YaHei UI", sans-serif;
    }

    * {
      box-sizing: border-box;
    }

    html {
      min-width: 320px;
      max-width: 100%;
      background: var(--bg);
      overflow-x: hidden;
    }

    body {
      min-height: 100vh;
      margin: 0;
      color: var(--text);
      font-family: var(--font-body);
      font-size: var(--font-md);
      /* Shared application chrome must keep one inherited rhythm across PJAX
         route changes. Homepage-specific tokens remain scoped below. */
      line-height: 1.45;
      background:
        radial-gradient(circle at 78% 12%, rgba(16, 101, 59, 0.08), transparent 32%),
        #020403;
      overflow-x: hidden;
    }

    /* `hidden` creates a non-scrolling overflow ancestor in Chromium, which
       prevents sticky article navigation from following page scroll. */
    @supports (overflow: clip) {
      html,
      body { overflow-x: clip; }
    }

    body::before {
      display: none;
      content: none;
    }

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

    button,
    a {
      -webkit-tap-highlight-color: transparent;
    }

    button {
      color: inherit;
    }

    .icon {
      width: 18px;
      height: 18px;
      flex: 0 0 auto;
      fill: none;
      stroke: currentColor;
      stroke-linecap: round;
      stroke-linejoin: round;
      stroke-width: 1.8;
    }

    .app-shell {
      display: grid;
      grid-template-columns: 190px minmax(0, 1fr) 276px;
      gap: 18px;
      width: min(1536px, calc(100% - 28px));
      min-height: calc(100vh - 28px);
      margin: 14px auto;
    }

    .emstudio-pjax-content {
      display: contents;
    }

    html.emstudio-pjax-loading::after,
    html.emstudio-page-leaving::after {
      position: fixed;
      z-index: 400;
      top: 0;
      right: 0;
      left: 0;
      height: 3px;
      content: "";
      background: linear-gradient(90deg, transparent 4%, var(--green-bright) 42%, rgba(var(--accent-rgb), .38) 78%, transparent 96%);
      box-shadow: 0 0 12px rgba(var(--accent-rgb), .3);
      pointer-events: none;
      animation: emstudio-pjax-progress 1.1s ease-in-out infinite;
    }

    html.emstudio-pjax-loading::before,
    html.emstudio-page-leaving::before {
      position: fixed;
      z-index: 401;
      top: max(14px, env(safe-area-inset-top));
      left: 50%;
      display: grid;
      min-height: 32px;
      padding: 0 13px 0 34px;
      place-items: center;
      content: attr(data-emstudio-loading-label);
      transform: translateX(-50%);
      color: #d9f8e4;
      background:
        radial-gradient(circle at 18px 50%, var(--green-bright) 0 3px, transparent 3.5px),
        linear-gradient(135deg, rgba(18, 31, 23, .96), rgba(8, 14, 10, .96));
      border: 1px solid rgba(var(--accent-rgb), .28);
      border-radius: 999px;
      box-shadow: 0 10px 26px rgba(0, 0, 0, .24), 0 0 0 4px rgba(var(--accent-rgb), .045);
      font-family: var(--font-body);
      font-size: 12px;
      letter-spacing: .04em;
      pointer-events: none;
      animation: emstudio-pjax-indicator .9s ease-in-out infinite;
    }

    html.emstudio-pjax-loading [data-emstudio-pjax-container] > *,
    html.emstudio-page-leaving [data-emstudio-pjax-container] > * {
      opacity: .86;
      pointer-events: none;
      transition: opacity .12s ease;
    }

    html.emstudio-pjax-entering [data-emstudio-pjax-container] > * {
      animation: emstudio-pjax-content-enter .2s cubic-bezier(.2, .72, .2, 1) both;
    }

    .nav-item.is-pjax-pending {
      color: #effff6;
      background: rgba(var(--accent-rgb), .08);
    }

    @keyframes emstudio-pjax-progress {
      0%, 100% { opacity: .52; transform: scaleX(.6); transform-origin: 18% 50%; }
      50% { opacity: 1; transform: scaleX(1); transform-origin: 82% 50%; }
    }

    @keyframes emstudio-pjax-indicator {
      0%, 100% { opacity: .76; transform: translateX(-50%) scale(.98); }
      50% { opacity: 1; transform: translateX(-50%) scale(1); }
    }

    @keyframes emstudio-pjax-content-enter {
      from { opacity: .01; transform: translateY(4px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @media (prefers-reduced-motion: reduce) {
      html.emstudio-pjax-loading [data-emstudio-pjax-container] > *,
      html.emstudio-page-leaving [data-emstudio-pjax-container] > * {
        transition: none;
      }

      html.emstudio-pjax-loading::after,
      html.emstudio-pjax-loading::before,
      html.emstudio-page-leaving::after,
      html.emstudio-page-leaving::before,
      html.emstudio-pjax-entering [data-emstudio-pjax-container] > * { animation: none; }
    }

    @media (forced-colors: active) {
      html.emstudio-pjax-loading::after,
      html.emstudio-page-leaving::after {
        background: Highlight;
        box-shadow: none;
      }
    }

    .glass {
      background:
        linear-gradient(145deg, rgba(255,255,255,.035), transparent 42%),
        var(--panel);
      border: 1px solid var(--line);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.05), var(--shadow);
    }

    .sidebar {
      position: sticky;
      top: 14px;
      display: flex;
      height: calc(100vh - 28px);
      min-height: 700px;
      flex-direction: column;
      padding: 20px 14px 16px;
      border-radius: var(--radius-xl);
      overflow: hidden;
    }

    /* Desktop navigation remains attached to the viewport across every view.
       Explicit grid columns preserve the original layout after it leaves the
       app-shell grid flow. Mobile keeps the existing drawer behaviour. */
    @media (min-width: 821px) {
      .app-shell > .sidebar {
        position: fixed;
        z-index: 20;
        top: 14px;
        left: max(14px, calc((100vw - 1536px) / 2));
        width: 190px;
      }

      .app-shell > .workspace {
        grid-column: 2;
        grid-row: 1;
      }
    }

    @media (min-width: 821px) and (max-width: 1280px) {
      .app-shell > .sidebar { width: 74px; }
    }

    @media (min-width: 1081px) {
      .app-shell:not(.wide-view) > .detail-panel {
        grid-column: 3;
        grid-row: 1;
      }
    }

    .sidebar::after {
      position: absolute;
      width: 160px;
      height: 160px;
      left: -78px;
      top: 84px;
      content: "";
      border-radius: 50%;
      background: radial-gradient(circle, rgba(230,255,243,.075), transparent 70%);
      pointer-events: none;
    }

    .brand {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: center;
      gap: 9px;
      min-height: 46px;
      padding: 0 7px 12px;
    }

    .brand-mark {
      position: relative;
      font-family: var(--font-display);
      font-size: 24px;
      font-weight: 800;
      letter-spacing: -2px;
      text-shadow: 0 0 18px rgba(var(--accent-rgb),.22);
    }

    .brand-mark span {
      display: inline-block;
      margin-left: -3px;
      transform: skewX(-14deg);
    }

    .brand-name {
      overflow: hidden;
      font-size: 11px;
      color: #d2dbd7;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .nav-list {
      position: relative;
      z-index: 1;
      display: grid;
      gap: 6px;
      margin-top: 26px;
    }

    .nav-item {
      position: relative;
      display: flex;
      width: 100%;
      min-height: 44px;
      align-items: center;
      gap: 12px;
      padding: 0 13px;
      color: #929c97;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 13px;
      cursor: pointer;
      transition: color .2s ease, background .2s ease, transform .2s ease, border-color .2s ease;
    }

    .nav-item:hover {
      color: #e9f1ed;
      background: rgba(255,255,255,.035);
      transform: translateX(2px);
    }

    .nav-item.active {
      color: #fff;
      background:
        linear-gradient(90deg, rgba(255,255,255,.13), rgba(255,255,255,.045)),
        #141918;
      border-color: rgba(255,255,255,.14);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 10px 30px rgba(0,0,0,.26);
    }

    .nav-item.active .nav-icon {
      color: var(--green-bright);
      filter: none;
    }

    .nav-text {
      flex: 1;
      text-align: left;
      font-size: 13px;
      white-space: nowrap;
    }

    .nav-arrow {
      width: 14px;
      opacity: 0;
      visibility: hidden;
      transition: opacity .16s ease;
    }

    .nav-item.active .nav-arrow {
      opacity: .75;
      visibility: visible;
    }

    .sidebar-bottom {
      position: relative;
      z-index: 1;
      margin-top: auto;
    }

    .workspace-switcher {
      padding: 13px 8px 16px;
      border-bottom: 1px solid rgba(255,255,255,.06);
    }

    .switcher-label {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
      color: #69736e;
      font-size: 10px;
    }

    .switcher {
      display: flex;
      width: 100%;
      min-height: 40px;
      align-items: center;
      gap: 8px;
      padding: 0 9px;
      color: #d4dcd8;
      background: rgba(255,255,255,.035);
      border: 1px solid rgba(255,255,255,.07);
      border-radius: 12px;
      cursor: pointer;
    }

    .switcher .icon {
      width: 15px;
    }

    .switcher span {
      overflow: hidden;
      flex: 1;
      font-size: 11px;
      text-align: left;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 16px 5px 4px;
    }

    .avatar {
      position: relative;
      display: grid;
      width: 35px;
      height: 35px;
      flex: 0 0 auto;
      place-items: center;
      color: #ecf2ef;
      font-family: var(--font-display);
      font-size: 11px;
      background: linear-gradient(145deg, #596661, #252c29);
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 50%;
    }

    .avatar::after {
      position: absolute;
      right: -1px;
      bottom: 0;
      width: 7px;
      height: 7px;
      content: "";
      background: var(--green);
      border: 2px solid #111513;
      border-radius: 50%;
      box-shadow: 0 0 10px rgba(var(--accent-rgb),.7);
    }

    .profile-meta {
      min-width: 0;
      flex: 1;
    }

    .profile-name,
    .profile-role {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-name {
      font-size: 11px;
      color: #e5ece8;
    }

    .profile-role {
      margin-top: 3px;
      color: #69736e;
      font-size: 9px;
    }

    .workspace {
      display: flex;
      min-width: 0;
      flex-direction: column;
      padding: 7px 0 0;
    }

    .topbar {
      display: grid;
      grid-template-columns: minmax(170px, .75fr) minmax(290px, 1.15fr) auto;
      min-height: 74px;
      align-items: center;
      gap: 18px;
    }

    .page-title h1 {
      margin: 0 0 5px;
      font-family: var(--font-display);
      font-size: 21px;
      font-weight: 650;
      letter-spacing: .03em;
    }

    .page-title p {
      margin: 0;
      color: #69736e;
      font-size: 10px;
      letter-spacing: .08em;
    }

    .search-box {
      position: relative;
    }

    .search-box .icon {
      position: absolute;
      top: 50%;
      left: 14px;
      width: 15px;
      color: #7a8580;
      transform: translateY(-50%);
      pointer-events: none;
    }

    .search-box input {
      width: 100%;
      height: 39px;
      padding: 0 54px 0 39px;
      color: #dfe6e2;
      outline: none;
      background: rgba(8,11,10,.82);
      border: 1px solid var(--line);
      border-radius: 999px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
      transition: border-color .2s ease, box-shadow .2s ease;
    }

    .search-box input::placeholder {
      color: #59625e;
    }

    .search-box input:focus {
      border-color: rgba(var(--accent-rgb),.35);
      box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.08), inset 0 1px 0 rgba(255,255,255,.04);
    }

    .shortcut {
      position: absolute;
      top: 50%;
      right: 11px;
      padding: 3px 7px;
      color: #69726e;
      font-family: var(--font-display);
      font-size: 9px;
      background: rgba(255,255,255,.035);
      border: 1px solid rgba(255,255,255,.06);
      border-radius: 6px;
      transform: translateY(-50%);
    }

    .top-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .icon-button,
    .toolbar-button,
    .round-button {
      display: inline-grid;
      place-items: center;
      cursor: pointer;
      transition: border-color .2s ease, background .2s ease, transform .2s ease;
    }

    .icon-button {
      position: relative;
      width: 37px;
      height: 37px;
      color: #aab3af;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 50%;
    }

    .icon-button:hover,
    .toolbar-button:hover,
    .round-button:hover {
      color: #fff;
      background: rgba(255,255,255,.055);
      border-color: var(--line);
      transform: translateY(-1px);
    }

    .notification-dot {
      position: absolute;
      top: 5px;
      right: 5px;
      width: 6px;
      height: 6px;
      background: var(--green-bright);
      border: 2px solid #050706;
      border-radius: 50%;
      box-shadow: 0 0 8px rgba(var(--accent-rgb),.8);
    }

    .primary-button {
      display: inline-flex;
      height: 39px;
      align-items: center;
      gap: 8px;
      padding: 0 16px;
      color: #eef5f1;
      font-weight: 600;
      font-size: 11px;
      background:
        linear-gradient(180deg, rgba(255,255,255,.07), transparent),
        #101513;
      border: 1px solid var(--line);
      border-radius: 999px;
      cursor: pointer;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 8px 24px rgba(0,0,0,.18);
      transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
    }

    .primary-button:hover {
      border-color: rgba(var(--accent-rgb),.28);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 10px 26px rgba(0,0,0,.24);
      transform: translateY(-1px);
    }

    .stats-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr)) 124px;
      gap: 14px;
      margin-top: 6px;
    }

    .stat-card {
      position: relative;
      min-height: 111px;
      padding: 17px 18px;
      border-radius: var(--radius-lg);
      overflow: hidden;
      animation: none;
    }

    .stat-card:nth-child(2) { animation-delay: .05s; }
    .stat-card:nth-child(3) { animation-delay: .1s; }
    .stat-card:nth-child(4) { animation-delay: .15s; }

    .stat-card::before {
      position: absolute;
      right: -28px;
      bottom: -54px;
      width: 142px;
      height: 92px;
      content: "";
      border-top: 1px solid rgba(255,255,255,.32);
      border-radius: 50%;
      transform: rotate(11deg);
      box-shadow: 0 -5px 14px rgba(255,255,255,.055);
    }

    .stat-card::after {
      position: absolute;
      width: 70px;
      height: 70px;
      right: -9px;
      top: -24px;
      content: "";
      background: radial-gradient(circle, rgba(255,255,255,.055), transparent 70%);
      border-radius: 50%;
    }

    .stat-card.alert-card {
      padding-right: 12px;
      padding-left: 14px;
    }

    .stat-label {
      display: flex;
      align-items: center;
      gap: 7px;
      color: #c8d1cd;
      font-size: 11px;
    }

    .stat-icon {
      position: absolute;
      top: 14px;
      right: 14px;
      display: grid;
      width: 40px;
      height: 40px;
      place-items: center;
      color: #e6eeea;
      background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
      border: 1px solid rgba(255,255,255,.11);
      border-radius: 50%;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
    }

    .alert-card .stat-icon {
      width: 30px;
      height: 30px;
      color: var(--red);
      background: transparent;
      border-color: transparent;
    }

    .stat-number {
      display: flex;
      align-items: baseline;
      gap: 6px;
      margin-top: 8px;
      font-family: var(--font-display);
      font-size: 28px;
      line-height: 1;
      letter-spacing: -.03em;
    }

    .stat-number small {
      color: #79837e;
      font-family: var(--font-body);
      font-size: 9px;
      letter-spacing: 0;
    }

    .stat-trend {
      margin-top: 11px;
      color: #6d7772;
      font-size: 9px;
    }

    .stat-trend b {
      color: #41c982;
      font-weight: 500;
    }

    .stat-trend.down b {
      color: #e46258;
    }

    .board-section {
      position: relative;
      z-index: 2;
      min-height: 0;
      margin-top: 15px;
      isolation: isolate;
    }

    .board-section > .board-card {
      margin-top: 0;
    }

    .section-heading {
      display: flex;
      min-height: 33px;
      align-items: center;
      justify-content: space-between;
      gap: 14px;
    }

    .section-heading h2 {
      margin: 0;
      color: #dce4e0;
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 550;
      letter-spacing: .06em;
    }

    .board-controls,
    .control-group,
    .segmented {
      display: flex;
      align-items: center;
      gap: 7px;
    }

    .segmented {
      display: inline-block;
      gap: 2px;
      padding: 3px;
      font-size: 0;
      white-space: nowrap;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.055);
      border-radius: 999px;
    }

    .segment {
      display: inline-flex;
      min-height: 25px;
      align-items: center;
      justify-content: center;
      padding: 0 13px;
      color: #646e69;
      background: transparent;
      border: 0;
      border-radius: 999px;
      cursor: pointer;
      font-size: 9px;
      line-height: 1;
      text-align: center;
      vertical-align: middle;
      transition: color .2s ease, background .2s ease;
    }

    .segment + .segment {
      margin-left: 2px;
    }

    .segment:hover {
      color: #c8d1cc;
    }

    .segment.active {
      color: #f0f6f3;
      background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.04));
      box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 4px 12px rgba(0,0,0,.18);
    }

    .toolbar-button {
      display: inline-flex;
      min-height: 30px;
      align-items: center;
      gap: 6px;
      padding: 0 10px;
      color: #828c87;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.065);
      border-radius: 10px;
      font-size: 9px;
    }

    .toolbar-button .icon {
      width: 13px;
    }

    .toolbar-button.active {
      color: var(--green-bright);
      border-color: rgba(var(--accent-rgb),.25);
      background: rgba(var(--accent-rgb),.07);
    }

    .board-card {
      position: relative;
      display: grid;
      grid-template-columns: 236px minmax(0, 1fr);
      min-height: 304px;
      margin-top: 8px;
      border-radius: 16px;
      overflow: hidden;
      isolation: isolate;
    }

    .board-card::before {
      position: absolute;
      inset: 0;
      content: "";
      pointer-events: none;
      background: radial-gradient(circle at 67% 55%, rgba(9,159,81,.08), transparent 31%);
    }

    .task-groups {
      position: relative;
      z-index: 2;
      padding: 10px 0 10px 10px;
    }

    .task-group {
      margin-bottom: 8px;
      overflow: hidden;
      background: rgba(5,8,7,.78);
      border: 1px solid rgba(255,255,255,.055);
      border-radius: 10px;
    }

    .group-heading {
      display: flex;
      width: 100%;
      height: 34px;
      align-items: center;
      gap: 8px;
      padding: 0 10px;
      color: #d8e0dc;
      background: transparent;
      border: 0;
      cursor: pointer;
      font-size: 10px;
      text-align: left;
    }

    .group-dot {
      width: 6px;
      height: 6px;
      background: var(--group-color, var(--green));
      border-radius: 50%;
      box-shadow: 0 0 8px var(--group-glow, rgba(var(--accent-rgb), .34));
    }

    .group-count {
      padding: 2px 6px;
      color: #7e8883;
      background: rgba(255,255,255,.045);
      border-radius: 999px;
      font-family: var(--font-display);
      font-size: 8px;
    }

    .group-heading .icon {
      width: 12px;
      margin-left: auto;
      color: #58615d;
      transition: transform .2s ease;
    }

    .task-group.collapsed .group-heading .icon {
      transform: rotate(-90deg);
    }

    .task-group.collapsed .task-list {
      display: none;
    }

    .task-list {
      display: grid;
      gap: 1px;
      padding: 0 5px 5px;
    }

    .task-row {
      display: grid;
      grid-template-columns: 78px minmax(0, 1fr) auto;
      min-height: 30px;
      align-items: center;
      gap: 5px;
      padding: 0 6px;
      color: #7b8580;
      background: transparent;
      border: 0;
      border-radius: 7px;
      cursor: pointer;
      text-align: left;
      transition: color .18s ease, background .18s ease;
    }

    .task-row:hover {
      color: #cfd7d3;
      background: rgba(255,255,255,.035);
    }

    .task-row.selected {
      color: #eaf1ed;
      background: linear-gradient(90deg, rgba(255,255,255,.105), rgba(255,255,255,.025));
      box-shadow: inset 1px 0 0 rgba(var(--accent-rgb),.55);
    }

    .task-id {
      font-family: var(--font-display);
      font-size: 8px;
      letter-spacing: .015em;
    }

    .task-name {
      overflow: hidden;
      font-size: 9px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .task-due {
      color: #68716d;
      font-size: 8px;
      white-space: nowrap;
    }

    .priority-chip {
      display: inline-grid;
      width: 16px;
      height: 16px;
      margin-left: 3px;
      place-items: center;
      color: #53e998;
      background: rgba(var(--accent-rgb),.09);
      border-radius: 4px;
      font-size: 8px;
    }

    .priority-chip.medium {
      color: var(--amber);
      background: rgba(240,181,95,.1);
    }

    .document-stage {
      /* 分类文件卡始终使用同一条倾斜轴，避免因透视原点不同而向两侧散开。 */
      --deck-tilt: -6deg;
      position: relative;
      z-index: 3;
      min-width: 0;
      /* 详情卡的旋转投影会越过网格单元边界；裁剪由外层看板统一负责。 */
      overflow: visible;
      isolation: isolate;
    }

    .document-stage::before {
      position: absolute;
      z-index: 0;
      left: 9%;
      right: 3%;
      bottom: 15px;
      height: 54px;
      content: "";
      background: radial-gradient(ellipse, rgba(241,248,244,.15), rgba(var(--accent-rgb),.045) 27%, transparent 70%);
      transform: rotate(-1deg);
    }

    .progress-document {
      --fly-x: 90px;
      --fly-y: 0px;
      position: absolute;
      z-index: 50;
      top: clamp(12px, var(--deck-preview-y, 31px), calc(100% - 217px));
      left: clamp(12px, var(--deck-preview-x, 34px), calc(100% - 194px));
      width: 170px;
      height: 205px;
      padding: 22px 17px;
      opacity: 0;
      visibility: hidden;
      pointer-events: none;
      background:
        linear-gradient(108deg, rgba(255,255,255,.12), rgba(255,255,255,.035) 52%, transparent 72%),
        #37423d;
      border: 1px solid rgba(240,255,248,.32);
      border-radius: 13px;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        12px 18px 28px rgba(0,0,0,.38);
      transform:
        translate(var(--fly-x), var(--fly-y))
        rotate(var(--deck-tilt))
        scale(.72);
      transform-origin: 50% 50%;
      transition:
        opacity .18s ease,
        visibility 0s linear .3s,
        transform .3s cubic-bezier(.18,.84,.2,1);
    }

    .progress-document.is-open {
      opacity: 1;
      visibility: visible;
      pointer-events: auto;
      transform:
        translate(0, 0)
        rotate(var(--deck-tilt))
        scale(1);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.24), 14px 20px 30px rgba(0,0,0,.42);
      transition-delay: 0s;
    }

    .progress-document.is-resetting {
      transition: none !important;
    }

    .progress-document::after {
      position: absolute;
      inset: 0;
      content: "";
      background: linear-gradient(115deg, transparent 20%, rgba(255,255,255,.14), transparent 48%);
      border-radius: inherit;
      pointer-events: none;
    }

    .progress-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      color: #eef5f1;
      font-size: 17px;
      font-weight: 650;
    }

    .progress-close {
      position: relative;
      z-index: 2;
      display: grid;
      width: 28px;
      height: 28px;
      margin: -7px -7px 0 0;
      place-items: center;
      color: #eef5f1;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 50%;
      cursor: pointer;
    }

    .progress-close:hover,
    .progress-close:focus-visible {
      background: rgba(255,255,255,.08);
      border-color: rgba(255,255,255,.12);
      outline: none;
    }

    .progress-close .icon {
      width: 15px;
    }

    .progress-period {
      margin-top: 6px;
      color: #c6d0cb;
      font-family: var(--font-display);
      font-size: 12px;
    }

    .progress-value {
      margin-top: 48px;
      font-family: var(--font-display);
      font-size: 32px;
      line-height: .9;
    }

    .progress-value small {
      display: block;
      margin-top: 9px;
      color: #dce5e0;
      font-family: var(--font-body);
      font-size: 9px;
    }

    .doc-deck {
      position: absolute;
      z-index: 1;
      inset: 0;
      pointer-events: none;
    }

    .file-card {
      --x: 0px;
      --z: 0px;
      --brightness: .88;
      position: absolute;
      z-index: var(--layer, 1);
      top: 25px;
      left: 23%;
      display: block;
      width: 101px;
      height: 230px;
      padding: 0;
      color: rgba(226,236,231,.82);
      text-align: left;
      cursor: pointer;
      pointer-events: auto;
      background:
        linear-gradient(106deg, rgba(255,255,255,.14), rgba(255,255,255,.035) 58%, transparent 76%),
        var(--deck-card-color, #4a5550);
      border: 1px solid rgba(239,255,247,.32);
      border-radius: 10px;
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.24),
        8px 12px 20px rgba(0,0,0,.34);
      filter: none;
      opacity: var(--brightness);
      transform:
        translateX(var(--x))
        rotate(var(--deck-tilt));
      transform-origin: 50% 100%;
      transition:
        opacity .18s ease,
        color .18s ease,
        border-color .18s ease,
        transform .2s ease;
    }

    .file-card::before {
      position: absolute;
      top: 36px;
      left: 17px;
      width: 53px;
      height: 58px;
      content: "";
      opacity: .26;
      background:
        repeating-linear-gradient(0deg, rgba(9,15,12,.36) 0 5px, transparent 5px 12px),
        repeating-linear-gradient(90deg, rgba(9,15,12,.3) 0 5px, transparent 5px 12px);
      border: 1px solid rgba(10,16,13,.12);
      border-radius: 4px;
    }

    .file-card::after {
      position: absolute;
      inset: 0;
      content: "";
      background:
        linear-gradient(103deg, transparent 26%, rgba(255,255,255,.3) 45%, transparent 61%),
        linear-gradient(180deg, rgba(255,255,255,.1), transparent 46%, rgba(0,0,0,.13));
      border-radius: inherit;
      opacity: .58;
      pointer-events: none;
    }

    .file-card:hover,
    .file-card:focus-visible {
      z-index: 30;
      opacity: 1;
      color: #eafff3;
      background:
        linear-gradient(106deg, rgba(255,255,255,.16), rgba(var(--accent-rgb),.12) 55%, transparent 78%),
        var(--deck-card-hover, #08743d);
      border-color: rgba(var(--accent-rgb),.82);
      filter: none;
      transform:
        translate(var(--x), -9px)
        rotate(var(--deck-tilt));
      box-shadow:
        inset 0 1px 0 rgba(255,255,255,.3),
        9px 14px 22px rgba(0,0,0,.38);
      outline: none;
    }

    .file-card:hover::before,
    .file-card:focus-visible::before {
      opacity: .43;
      background:
        repeating-linear-gradient(0deg, rgba(230,255,242,.58) 0 5px, transparent 5px 12px),
        repeating-linear-gradient(90deg, rgba(230,255,242,.52) 0 5px, transparent 5px 12px);
      border-color: rgba(231,255,243,.2);
    }

    .file-card.selected {
      opacity: 0;
      pointer-events: none;
      transform:
        translateX(var(--x))
        rotate(var(--deck-tilt));
    }

    .file-meta {
      position: absolute;
      z-index: 1;
      left: 5px;
      right: auto;
      bottom: 59px;
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 4px;
      font-family: var(--font-display);
      font-size: 8px;
    }

    .file-meta .icon {
      width: 11px;
      height: 11px;
    }

    .file-title {
      position: absolute;
      z-index: 1;
      left: 5px;
      right: auto;
      bottom: 17px;
      width: 38px;
      overflow: visible;
      color: rgba(226,236,231,.86);
      font-size: 9px;
      font-weight: 650;
      line-height: 1.3;
      letter-spacing: -.02em;
      text-shadow: 0 1px 8px rgba(0,0,0,.68);
      text-align: left;
      text-overflow: clip;
      white-space: normal;
      word-break: break-all;
    }

    .file-card:nth-child(1) { --x: -46px; --z: -108px; --layer: 3; --brightness: .7; }
    .file-card:nth-child(2) { --x: 2px; --z: -96px; --layer: 4; --brightness: .73; }
    .file-card:nth-child(3) { --x: 50px; --z: -84px; --layer: 5; --brightness: .76; }
    .file-card:nth-child(4) { --x: 98px; --z: -72px; --layer: 6; --brightness: .79; }
    .file-card:nth-child(5) { --x: 146px; --z: -60px; --layer: 7; --brightness: .82; }
    .file-card:nth-child(6) { --x: 194px; --z: -48px; --layer: 8; --brightness: .85; }
    .file-card:nth-child(7) { --x: 242px; --z: -36px; --layer: 9; --brightness: .88; }
    .file-card:nth-child(8) { --x: 290px; --z: -24px; --layer: 10; --brightness: .91; }
    .file-card:nth-child(9) { --x: 338px; --z: -12px; --layer: 11; --brightness: .94; }
    .file-card:nth-child(10) { --x: 386px; --z: 0px; --layer: 12; --brightness: .97; }

    .timeline-card {
      position: relative;
      z-index: 1;
      min-height: 155px;
      margin-top: 14px;
      padding: 10px 14px 11px;
      border-radius: 16px;
      overflow: hidden;
      animation: none;
    }

    .timeline-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      margin-bottom: 7px;
    }

    .timeline-title {
      display: flex;
      align-items: center;
      gap: 8px;
      color: #d8e0dc;
      font-size: 10px;
    }

    .timeline-title::before {
      width: 2px;
      height: 16px;
      content: "";
      background: linear-gradient(var(--blue), var(--green));
      border-radius: 999px;
      box-shadow: 0 0 9px rgba(var(--accent-rgb),.45);
    }

    .timeline-month {
      margin-left: 8px;
      color: #69736e;
      font-size: 9px;
    }

    .timeline-view {
      display: flex;
      gap: 3px;
      padding: 3px;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.055);
      border-radius: 8px;
    }

    .timeline-view button {
      padding: 3px 8px;
      color: #64706a;
      background: transparent;
      border: 0;
      border-radius: 6px;
      cursor: pointer;
      font-size: 8px;
    }

    .timeline-view button.active {
      color: #e6eee9;
      background: rgba(255,255,255,.075);
    }

    .timeline-grid {
      position: relative;
      display: grid;
      grid-template-columns: 82px repeat(15, minmax(28px, 1fr));
      grid-template-rows: 18px repeat(4, 21px);
      min-width: 650px;
      align-items: center;
    }

    .timeline-grid::before {
      position: absolute;
      inset: 18px 0 0 82px;
      content: "";
      background: repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px calc(100% / 15));
      pointer-events: none;
    }

    .date-cell,
    .row-label {
      color: #59635e;
      font-family: var(--font-display);
      font-size: 7px;
    }

    .date-cell {
      text-align: center;
    }

    .date-cell.today {
      color: #d8f5e5;
    }

    .date-cell.today span {
      display: inline-grid;
      width: 18px;
      height: 18px;
      place-items: center;
      background: #17613b;
      border: 1px solid rgba(var(--accent-rgb),.45);
      border-radius: 50%;
      box-shadow: 0 0 14px rgba(var(--accent-rgb),.25);
    }

    .row-label {
      padding-left: 4px;
      color: #69736e;
      font-family: var(--font-body);
      font-size: 8px;
    }

    .timeline-bar {
      z-index: 1;
      height: 16px;
      padding: 0 10px;
      color: #aeb7b2;
      font-size: 7px;
      line-height: 16px;
      background: linear-gradient(180deg, #4b514e, #262b29);
      border: 1px solid rgba(255,255,255,.11);
      border-radius: 999px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.09), 0 5px 12px rgba(0,0,0,.2);
      white-space: nowrap;
    }

    .timeline-bar.green {
      color: #d5f9e5;
      background: linear-gradient(90deg, #0b7b43, #10b75f);
      border-color: rgba(var(--accent-rgb),.42);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 0 12px rgba(var(--accent-rgb),.18);
    }

    .today-line {
      position: absolute;
      z-index: 3;
      top: 18px;
      bottom: 0;
      left: calc(82px + (100% - 82px) * 3.5 / 15);
      width: 1px;
      background: linear-gradient(var(--green), rgba(var(--accent-rgb),.08));
      box-shadow: 0 0 8px rgba(var(--accent-rgb),.3);
    }

    .detail-panel {
      position: sticky;
      top: 14px;
      display: flex;
      height: calc(100vh - 28px);
      min-height: 700px;
      flex-direction: column;
      padding: 18px 15px 14px;
      border-radius: var(--radius-xl);
      overflow-x: hidden;
      overflow-y: auto;
      overscroll-behavior: contain;
      scrollbar-color: rgba(132,151,141,.34) transparent;
      scrollbar-width: thin;
      animation: none;
    }

    .detail-panel::before {
      position: absolute;
      width: 170px;
      height: 170px;
      right: -75px;
      top: -74px;
      content: "";
      background: radial-gradient(circle, rgba(226,255,241,.085), transparent 70%);
      border-radius: 50%;
      pointer-events: none;
    }

    .detail-header {
      position: relative;
      z-index: 1;
      display: flex;
      min-height: 42px;
      align-items: flex-start;
      justify-content: space-between;
      padding: 0 2px 14px;
      border-bottom: 1px solid rgba(255,255,255,.065);
    }

    .detail-header h2 {
      display: flex;
      align-items: center;
      gap: 7px;
      margin: 0;
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 550;
    }

    .detail-header h2 .icon {
      color: #e9f7ef;
      filter: none;
    }

    .detail-id {
      margin-top: 16px;
      color: #a5b0aa;
      font-family: var(--font-display);
      font-size: 12px;
      letter-spacing: .04em;
    }

    .detail-title-line {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-top: 11px;
    }

    .detail-title-line h3 {
      overflow: hidden;
      margin: 0;
      font-family: var(--font-display);
      font-size: 21px;
      font-weight: 600;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .high-badge {
      flex: 0 0 auto;
      padding: 4px 7px;
      color: #46e990;
      background: rgba(var(--accent-rgb),.09);
      border: 1px solid rgba(var(--accent-rgb),.1);
      border-radius: 5px;
      font-size: 11px;
    }

    .detail-description {
      min-height: 58px;
      margin: 11px 0 15px;
      color: rgb(170, 181, 175);
      font-size: 12px;
      line-height: 1.8;
      text-indent: 2em;
    }

    .detail-list {
      display: grid;
      gap: 15px;
      margin: 0;
    }

    .detail-row {
      display: grid;
      grid-template-columns: 72px minmax(0, 1fr);
      align-items: center;
      gap: 8px;
      font-size: 12px;
    }

    .detail-row dt {
      color: rgb(150, 162, 155);
    }

    .detail-row dd {
      display: flex;
      min-width: 0;
      align-items: center;
      gap: 6px;
      margin: 0;
      color: rgb(214, 223, 218);
    }

    .detail-row dd span {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .detail-row .icon {
      width: 15px;
      color: #aeb9b3;
    }

    .mini-avatar {
      position: relative;
      display: grid;
      width: 26px;
      height: 26px;
      flex: 0 0 auto;
      place-items: center;
      color: #dce5e0;
      font-family: var(--font-display);
      font-size: 10px;
      background: #4b5551;
      border-radius: 50%;
    }

    .mini-avatar::after {
      position: absolute;
      right: -1px;
      bottom: -1px;
      width: 5px;
      height: 5px;
      content: "";
      background: var(--green);
      border: 1px solid #101412;
      border-radius: 50%;
    }

    .mini-avatar img {
      display: block;
      width: 100%;
      height: 100%;
      border-radius: inherit;
      object-fit: cover;
    }

    .status-dot {
      width: 6px;
      height: 6px;
      flex: 0 0 auto;
      background: var(--green);
      border-radius: 50%;
      box-shadow: 0 0 8px rgba(var(--accent-rgb),.5);
    }

    .status-dot.red {
      background: var(--red);
      box-shadow: 0 0 8px rgba(255,92,80,.35);
    }

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

    .tag {
      padding: 4px 6px;
      color: #b6c1bb;
      background: rgba(255,255,255,.035);
      border: 1px solid rgba(255,255,255,.055);
      border-radius: 6px;
      font-size: 11px;
    }

    .ai-card {
      position: relative;
      margin-top: auto;
      padding: 13px 13px 14px;
      background:
        linear-gradient(145deg, rgba(255,255,255,.065), transparent 52%),
        rgba(255,255,255,.028);
      border: 1px solid rgba(255,255,255,.075);
      border-radius: 14px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
      overflow: hidden;
    }

    .ai-card::after {
      position: absolute;
      right: -20px;
      bottom: -33px;
      width: 100px;
      height: 70px;
      content: "";
      border-top: 1px solid rgba(255,255,255,.18);
      border-radius: 50%;
      transform: rotate(12deg);
      pointer-events: none;
    }

    .ai-card h4 {
      display: flex;
      align-items: center;
      gap: 7px;
      margin: 0 0 9px;
      color: #dce4e0;
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 500;
    }

    .ai-card ul {
      margin: 0;
      padding-left: 13px;
      color: #98a49e;
      font-size: 11px;
      line-height: 1.8;
    }

    .suggestion-button {
      display: block;
      margin: 11px auto 0;
      padding: 7px 13px;
      color: #aeb7b2;
      background: rgba(255,255,255,.04);
      border: 1px solid rgba(255,255,255,.07);
      border-radius: 999px;
      cursor: pointer;
      font-size: 11px;
      transition: color .2s ease, border-color .2s ease, background .2s ease;
    }

    .suggestion-button:hover {
      color: #eff7f3;
      background: rgba(var(--accent-rgb),.06);
      border-color: rgba(var(--accent-rgb),.2);
    }

    .detail-actions {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
      padding-top: 13px;
    }

    .detail-button,
    .complete-button,
    .round-button {
      min-height: 40px;
      border-radius: 999px;
    }

    .detail-button,
    .complete-button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      cursor: pointer;
      font-size: 11px;
    }

    .detail-button {
      color: #bdc6c1;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.08);
    }

    .complete-button {
      color: #c9ffe1;
      background: linear-gradient(180deg, rgba(var(--accent-rgb),.18), rgba(var(--accent-rgb),.08));
      border: 1px solid rgba(var(--accent-rgb),.3);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 0 16px rgba(var(--accent-rgb),.08);
    }

    .detail-button:hover,
    .complete-button:hover {
      transform: translateY(-1px);
      filter: none;
    }

    .round-button {
      color: #a9b2ad;
      background: rgba(255,255,255,.04);
      border: 1px solid rgba(255,255,255,.09);
    }

    .detail-button .icon,
    .complete-button .icon,
    .round-button .icon {
      width: 13px;
    }

    .mobile-menu {
      display: none;
    }

    dialog {
      width: min(480px, calc(100% - 30px));
      padding: 0;
      color: var(--text);
      background: #0c100f;
      border: 1px solid rgba(255,255,255,.14);
      border-radius: 20px;
      box-shadow: 0 34px 100px rgba(0,0,0,.72), inset 0 1px 0 rgba(255,255,255,.06);
    }

    dialog::backdrop {
      background: rgba(0,0,0,.78);
    }

    .dialog-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 18px 20px;
      border-bottom: 1px solid rgba(255,255,255,.07);
    }

    .dialog-head h3 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 16px;
      font-weight: 550;
    }

    .dialog-close {
      display: grid;
      width: 32px;
      height: 32px;
      place-items: center;
      color: #8b9690;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 50%;
      cursor: pointer;
    }

    .dialog-close:hover {
      color: #fff;
      border-color: rgba(255,255,255,.1);
      background: rgba(255,255,255,.04);
    }

    .task-form {
      display: grid;
      gap: 14px;
      padding: 20px;
    }

    .field {
      display: grid;
      gap: 7px;
    }

    .field-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .field label {
      color: #919b96;
      font-size: 10px;
    }

    .field input,
    .field textarea,
    .field select {
      width: 100%;
      color: #e9f0ec;
      outline: none;
      background: rgba(255,255,255,.035);
      border: 1px solid rgba(255,255,255,.09);
      border-radius: 10px;
      transition: border-color .2s ease, box-shadow .2s ease;
    }

    .field input,
    .field select {
      height: 40px;
      padding: 0 12px;
    }

    .field textarea {
      min-height: 88px;
      padding: 11px 12px;
      resize: vertical;
    }

    .field input:focus,
    .field textarea:focus,
    .field select:focus {
      border-color: rgba(var(--accent-rgb),.35);
      box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.07);
    }

    .form-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding-top: 5px;
    }

    .form-actions button {
      min-height: 38px;
      padding: 0 16px;
      border-radius: 999px;
      cursor: pointer;
      font-size: 10px;
    }

    .cancel-button {
      color: #9aa49f;
      background: transparent;
      border: 1px solid rgba(255,255,255,.09);
    }

    .save-button {
      color: #d9ffe9;
      background: rgba(var(--accent-rgb),.14);
      border: 1px solid rgba(var(--accent-rgb),.32);
    }

    .toast {
      position: fixed;
      z-index: 100;
      right: 22px;
      bottom: 22px;
      display: flex;
      min-width: 220px;
      align-items: center;
      gap: 10px;
      padding: 12px 14px;
      color: #dff8e9;
      background: rgba(12,20,16,.94);
      border: 1px solid rgba(var(--accent-rgb),.25);
      border-radius: 12px;
      box-shadow: 0 18px 50px rgba(0,0,0,.45);
      opacity: 0;
      pointer-events: none;
      transform: translateY(12px);
      transition: opacity .25s ease, transform .25s ease;
      font-size: 10px;
    }

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

    .toast .icon {
      width: 15px;
      color: var(--green);
    }

    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    [hidden] {
      display: none !important;
    }

    .profile {
      width: 100%;
      color: inherit;
      text-align: left;
      background: transparent;
      border: 0;
      cursor: pointer;
      border-radius: 12px;
      transition: background .2s ease;
    }

    .profile:hover {
      background: rgba(255,255,255,.035);
    }

    .app-shell.wide-view {
      grid-template-columns: 190px minmax(0, 1fr);
    }

    .app-shell.wide-view .detail-panel {
      display: none;
    }

    .route-view {
      display: none;
      min-width: 0;
    }

    .route-view.active {
      display: block;
      animation: none;
    }

    .content-page {
      padding: 14px 0 24px;
    }

    .eyebrow {
      display: block;
      margin-bottom: 8px;
      color: var(--green);
      font-family: var(--font-display);
      font-size: 8px;
      letter-spacing: .2em;
    }

    .page-toolbar-card {
      display: flex;
      min-height: 110px;
      align-items: center;
      justify-content: space-between;
      gap: 24px;
      padding: 20px 22px;
      border-radius: 18px;
    }

    .page-toolbar-card h2,
    .archive-hero h2,
    .tags-hero h2,
    .about-hero h2,
    .user-hero h2 {
      margin: 0;
      font-family: var(--font-display);
      font-weight: 550;
      letter-spacing: .01em;
    }

    .page-toolbar-card h2 {
      font-size: 22px;
    }

    .page-toolbar-card p,
    .archive-hero p,
    .tags-hero > p {
      margin: 7px 0 0;
      color: #717b76;
      font-size: 10px;
      line-height: 1.7;
    }

    code {
      padding: 2px 5px;
      color: #9bd8b7;
      background: rgba(var(--accent-rgb),.06);
      border: 1px solid rgba(var(--accent-rgb),.1);
      border-radius: 5px;
      font-family: Consolas, monospace;
      font-size: .94em;
    }

    .page-filter-pills {
      display: flex;
      flex-wrap: wrap;
      justify-content: flex-end;
      gap: 5px;
    }

    .page-filter-pills button,
    .page-filter-pills a {
      display: inline-flex;
      min-height: 30px;
      align-items: center;
      justify-content: center;
      padding: 0 11px;
      color: #76807b;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.07);
      border-radius: 999px;
      cursor: pointer;
      font-size: 9px;
      line-height: 1;
      text-align: center;
    }

    .page-filter-pills button.active,
    .page-filter-pills a.active {
      color: #dff9ea;
      background: rgba(var(--accent-rgb),.08);
      border-color: rgba(var(--accent-rgb),.24);
    }

    .post-library {
      margin-top: 12px;
      padding: 8px;
      border-radius: 18px;
    }

    .post-table-head,
    .post-table-row {
      display: grid;
      grid-template-columns: minmax(300px, 2fr) 100px 95px 88px 34px;
      align-items: center;
      gap: 12px;
    }

    .post-table-head {
      min-height: 38px;
      padding: 0 12px;
      color: #535d58;
      font-size: 8px;
      text-transform: uppercase;
      letter-spacing: .1em;
    }

    .post-table-row {
      min-height: 82px;
      padding: 10px 12px;
      border-top: 1px solid rgba(255,255,255,.055);
      transition: background .2s ease, transform .2s ease;
    }

    .post-table-row:hover {
      background: rgba(255,255,255,.025);
      transform: translateX(2px);
    }

    .post-cell-main {
      display: flex;
      min-width: 0;
      align-items: center;
      gap: 13px;
    }

    .post-table-row.has-post-media {
      min-height: 102px;
    }

    .post-media {
      position: relative;
      isolation: isolate;
      display: grid;
      flex: 0 0 126px;
      width: 126px;
      height: 76px;
      min-width: 0;
      grid-template-columns: 1fr;
      grid-template-rows: 1fr;
      gap: 2px;
      overflow: hidden;
      color: inherit;
      background-color: #09110d;
      background-image:
        linear-gradient(135deg, rgba(var(--accent-rgb),.08), transparent 46%),
        linear-gradient(180deg, #111b16, #080d0b);
      border: 1px solid rgba(154, 189, 170, .15);
      border-radius: 11px;
      box-shadow:
        0 8px 18px rgba(0, 0, 0, .2),
        inset 0 1px rgba(255, 255, 255, .035);
      contain: paint;
    }

    .post-media[hidden] {
      display: none;
    }

    .post-media::after {
      position: absolute;
      z-index: 2;
      content: '';
      pointer-events: none;
      inset: 0;
      background: linear-gradient(180deg, transparent 54%, rgba(3, 8, 6, .2));
      border: 1px solid rgba(255, 255, 255, .025);
      border-radius: inherit;
    }

    .post-media-item {
      position: relative;
      min-width: 0;
      min-height: 0;
      overflow: hidden;
      background: #101914;
    }

    .post-media img {
      display: block;
      width: 100%;
      height: 100%;
      max-width: none;
      object-fit: cover;
    }

    .post-media[data-media-count="2"] {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-media[data-media-count="3"] {
      grid-template-columns: 1.35fr .85fr;
      grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .post-media[data-media-count="3"] .post-media-item:first-child {
      grid-row: 1 / 3;
    }

    .post-media[data-media-count="4"] {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-template-rows: repeat(2, minmax(0, 1fr));
    }

    .post-table-row:hover .post-media {
      border-color: rgba(var(--accent-rgb), .34);
      background-image:
        linear-gradient(135deg, rgba(var(--accent-rgb),.13), transparent 48%),
        linear-gradient(180deg, #111b16, #080d0b);
    }

    .post-cell-copy {
      flex: 1 1 auto;
      min-width: 0;
    }

    .post-index {
      color: #4d5752;
      font-family: var(--font-display);
      font-size: 17px;
    }

    .post-cell-main > div {
      min-width: 0;
    }

    .post-cell-main h3 {
      overflow: hidden;
      margin: 0;
      color: #dce4e0;
      font-size: 11px;
      font-weight: 550;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .post-cell-main p {
      overflow: hidden;
      margin: 6px 0 0;
      color: #606a65;
      font-size: 8px;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .category-color-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: max-content;
      max-width: 100%;
      padding: 5px 8px;
      color: var(--category-label-color, #9aaba2);
      background: var(--category-label-soft, rgba(154, 171, 162, .12));
      border: 1px solid var(--category-label-border, rgba(154, 171, 162, .3));
      border-radius: 7px;
      font-size: 10px;
      line-height: 1.2;
      text-decoration: none;
      transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
    }

    .table-category {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .category-color-link:hover,
    .category-color-link:focus-visible {
      color: var(--category-label-color, #b6c5bd);
      background: var(--category-label-hover, rgba(182, 197, 189, .18));
      border-color: var(--category-label-strong-border, rgba(182, 197, 189, .54));
      box-shadow: 0 0 12px var(--category-label-glow, rgba(182, 197, 189, .2));
      outline: none;
    }

    .category-color-badge.is-static {
      cursor: default;
    }

    .table-metric,
    .post-table-row time {
      color: #68726d;
      font-size: 8px;
      line-height: 1.7;
    }

    .row-action {
      display: grid;
      width: 30px;
      height: 30px;
      place-items: center;
      color: #717b76;
      background: transparent;
      border: 1px solid rgba(255,255,255,.07);
      border-radius: 50%;
      cursor: pointer;
    }

    .row-action:hover {
      color: var(--green-bright);
      border-color: rgba(var(--accent-rgb),.25);
      background: rgba(var(--accent-rgb),.06);
    }

    .row-action .icon {
      width: 13px;
    }

    .empty-state {
      padding: 64px 20px;
      color: #5f6964;
      text-align: center;
    }

    .empty-state .icon {
      width: 28px;
      height: 28px;
    }

    .empty-state h3 {
      margin: 12px 0 5px;
      color: #aeb8b2;
      font-size: 13px;
    }

    .empty-state p {
      margin: 0;
      font-size: 9px;
    }

    .pagination {
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 5px;
      padding: 14px 0 7px;
      border-top: 1px solid rgba(255,255,255,.05);
    }

    .pagination button,
    .pagination a,
    .pagination span {
      display: inline-grid;
      min-width: 29px;
      height: 29px;
      padding: 0 9px;
      place-items: center;
      color: #6c7671;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.06);
      border-radius: 8px;
      cursor: pointer;
      font-size: 8px;
      line-height: 1;
      text-align: center;
      box-sizing: border-box;
    }

    .pagination button.active,
    .pagination a.active,
    .pagination span.current,
    .pagination > span,
    .pagination [aria-current="page"] {
      color: #dff9ea;
      background: rgba(var(--accent-rgb),.09);
      border-color: rgba(var(--accent-rgb),.24);
      box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .06);
    }

    .pagination a:hover,
    .pagination a:focus-visible {
      color: #d8e5de;
      background: rgba(255, 255, 255, .055);
      border-color: rgba(255, 255, 255, .13);
      outline: none;
    }

    .pagination em {
      display: inline-grid;
      min-width: 24px;
      height: 29px;
      place-items: center;
      color: #56615b;
      font-size: 11px;
      font-style: normal;
    }

    .pagination button:disabled {
      opacity: .35;
      cursor: not-allowed;
    }

    .category-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 12px;
      margin-top: 0;
    }

    .category-card {
      position: relative;
      isolation: isolate;
      min-height: 202px;
      padding: 20px 20px 46px;
      color: inherit;
      text-align: left;
      background:
        radial-gradient(ellipse at 8% 0%, var(--category-accent-soft, rgba(127, 141, 133, .12)), transparent 44%),
        radial-gradient(ellipse at 92% 106%, rgba(164, 194, 208, .12), transparent 48%),
        linear-gradient(135deg, rgba(29, 42, 46, .96), rgba(10, 16, 16, .985) 56%, rgba(22, 32, 35, .96));
      border-color: var(--category-accent-border, rgba(127, 141, 133, .3));
      border-radius: 16px;
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 13px 26px rgba(0, 0, 0, .24);
      cursor: pointer;
      overflow: hidden;
      transition: transform .18s ease, border-color .18s ease, background-color .18s ease, box-shadow .18s ease;
    }

    .category-card::before {
      position: absolute;
      z-index: -2;
      inset: -48% -24% -52% -28%;
      content: "";
      background:
        radial-gradient(ellipse at 42% 52%, transparent 0 35%, rgba(206, 230, 239, .075) 35.5% 36.2%, transparent 36.8% 45%, rgba(206, 230, 239, .045) 45.5% 46.1%, transparent 46.7%),
        radial-gradient(ellipse at 66% 44%, transparent 0 25%, var(--category-accent-faint, rgba(127, 141, 133, .08)) 25.5% 26.5%, transparent 27% 39%, rgba(255, 255, 255, .035) 39.5% 40.2%, transparent 40.8%);
      opacity: .9;
      pointer-events: none;
      transform: rotate(-9deg);
      transform-origin: 55% 50%;
    }

    .category-card::after {
      position: absolute;
      z-index: -1;
      right: -18%;
      bottom: -58%;
      width: 94%;
      aspect-ratio: 1.8;
      content: "";
      background: radial-gradient(ellipse, var(--category-accent-hover, rgba(127, 141, 133, .18)), transparent 68%);
      opacity: .58;
      pointer-events: none;
      transform: rotate(-12deg);
    }

    .category-card:nth-child(4n + 2)::before {
      transform: rotate(8deg) scaleX(-1);
    }

    .category-card:nth-child(4n + 3)::before {
      transform: rotate(-15deg) scale(1.08);
    }

    .category-card:nth-child(4n + 4)::before {
      transform: rotate(14deg) scaleY(-1);
    }

    .category-card:hover,
    .category-card:focus-visible {
      border-color: var(--category-accent-strong-border, rgba(127, 141, 133, .54));
      box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 16px 30px rgba(0, 0, 0, .3);
      outline: none;
      transform: translateY(-2px);
    }

    .category-card > .icon {
      position: relative;
      z-index: 1;
      width: 24px;
      height: 24px;
      margin-top: 22px;
      color: var(--category-accent-ink, #aab8b0);
      stroke-width: 1.7;
      filter: none;
      opacity: .92;
    }

    .category-number {
      position: absolute;
      z-index: 2;
      top: 12px;
      right: 13px;
      display: grid;
      min-width: 36px;
      height: 20px;
      place-items: center;
      padding-inline: 8px;
      color: rgba(210, 224, 217, .46);
      background: rgba(4, 9, 8, .22);
      border: 1px solid rgba(224, 241, 233, .09);
      border-radius: 999px;
      font-family: var(--font-display);
      font-size: 11px;
      font-variant-numeric: tabular-nums;
      line-height: 1;
    }

    .category-card h3 {
      position: relative;
      z-index: 1;
      margin: 11px 0 6px;
      color: #e5eeea;
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 620;
      letter-spacing: .01em;
    }

    .category-card p {
      position: relative;
      z-index: 1;
      display: -webkit-box;
      overflow: hidden;
      min-height: 39px;
      margin: 0;
      color: #9aa7a1;
      font-size: 12px;
      line-height: 1.6;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
    }

    .category-card footer {
      position: absolute;
      right: 20px;
      bottom: 15px;
      left: 20px;
      z-index: 1;
      display: flex;
      justify-content: space-between;
      padding-top: 10px;
      color: #a4b0aa;
      border-top: 1px solid rgba(226, 241, 234, .07);
      font-size: 11px;
      font-variant-numeric: tabular-nums;
    }

    .category-card footer::after {
      position: absolute;
      top: -1px;
      left: 0;
      width: var(--category-progress, 0%);
      height: 1px;
      content: "";
      background: var(--category-accent-ink, #aab8b0);
      box-shadow: 0 0 8px var(--category-accent-glow, rgba(170, 184, 176, .34));
    }

    .category-card footer b {
      color: var(--category-accent-ink, #aab8b0);
      font-family: var(--font-display);
      font-weight: 650;
    }

    .archive-hero {
      position: relative;
      display: flex;
      min-height: 210px;
      align-items: center;
      justify-content: space-between;
      gap: 30px;
      padding: 28px 34px;
      border-radius: 20px;
      overflow: hidden;
    }

    .archive-hero::after {
      position: absolute;
      right: 10%;
      bottom: -80px;
      width: 280px;
      height: 180px;
      content: "";
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 50%;
      box-shadow: 0 -15px 42px rgba(var(--accent-rgb),.08);
      transform: rotate(-12deg);
    }

    .archive-hero h2 {
      max-width: 560px;
      font-size: clamp(24px, 3vw, 38px);
      line-height: 1.25;
    }

    .archive-total {
      position: relative;
      z-index: 1;
      display: flex;
      align-items: flex-end;
      gap: 10px;
    }

    .archive-total strong {
      font-family: var(--font-display);
      font-size: clamp(56px, 7vw, 92px);
      font-weight: 450;
      line-height: .8;
      letter-spacing: -.07em;
      text-shadow: 0 0 30px rgba(255,255,255,.12);
    }

    .archive-total span {
      color: #69736e;
      font-size: 9px;
      line-height: 1.6;
    }

    .archive-layout {
      display: grid;
      grid-template-columns: 145px minmax(0, 1fr);
      gap: 12px;
      margin-top: 12px;
    }

    .year-switcher {
      display: grid;
      align-content: start;
      gap: 4px;
      padding: 10px;
      border-radius: 16px;
    }

    .year-switcher button,
    .year-switcher a {
      display: flex;
      min-height: 46px;
      align-items: center;
      justify-content: space-between;
      padding: 0 12px;
      color: #737d78;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 10px;
      cursor: pointer;
      font-family: var(--font-display);
    }

    .year-switcher button.active,
    .year-switcher a.active {
      color: #e7efeb;
      background: rgba(255,255,255,.045);
      border-color: rgba(255,255,255,.07);
    }

    .year-switcher span {
      color: #4f5954;
      font-size: 9px;
    }

    .archive-stream {
      padding: 8px 18px;
      border-radius: 16px;
    }

    .archive-month {
      display: grid;
      grid-template-columns: 150px minmax(0, 1fr);
      gap: 18px;
      padding: 20px 0;
      border-bottom: 1px solid rgba(255,255,255,.06);
    }

    .archive-month:last-child {
      border-bottom: 0;
    }

    .archive-month > header {
      display: flex;
      gap: 13px;
    }

    .archive-month > header strong {
      color: #dce5e0;
      font-family: var(--font-display);
      font-size: 34px;
      font-weight: 450;
      line-height: 1;
    }

    .archive-month h3 {
      margin: 1px 0 5px;
      font-size: 11px;
    }

    .archive-month header p {
      margin: 0;
      color: #5f6964;
      font-size: 8px;
    }

    .archive-posts {
      display: grid;
    }

    .archive-posts button,
    .archive-posts a {
      display: grid;
      grid-template-columns: 30px minmax(0, 1fr) auto;
      min-height: 37px;
      align-items: center;
      gap: 8px;
      color: #9da7a2;
      text-align: left;
      background: transparent;
      border: 0;
      border-bottom: 1px solid rgba(255,255,255,.035);
      cursor: pointer;
      font-size: 9px;
    }

    .archive-posts button:hover,
    .archive-posts a:hover {
      color: #e6eee9;
    }

    .archive-posts time,
    .archive-posts b {
      color: #59635e;
      font-size: 8px;
      font-weight: 400;
    }

    .moment-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 230px;
      gap: 12px;
    }

    .moment-composer {
      display: flex;
      gap: 13px;
      padding: 18px;
      border-radius: 17px;
    }

    .composer-main {
      min-width: 0;
      flex: 1;
    }

    .composer-main h2 {
      margin: 0 0 9px;
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 550;
    }

    .composer-main textarea {
      width: 100%;
      min-height: 86px;
      padding: 11px 0;
      color: #dfe6e2;
      outline: 0;
      resize: vertical;
      background: transparent;
      border: 0;
      border-bottom: 1px solid rgba(255,255,255,.07);
      font-size: 10px;
      line-height: 1.7;
    }

    .composer-main footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-top: 9px;
      color: #59635e;
      font-size: 8px;
    }

    .composer-main footer button {
      height: 32px;
      padding: 0 13px;
      color: #caffdf;
      background: rgba(var(--accent-rgb),.1);
      border: 1px solid rgba(var(--accent-rgb),.27);
      border-radius: 999px;
      cursor: pointer;
      font-size: 9px;
    }

    .moment-feed {
      display: grid;
      gap: 10px;
      margin-top: 10px;
    }

    .moment-item {
      display: grid;
      grid-template-columns: 35px minmax(0, 1fr);
      gap: 12px;
      padding: 17px;
      border-radius: 16px;
    }

    .moment-rail {
      position: relative;
    }

    .moment-rail i {
      position: absolute;
      top: 27px;
      bottom: -28px;
      left: 10px;
      width: 1px;
      background: linear-gradient(rgba(var(--accent-rgb),.3), transparent);
    }

    .moment-item header {
      display: flex;
      justify-content: space-between;
      color: #cfd7d3;
      font-size: 9px;
    }

    .moment-item header time {
      color: #59635e;
      font-size: 8px;
    }

    .moment-item p {
      margin: 9px 0 13px;
      color: #8d9792;
      font-size: 10px;
      line-height: 1.75;
    }

    .moment-item footer {
      display: flex;
      gap: 7px;
    }

    .moment-item footer button {
      padding: 5px 8px;
      color: #646e69;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.055);
      border-radius: 7px;
      cursor: pointer;
      font-size: 8px;
    }

    .moment-aside {
      align-self: start;
      padding: 20px;
      border-radius: 17px;
    }

    .moment-aside h3 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 16px;
    }

    .mini-stat-list {
      display: grid;
      gap: 15px;
      margin: 24px 0;
    }

    .mini-stat-list div {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      padding-bottom: 11px;
      border-bottom: 1px solid rgba(255,255,255,.055);
    }

    .mini-stat-list strong {
      font-family: var(--font-display);
      font-size: 22px;
      font-weight: 450;
    }

    .mini-stat-list span,
    .moment-aside p {
      color: #66706b;
      font-size: 8px;
      line-height: 1.7;
    }

    .tags-hero,
    .tags-panel {
      padding: 27px;
      border-radius: 20px;
      overflow: hidden;
    }

    .tags-panel {
      padding: 0;
    }

    .tags-panel .tag-marquee {
      margin: 0;
    }

    .tags-hero h2 {
      font-size: 26px;
    }

    .tag-cloud {
      display: flex;
      min-height: 260px;
      align-content: center;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;
      gap: 10px 15px;
      padding: 30px 7%;
    }

    .tag-cloud button,
    .tag-cloud a {
      padding: 8px 11px;
      color: color-mix(in srgb, #c5d0ca calc(45% + var(--tag-size) * 20%), #4d5752);
      font-family: var(--font-display);
      font-size: calc(9px * var(--tag-size));
      background: transparent;
      border: 1px solid transparent;
      border-radius: 999px;
      cursor: pointer;
      transition: color .2s ease, background .2s ease, transform .2s ease;
    }

    .tag-cloud button:hover,
    .tag-cloud a:hover {
      color: var(--green-bright);
      background: rgba(var(--accent-rgb),.055);
      border-color: rgba(var(--accent-rgb),.14);
      transform: translateY(-3px);
    }

    .tag-cloud span {
      margin-left: 3px;
      color: #56605b;
      font-size: .55em;
    }

    .tag-marquee {
      position: relative;
      display: grid;
      min-width: 0;
      min-height: 300px;
      align-content: center;
      gap: 14px;
      margin: 20px -27px -4px;
      padding: 24px 0;
      overflow: hidden;
      contain: layout paint;
    }

    .tag-marquee::before,
    .tag-marquee::after {
      position: absolute;
      z-index: 2;
      top: 0;
      bottom: 0;
      width: 58px;
      content: "";
      pointer-events: none;
    }

    .tag-marquee::before {
      left: 0;
      background: linear-gradient(90deg, rgba(12,17,15,.98), transparent);
    }

    .tag-marquee::after {
      right: 0;
      background: linear-gradient(-90deg, rgba(12,17,15,.98), transparent);
    }

    .tag-marquee-row {
      --marquee-gap: 14px;
      display: flex;
      width: max-content;
      max-width: none;
      flex: 0 0 auto;
      animation: tag-marquee-left var(--marquee-duration, 40s) linear infinite;
      animation-delay: var(--marquee-delay, 0s);
    }

    .tag-marquee-row:not(:has(a)) {
      display: none;
    }

    .tag-marquee-single {
      min-height: 132px;
    }

    .tag-marquee-single .tag-marquee-row {
      width: 100%;
      animation: none;
      transform: none;
    }

    .tag-marquee-single .tag-marquee-group {
      width: 100%;
      min-width: 0;
      justify-content: center;
      padding-right: 0;
    }

    .tag-marquee-group {
      display: flex;
      min-width: min(1200px, 88vw);
      flex: 0 0 auto;
      align-items: center;
      justify-content: space-around;
      gap: var(--marquee-gap);
      padding-right: var(--marquee-gap);
    }

    .tag-marquee a {
      --tag-fallback: var(--tag-palette-1);
      display: inline-flex;
      min-height: 34px;
      flex: 0 0 auto;
      align-items: center;
      gap: 6px;
      padding: 0 13px;
      color: #d4ded8;
      color: color-mix(in srgb, var(--tag-accent, var(--tag-fallback)) 74%, white);
      font-family: var(--font-display);
      font-size: 12px;
      text-decoration: none;
      background: rgba(255,255,255,.035);
      background: var(--tag-accent-soft, rgba(255,255,255,.035));
      background: color-mix(in srgb, var(--tag-accent, var(--tag-fallback)) 10%, #0d1210);
      border: 1px solid rgba(255,255,255,.09);
      border-color: color-mix(in srgb, var(--tag-accent, var(--tag-fallback)) 28%, transparent);
      border-radius: 999px;
      transition: color .16s ease, background-color .16s ease, border-color .16s ease, transform .16s ease;
      white-space: nowrap;
    }

    .tag-marquee a[data-tag-palette="1"] { --tag-fallback: var(--tag-palette-1); }
    .tag-marquee a[data-tag-palette="2"] { --tag-fallback: var(--tag-palette-2); }
    .tag-marquee a[data-tag-palette="3"] { --tag-fallback: var(--tag-palette-3); }
    .tag-marquee a[data-tag-palette="4"] { --tag-fallback: var(--tag-palette-4); }
    .tag-marquee a[data-tag-palette="5"] { --tag-fallback: var(--tag-palette-5); }
    .tag-marquee a[data-tag-palette="6"] { --tag-fallback: var(--tag-palette-6); }
    .tag-marquee a[data-tag-palette="7"] { --tag-fallback: var(--tag-palette-7); }
    .tag-marquee a[data-tag-palette="8"] { --tag-fallback: var(--tag-palette-8); }

    .tag-marquee a:hover,
    .tag-marquee a:focus-visible {
      color: #fff;
      background: var(--tag-accent-soft, rgba(255,255,255,.06));
      background: color-mix(in srgb, var(--tag-accent, var(--tag-fallback)) 18%, #101613);
      border-color: color-mix(in srgb, var(--tag-accent, var(--tag-fallback)) 52%, transparent);
      outline: none;
      transform: translateY(-1px);
    }

    .tag-marquee a:focus-visible {
      outline: 2px solid color-mix(in srgb, var(--tag-accent, var(--tag-fallback)) 72%, white);
      outline-offset: 2px;
    }

    .tag-marquee a span {
      color: currentColor;
      font-size: 10px;
      opacity: .58;
    }

    .tag-marquee.is-paused .tag-marquee-row,
    .tag-marquee.paused .tag-marquee-row,
    .tag-marquee[data-paused="true"] .tag-marquee-row {
      animation-play-state: paused;
    }

    .tag-insights {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-top: 12px;
    }

    .tag-insights article {
      padding: 18px;
      border-radius: 16px;
    }

    .tag-insights span {
      color: #5d6762;
      font-size: 8px;
    }

    .tag-insights strong {
      display: block;
      margin: 11px 0 7px;
      font-family: var(--font-display);
      font-size: 19px;
      font-weight: 500;
    }

    .tag-insights p {
      margin: 0;
      color: #69736e;
      font-size: 8px;
    }

    .friend-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 12px;
      margin-top: 0;
    }

    .friend-card {
      display: flex;
      min-height: 140px;
      align-items: center;
      gap: 16px;
      padding: 18px;
      color: inherit;
      text-decoration: none;
      border-radius: 17px;
      transition: transform .22s ease, border-color .22s ease;
    }

    .friend-card:hover {
      border-color: rgba(var(--accent-rgb),.24);
      transform: translateY(-3px);
    }

    .friend-mark {
      display: grid;
      width: 52px;
      height: 52px;
      flex: 0 0 auto;
      place-items: center;
      color: #d9ffe9;
      font-family: var(--font-display);
      font-size: 15px;
      background: linear-gradient(145deg, rgba(var(--accent-rgb),.24), rgba(var(--accent-rgb),.06));
      border: 1px solid rgba(var(--accent-rgb),.26);
      border-radius: 15px;
    }

    .friend-mark.cyan { color:#c9f7ff; background:rgba(56,189,248,.1); border-color:rgba(56,189,248,.24); }
    .friend-mark.amber { color:#ffe8c4; background:rgba(240,181,95,.1); border-color:rgba(240,181,95,.24); }
    .friend-mark.rose { color:#ffd4dc; background:rgba(251,113,133,.1); border-color:rgba(251,113,133,.24); }

    .friend-card h3 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 14px;
      font-weight: 550;
    }

    .friend-card p {
      margin: 7px 0 11px;
      color: #6a746f;
      font-size: 9px;
      line-height: 1.6;
    }

    .friend-card div > span {
      color: #4e9e71;
      font-family: var(--font-display);
      font-size: 8px;
    }

    .link-apply {
      display: grid;
      grid-template-columns: 1.1fr repeat(3, minmax(120px, 1fr)) auto;
      align-items: end;
      gap: 10px;
      margin-top: 12px;
      padding: 18px;
      border-radius: 17px;
    }

    .link-apply h3 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 13px;
    }

    .link-apply label,
    .account-form > label,
    .account-form .field-row label {
      display: grid;
      gap: 6px;
      color: #747e79;
      font-size: 8px;
    }

    .link-apply input,
    .account-form input,
    .account-form textarea {
      width: 100%;
      color: #dce4e0;
      font-size: 14px;
      outline: 0;
      background: rgba(255,255,255,.03);
      border: 1px solid rgba(255,255,255,.075);
      border-radius: 9px;
    }

    .link-apply input,
    .account-form input {
      height: 37px;
      padding: 0 10px;
    }

    .link-apply button,
    .save-profile {
      height: 37px;
      padding: 0 14px;
      color: #d5ffe6;
      background: rgba(var(--accent-rgb),.1);
      border: 1px solid rgba(var(--accent-rgb),.26);
      border-radius: 9px;
      cursor: pointer;
      font-size: 9px;
    }

    .about-hero {
      position: relative;
      display: grid;
      grid-template-columns: 170px minmax(0, 1fr);
      gap: 36px;
      min-height: 310px;
      align-items: center;
      padding: 30px 42px;
      border-radius: 21px;
      overflow: hidden;
    }

    .about-hero::after {
      position: absolute;
      width: 320px;
      height: 320px;
      right: -130px;
      top: -150px;
      content: "";
      border: 1px solid rgba(255,255,255,.1);
      border-radius: 50%;
      box-shadow: inset 0 0 80px rgba(var(--accent-rgb),.055);
    }

    .about-monogram {
      display: grid;
      width: 150px;
      height: 190px;
      place-items: center;
      font-family: var(--font-display);
      font-size: 50px;
      font-weight: 750;
      letter-spacing: -.12em;
      background: linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.025));
      border: 1px solid rgba(255,255,255,.15);
      border-radius: 18px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.13), 20px 25px 50px rgba(0,0,0,.35);
      transform: rotate(-4deg);
    }

    .about-hero h2 {
      max-width: 680px;
      font-size: clamp(26px, 4vw, 44px);
      line-height: 1.22;
    }

    .about-hero p {
      max-width: 620px;
      margin: 15px 0 0;
      color: #7c8681;
      font-size: 10px;
      line-height: 1.85;
    }

    .about-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 20px;
    }

    .about-actions button,
    .about-actions a {
      display: inline-flex;
      min-height: 35px;
      align-items: center;
      justify-content: center;
      padding: 0 14px;
      color: #aeb8b2;
      background: rgba(255,255,255,.035);
      border: 1px solid rgba(255,255,255,.08);
      border-radius: 999px;
      cursor: pointer;
      font-size: 9px;
      line-height: 1;
      text-align: center;
      white-space: nowrap;
    }

    .about-actions button:first-child,
    .about-actions a:first-child {
      color: #d8ffe8;
      background: rgba(var(--accent-rgb),.09);
      border-color: rgba(var(--accent-rgb),.23);
    }

    .about-actions :is(a, button):focus-visible {
      outline: 2px solid rgba(var(--accent-rgb), .7);
      outline-offset: 3px;
    }

    .about-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-top: 12px;
    }

    .about-grid article {
      padding: 20px;
      border-radius: 16px;
    }

    .about-grid span {
      color: var(--green);
      font-family: var(--font-display);
      font-size: 9px;
    }

    .about-grid h3 {
      margin: 18px 0 8px;
      font-size: 13px;
    }

    .about-grid p {
      margin: 0;
      color: #68726d;
      font-size: 9px;
      line-height: 1.65;
    }

    .site-timeline {
      display: grid;
      grid-template-columns: 150px repeat(3, 1fr);
      gap: 20px;
      margin-top: 12px;
      padding: 20px;
      border-radius: 16px;
    }

    .site-timeline h3 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 13px;
    }

    .site-timeline time {
      color: var(--green);
      font-family: var(--font-display);
      font-size: 9px;
    }

    .site-timeline p {
      margin: 7px 0 0;
      color: #6a746f;
      font-size: 8px;
      line-height: 1.6;
    }

    .user-hero {
      position: relative;
      display: grid;
      grid-template-columns: 90px minmax(180px, 1fr) auto auto;
      min-height: 190px;
      align-items: end;
      gap: 18px;
      padding: 28px;
      border-radius: 20px;
      overflow: hidden;
    }

    .user-cover-lines {
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 78% 0%, rgba(var(--accent-rgb),.13), transparent 27%),
        repeating-linear-gradient(105deg, transparent 0 47px, rgba(255,255,255,.025) 48px, transparent 49px);
      mask-image: linear-gradient(to bottom, black, transparent 80%);
    }

    .user-avatar-large {
      position: relative;
      z-index: 1;
      display: grid;
      width: 82px;
      height: 82px;
      place-items: center;
      font-family: var(--font-display);
      font-size: 24px;
      background: linear-gradient(145deg, #56625d, #171c1a);
      border: 2px solid rgba(255,255,255,.18);
      border-radius: 22px;
      box-shadow: 0 20px 34px rgba(0,0,0,.35);
    }

    .user-avatar-large span {
      position: absolute;
      right: -3px;
      bottom: -3px;
      width: 13px;
      height: 13px;
      background: var(--green);
      border: 3px solid #111513;
      border-radius: 50%;
    }

    .user-identity {
      position: relative;
      z-index: 1;
    }

    .user-identity h2 {
      font-size: 22px;
    }

    .user-identity p {
      margin: 7px 0 0;
      color: #6b7570;
      font-size: 9px;
    }

    .user-hero-stats {
      position: relative;
      z-index: 1;
      display: flex;
      gap: 22px;
    }

    .user-hero-stats div {
      display: grid;
      gap: 4px;
      text-align: center;
    }

    .user-hero-stats strong {
      font-family: var(--font-display);
      font-size: 18px;
      font-weight: 500;
    }

    .user-hero-stats span {
      color: #606a65;
      font-size: 8px;
    }

    .user-edit-button {
      position: relative;
      z-index: 1;
      display: flex;
      min-height: 35px;
      align-items: center;
      gap: 6px;
      padding: 0 13px;
      color: #c7d0cb;
      background: rgba(255,255,255,.035);
      border: 1px solid rgba(255,255,255,.09);
      border-radius: 999px;
      cursor: pointer;
      font-size: 9px;
    }

    .user-edit-button .icon {
      width: 13px;
    }

    .profile-layout {
      display: grid;
      grid-template-columns: 180px minmax(0, 1fr);
      gap: 12px;
      margin-top: 12px;
    }

    .profile-nav {
      align-self: start;
      display: grid;
      gap: 4px;
      padding: 10px;
      border-radius: 16px;
    }

    .profile-nav button {
      display: flex;
      min-height: 42px;
      align-items: center;
      gap: 10px;
      padding: 0 11px;
      color: #707a75;
      text-align: left;
      background: transparent;
      border: 1px solid transparent;
      border-radius: 10px;
      cursor: pointer;
      font-size: 9px;
    }

    .profile-nav button.active {
      color: #e5eee9;
      background: rgba(255,255,255,.045);
      border-color: rgba(255,255,255,.07);
    }

    .profile-nav .icon {
      width: 14px;
    }

    .profile-nav button.active .icon {
      color: var(--green);
    }

    .profile-nav .logout-item {
      display: flex;
      min-height: 42px;
      align-items: center;
      gap: 10px;
      padding: 0 11px;
      margin-top: 9px;
      color: #a96b65;
      border-top: 1px solid rgba(255,255,255,.05);
      border-radius: 0 0 10px 10px;
      font-size: 9px;
      white-space: nowrap;
    }

    .profile-panel {
      display: none;
    }

    .profile-panel.active {
      display: block;
      animation: none;
    }

    .profile-stat-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
    }

    .profile-stat-grid article {
      padding: 17px;
      border-radius: 15px;
    }

    .profile-stat-grid span {
      display: block;
      color: #68726d;
      font-size: 8px;
    }

    .profile-stat-grid strong {
      display: block;
      margin: 13px 0 7px;
      font-family: var(--font-display);
      font-size: 24px;
      font-weight: 500;
    }

    .profile-stat-grid b {
      color: #3fc47d;
      font-size: 8px;
      font-weight: 500;
    }

    .activity-card {
      margin-top: 10px;
      padding: 18px;
      border-radius: 16px;
    }

    .activity-card > header,
    .panel-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
    }

    .activity-card h3,
    .panel-heading h3 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 13px;
      font-weight: 550;
    }

    .activity-card header button,
    .activity-card header a {
      color: #69736e;
      background: transparent;
      border: 0;
      cursor: pointer;
      font-size: 8px;
    }

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

    .activity-card li {
      display: grid;
      grid-template-columns: 11px minmax(0, 1fr);
      gap: 10px;
      padding: 12px 0;
      border-top: 1px solid rgba(255,255,255,.05);
    }

    .activity-card li i {
      width: 7px;
      height: 7px;
      margin-top: 3px;
      background: var(--green);
      border: 2px solid #15211b;
      border-radius: 50%;
      box-shadow: 0 0 8px rgba(var(--accent-rgb),.35);
    }

    .activity-card li b {
      color: #b7c0bb;
      font-size: 9px;
    }

    .activity-card li p {
      margin: 5px 0;
      color: #707a75;
      font-size: 8px;
    }

    .activity-card li time {
      color: #4f5954;
      font-size: 7px;
    }

    .panel-heading {
      min-height: 62px;
      padding: 0 4px 10px;
    }

    .panel-heading p {
      margin: 5px 0 0;
      color: #66706b;
      font-size: 8px;
    }

    .panel-heading > button,
    .panel-heading > a {
      height: 33px;
      padding: 0 12px;
      color: #d4ffe5;
      background: rgba(var(--accent-rgb),.09);
      border: 1px solid rgba(var(--accent-rgb),.24);
      border-radius: 999px;
      cursor: pointer;
      font-size: 8px;
    }

    .user-list {
      padding: 6px 14px;
      border-radius: 15px;
    }

    .user-list > div {
      display: grid;
      grid-template-columns: 58px minmax(0, 1fr) auto;
      min-height: 67px;
      align-items: center;
      gap: 12px;
      border-bottom: 1px solid rgba(255,255,255,.05);
    }

    .user-list > div:last-child {
      border-bottom: 0;
    }

    .list-status {
      width: max-content;
      padding: 4px 6px;
      border-radius: 5px;
      font-size: 7px;
    }

    .list-status.published { color:#6cf5aa; background:rgba(var(--accent-rgb),.08); }
    .list-status.draft { color:#eac17e; background:rgba(240,181,95,.08); }

    .user-list p {
      display: grid;
      gap: 5px;
      margin: 0;
    }

    .user-list b {
      color: #b9c2bd;
      font-size: 9px;
    }

    .user-list small,
    .user-list time {
      color: #59635e;
      font-size: 7px;
    }

    .comment-list,
    .favorite-grid {
      display: grid;
      gap: 10px;
    }

    .comment-list article {
      padding: 16px;
      border-radius: 15px;
    }

    .comment-list header {
      display: flex;
      justify-content: space-between;
      color: #aeb8b2;
      font-size: 9px;
    }

    .comment-list time {
      color: #56605b;
      font-size: 7px;
    }

    .comment-list p,
    .comment-list .profile-comment-copy {
      margin: 10px 0;
      color: #77817c;
      font-size: 9px;
      line-height: 1.7;
    }

    .comment-list a {
      color: #4da878;
      font-size: 8px;
      text-decoration: none;
    }

    .profile-comment-copy {
      min-width: 0;
      overflow-wrap: anywhere;
    }

    .profile-comment-image {
      display: inline-block;
      max-width: min(100%, 180px);
      margin: 8px 8px 2px 0;
      padding: 0;
      overflow: hidden;
      vertical-align: top;
      background: #0b120e;
      border: 1px solid rgba(163, 203, 182, .15);
      border-radius: 10px;
      box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
      cursor: zoom-in;
      transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
    }

    .profile-comment-image:hover {
      border-color: rgba(var(--accent-rgb), .48);
      box-shadow: 0 9px 22px rgba(0, 0, 0, .28);
      transform: translateY(-1px);
    }

    .profile-comment-image:focus-visible {
      outline: 2px solid rgba(var(--accent-rgb), .72);
      outline-offset: 3px;
    }

    .profile-comment-image img {
      display: block;
      width: auto;
      max-width: 100%;
      height: auto;
      max-height: 120px;
      object-fit: contain;
    }

    .profile-comment-image-dialog {
      width: min(960px, calc(100vw - 28px));
      max-width: none;
      height: min(720px, calc(100dvh - 28px));
      max-height: none;
      padding: 48px 16px 16px;
      overflow: hidden;
      color: #dce8e1;
      background: #070c09;
      border: 1px solid rgba(210, 234, 221, .16);
      border-radius: 16px;
      box-shadow: 0 28px 80px rgba(0, 0, 0, .62);
    }

    .profile-comment-image-dialog:not([open]) {
      display: none;
    }

    .profile-comment-image-dialog::backdrop {
      background: rgba(0, 4, 2, .9);
    }

    .profile-comment-image-dialog figure {
      display: grid;
      width: 100%;
      height: 100%;
      margin: 0;
      grid-template-rows: minmax(0, 1fr) auto;
      place-items: center;
      gap: 10px;
    }

    .profile-comment-image-dialog img {
      display: block;
      width: 100%;
      height: 100%;
      min-width: 0;
      min-height: 0;
      object-fit: contain;
    }

    .profile-comment-image-dialog figcaption {
      overflow: hidden;
      max-width: 100%;
      color: #849189;
      font-size: 12px;
      line-height: 1.4;
      text-align: center;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-comment-image-close {
      position: absolute;
      z-index: 2;
      top: 10px;
      right: 10px;
      display: grid;
      width: 34px;
      height: 34px;
      padding: 0;
      place-items: center;
      color: #cdd9d2;
      background: #111814;
      border: 1px solid rgba(220, 240, 230, .13);
      border-radius: 9px;
      font: 400 23px/1 sans-serif;
      cursor: pointer;
    }

    .profile-comment-image-close:hover,
    .profile-comment-image-close:focus-visible {
      color: #effbf4;
      background: rgba(var(--accent-rgb), .14);
      border-color: rgba(var(--accent-rgb), .42);
      outline: none;
    }

    html.profile-comment-image-preview-open {
      overflow: hidden;
    }

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

    .profile-like-item {
      display: flex;
      min-width: 0;
      min-height: 92px;
      align-items: center;
      justify-content: space-between;
      padding: 15px 16px;
      gap: 16px;
      border-radius: 15px;
      transition: opacity .18s ease, transform .18s ease;
    }

    .profile-like-item.is-removing {
      pointer-events: none;
      opacity: 0;
      transform: translateX(10px);
    }

    .profile-like-copy {
      min-width: 0;
    }

    .profile-like-copy > span {
      display: block;
      margin-bottom: 4px;
      color: var(--green);
      font-size: 11px;
    }

    .profile-like-copy h3 {
      margin: 0;
      overflow: hidden;
      color: #d8e4dd;
      font-size: 15px;
      line-height: 1.45;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .profile-like-copy h3 a {
      color: inherit;
      text-decoration: none;
    }

    .profile-like-copy h3 a:hover,
    .profile-like-copy h3 a:focus-visible {
      color: #b9f6d1;
      outline: none;
    }

    .profile-like-copy p {
      margin: 5px 0 0;
      color: #7e8b84;
      font-size: 12px;
    }

    .profile-like-actions {
      display: flex;
      flex: 0 0 auto;
      align-items: center;
      gap: 7px;
    }

    .profile-like-actions a,
    .profile-like-actions button {
      display: inline-flex;
      min-height: 32px;
      align-items: center;
      justify-content: center;
      padding: 0 10px;
      border: 1px solid rgba(255,255,255,.09);
      border-radius: 8px;
      background: rgba(255,255,255,.025);
      color: #aebbb4;
      font: inherit;
      font-size: 12px;
      text-decoration: none;
      cursor: pointer;
      transition: border-color .16s ease, background-color .16s ease, color .16s ease;
    }

    .profile-like-actions .profile-like-icon-button {
      width: 34px;
      min-width: 34px;
      min-height: 34px;
      padding: 0;
      border-radius: 10px;
    }

    .profile-like-actions .profile-like-icon-button .icon {
      width: 16px;
      height: 16px;
      transition: transform .16s ease;
    }

    .profile-like-actions .profile-like-icon-button.is-open {
      border-color: rgba(var(--accent-rgb), .22);
      background: rgba(var(--accent-rgb), .075);
      color: #c8f9d9;
    }

    .profile-like-actions .profile-like-icon-button.is-unlike {
      color: #d6aaa4;
    }

    .profile-like-actions .profile-like-open {
      border-color: rgba(var(--accent-rgb), .22);
      background: rgba(var(--accent-rgb), .075);
      color: #c8f9d9;
      gap: 5px;
    }

    .profile-like-actions .profile-like-open .icon {
      width: 14px;
      height: 14px;
      transition: transform .16s ease;
    }

    .profile-like-actions .profile-like-icon-button.is-open:hover .icon,
    .profile-like-actions .profile-like-icon-button.is-open:focus-visible .icon {
      transform: scale(1.08);
    }

    .profile-like-actions a:hover,
    .profile-like-actions a:focus-visible {
      border-color: rgba(var(--accent-rgb), .34);
      background: rgba(var(--accent-rgb), .13);
      color: #d9f8e4;
      outline: none;
    }

    .profile-like-actions .profile-like-open:hover .icon,
    .profile-like-actions .profile-like-open:focus-visible .icon {
      transform: translateX(2px);
    }

    .profile-like-actions button {
      color: #d6aaa4;
    }

    .profile-like-actions button:hover,
    .profile-like-actions button:focus-visible {
      border-color: rgba(244, 130, 117, .42);
      background: rgba(244, 130, 117, .08);
      color: #ffd0c9;
      outline: none;
    }

    .profile-like-actions button:disabled {
      cursor: wait;
      opacity: .58;
    }

    .profile-like-actions .profile-like-icon-button.is-pending .icon {
      animation: profile-like-icon-spin .72s linear infinite;
    }

    @keyframes profile-like-icon-spin {
      to { transform: rotate(180deg); }
    }

    .profile-like-status {
      min-height: 18px;
      margin: 0;
      color: #8f9d95;
      font-size: 12px;
    }

    .profile-like-status:empty {
      display: none;
    }

    .favorite-grid {
      grid-template-columns: repeat(3, 1fr);
    }

    .favorite-grid button,
    .favorite-grid > a {
      min-height: 145px;
      padding: 17px;
      color: inherit;
      text-align: left;
      border-radius: 15px;
      cursor: pointer;
    }

    .favorite-grid span {
      color: var(--green);
      font-size: 7px;
    }

    .favorite-grid h3 {
      margin: 21px 0 12px;
      font-size: 11px;
      line-height: 1.55;
    }

    .favorite-grid p {
      margin: 0;
      color: #58625d;
      font-size: 7px;
    }

    .account-form {
      display: grid;
      gap: 14px;
      padding: 18px;
      border-radius: 15px;
    }

    .account-form .field-row {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 12px;
    }

    .account-form textarea {
      min-height: 80px;
      padding: 10px;
      resize: vertical;
    }

    .security-row {
      display: flex;
      min-height: 57px;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 8px 0;
      border-top: 1px solid rgba(255,255,255,.05);
    }

    .security-row > div {
      display: flex;
      align-items: center;
      gap: 10px;
    }

    .security-row .icon {
      width: 15px;
      color: #7d8782;
    }

    .security-row span {
      display: grid;
      gap: 4px;
    }

    .security-row b {
      color: #aeb8b2;
      font-size: 9px;
    }

    .security-row small {
      color: #59635e;
      font-size: 7px;
    }

    .security-row > button:not(.switch-control),
    .security-row > a {
      padding: 6px 9px;
      color: #77817c;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.07);
      border-radius: 7px;
      cursor: pointer;
      font-size: 8px;
    }

    .switch-control {
      position: relative;
      width: 35px;
      height: 20px;
      background: #27302c;
      border: 0;
      border-radius: 999px;
      cursor: pointer;
    }

    .switch-control i {
      position: absolute;
      top: 3px;
      left: 3px;
      width: 14px;
      height: 14px;
      background: #7a8580;
      border-radius: 50%;
      transition: left .2s ease, background .2s ease;
    }

    .switch-control.active {
      background: rgba(var(--accent-rgb),.2);
    }

    .switch-control.active i {
      left: 18px;
      background: var(--green);
    }

    .save-profile {
      justify-self: end;
    }

    .login-screen {
      position: relative;
      display: grid;
      min-height: 100vh;
      padding: 22px;
      place-items: center;
      background:
        radial-gradient(circle at 19% 20%, rgba(var(--accent-rgb),.09), transparent 25%),
        radial-gradient(circle at 82% 80%, rgba(255,255,255,.055), transparent 24%),
        #020403;
      overflow: hidden;
    }

    .login-orbit {
      position: absolute;
      border: 1px solid rgba(255,255,255,.055);
      border-radius: 50%;
      pointer-events: none;
    }

    .orbit-one {
      width: 520px;
      height: 520px;
      left: -230px;
      bottom: -250px;
    }

    .orbit-two {
      width: 420px;
      height: 420px;
      right: -220px;
      top: -210px;
      box-shadow: inset 0 0 100px rgba(var(--accent-rgb),.025);
    }

    .login-shell {
      position: relative;
      z-index: 1;
      display: grid;
      grid-template-columns: 1.08fr .92fr;
      width: min(1080px, 100%);
      min-height: 680px;
      border-radius: 26px;
      overflow: hidden;
    }

    .login-story {
      position: relative;
      display: flex;
      flex-direction: column;
      padding: 34px 38px;
      background:
        radial-gradient(circle at 35% 52%, rgba(var(--accent-rgb),.12), transparent 25%),
        linear-gradient(145deg, rgba(255,255,255,.035), transparent 55%);
      border-right: 1px solid rgba(255,255,255,.07);
      overflow: hidden;
    }

    .login-brand {
      display: inline-flex;
      width: max-content;
      align-items: center;
      gap: 10px;
      color: #e9f0ec;
      background: transparent;
      border: 0;
      cursor: pointer;
    }

    .login-brand span {
      font-family: var(--font-display);
      font-size: 23px;
      font-weight: 750;
      letter-spacing: -.13em;
    }

    .login-brand b {
      font-size: 10px;
      font-weight: 500;
    }

    .login-copy {
      position: relative;
      z-index: 2;
      margin-top: 90px;
    }

    .login-copy h1 {
      margin: 0;
      font-family: var(--font-display);
      font-size: clamp(34px, 4.4vw, 54px);
      font-weight: 500;
      line-height: 1.18;
      letter-spacing: -.04em;
    }

    .login-copy p {
      max-width: 400px;
      margin: 18px 0 0;
      color: #79837e;
      font-size: 10px;
      line-height: 1.9;
    }

    .login-deck {
      position: absolute;
      right: 5%;
      bottom: 82px;
      left: 5%;
      height: 190px;
      perspective: none;
    }

    .login-deck i {
      position: absolute;
      top: 24px;
      left: calc(30% + var(--i) * 50px);
      width: 74px;
      height: 138px;
      background: linear-gradient(115deg, rgba(255,255,255,.18), rgba(255,255,255,.035) 55%, rgba(var(--accent-rgb),.09));
      border: 1px solid rgba(255,255,255,.18);
      border-radius: 9px;
      box-shadow: 13px 18px 28px rgba(0,0,0,.34);
      transform: rotate(-4deg);
    }

    .login-deck i:nth-child(3) {
      background: linear-gradient(145deg, rgba(81,255,161,.35), rgba(0,120,59,.22));
      border-color: rgba(var(--accent-rgb),.45);
      box-shadow: 0 0 20px rgba(var(--accent-rgb),.15), 13px 18px 28px rgba(0,0,0,.38);
    }

    .login-deck > span {
      position: absolute;
      bottom: 0;
      left: 27%;
      color: #69736e;
      font-size: 8px;
    }

    .login-deck strong {
      color: #dce5e0;
      font-family: var(--font-display);
      font-size: 17px;
    }

    .login-story > footer {
      display: flex;
      justify-content: space-between;
      margin-top: auto;
      color: #46504b;
      font-family: var(--font-display);
      font-size: 7px;
      letter-spacing: .12em;
    }

    .login-form-side {
      position: relative;
      display: grid;
      place-items: center;
      padding: 58px 46px 40px;
      background: rgba(8,11,10,.76);
    }

    .login-back {
      position: absolute;
      top: 25px;
      right: 25px;
      display: flex;
      align-items: center;
      gap: 6px;
      color: #6f7974;
      background: transparent;
      border: 0;
      cursor: pointer;
      font-size: 8px;
    }

    .login-back .icon {
      width: 12px;
    }

    .login-form {
      width: min(340px, 100%);
    }

    .login-form header {
      margin-bottom: 28px;
    }

    .login-form h2 {
      margin: 0;
      font-family: var(--font-display);
      font-size: 25px;
      font-weight: 550;
    }

    .login-form header p {
      margin: 8px 0 0;
      color: #67716c;
      font-size: 9px;
    }

    .login-field {
      display: grid;
      gap: 7px;
      margin-top: 14px;
      color: #8d9792;
      font-size: 9px;
    }

    .login-field > div {
      position: relative;
      display: flex;
      height: 44px;
      align-items: center;
      background: rgba(255,255,255,.03);
      border: 1px solid rgba(255,255,255,.085);
      border-radius: 11px;
      transition: border-color .2s ease, box-shadow .2s ease;
    }

    .login-field > div:focus-within {
      border-color: rgba(var(--accent-rgb),.32);
      box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.06);
    }

    .login-field .icon {
      width: 14px;
      margin-left: 12px;
      color: #616b66;
    }

    .login-field input {
      min-width: 0;
      height: 100%;
      flex: 1;
      padding: 0 11px;
      color: #e4ece8;
      outline: 0;
      background: transparent;
      border: 0;
      font-size: 10px;
    }

    .login-field div > button {
      display: grid;
      width: 39px;
      height: 100%;
      place-items: center;
      color: #68726d;
      background: transparent;
      border: 0;
      cursor: pointer;
    }

    .login-field div > button .icon {
      width: 15px;
      margin: 0;
    }

    .login-options {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin: 13px 0 18px;
    }

    .login-options label {
      display: flex;
      align-items: center;
      gap: 6px;
      color: #747e79;
      font-size: 8px;
    }

    .login-options input {
      accent-color: var(--green);
    }

    .login-options button {
      color: #638c74;
      background: transparent;
      border: 0;
      cursor: pointer;
      font-size: 8px;
    }

    .login-error {
      margin: -5px 0 12px;
      padding: 9px 10px;
      color: #ffaaa4;
      background: rgba(255,92,80,.07);
      border: 1px solid rgba(255,92,80,.18);
      border-radius: 8px;
      font-size: 8px;
    }

    .login-submit,
    .register-button {
      display: flex;
      width: 100%;
      height: 43px;
      align-items: center;
      justify-content: center;
      gap: 8px;
      border-radius: 11px;
      cursor: pointer;
      font-size: 9px;
    }

    .login-submit {
      color: #dcffe9;
      background: linear-gradient(180deg, rgba(var(--accent-rgb),.2), rgba(var(--accent-rgb),.1));
      border: 1px solid rgba(var(--accent-rgb),.34);
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 30px rgba(0,0,0,.22);
    }

    .login-submit.loading {
      pointer-events: none;
      opacity: .7;
    }

    .login-submit .icon {
      width: 13px;
    }

    .login-demo {
      margin: 9px 0 0;
      color: #4f5954;
      font-size: 7px;
      text-align: center;
    }

    .login-divider {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 22px 0 12px;
      color: #515b56;
      font-size: 7px;
    }

    .login-divider::before,
    .login-divider::after {
      height: 1px;
      flex: 1;
      content: "";
      background: rgba(255,255,255,.06);
    }

    .register-button {
      color: #89938e;
      background: transparent;
      border: 1px solid rgba(255,255,255,.08);
    }

    /* Emlog production template bridge */
    a {
      color: inherit;
      text-decoration: none;
    }

    img {
      max-width: 100%;
      height: auto;
    }

    :where(a, button, input, textarea, select):focus-visible {
      outline: 2px solid color-mix(in srgb, var(--green) 72%, white);
      outline-offset: 3px;
    }

    .skip-link {
      position: fixed;
      z-index: 220;
      top: 10px;
      left: 50%;
      padding: 10px 14px;
      color: #eafff3;
      background: #0d1712;
      border: 1px solid rgba(var(--accent-rgb),.42);
      border-radius: 10px;
      box-shadow: 0 14px 38px rgba(0,0,0,.48);
      transform: translate(-50%, calc(-100% - 20px));
      transition: transform .2s ease;
    }

    .skip-link:focus {
      transform: translate(-50%, 0);
    }

    .icon-sprite {
      position: absolute;
      width: 0;
      height: 0;
      overflow: hidden;
      pointer-events: none;
    }

    .primary-chevron,
    .profile-arrow {
      width: 12px;
      height: 12px;
    }

    .profile-arrow {
      margin-left: auto;
      color: #59635e;
    }

    .post-table-body,
    .profile-content {
      min-width: 0;
    }

    .empty-copy {
      margin: 0;
      color: #66716b;
      font-size: 9px;
      line-height: 1.7;
    }

    .deck-empty {
      position: absolute;
      top: 50%;
      left: 50%;
      width: min(260px, calc(100% - 32px));
      color: #69746e;
      font-size: 9px;
      line-height: 1.7;
      text-align: center;
      transform: translate(-50%, -50%) rotate(var(--deck-tilt));
    }

    .progress-link {
      position: absolute;
      z-index: 2;
      left: 17px;
      bottom: 16px;
      display: inline-flex;
      align-items: center;
      gap: 5px;
      color: #d9f9e7;
      font-size: 8px;
      letter-spacing: .04em;
    }

    .progress-link::after {
      content: "→";
      color: var(--green-bright);
    }

    .progress-link:hover {
      color: #fff;
    }

    .timeline-title h2 {
      margin: 0;
      font: inherit;
      font-weight: 600;
    }

    .timeline-title > i {
      display: none;
    }

    .timeline-switch {
      padding: 5px 8px;
      color: #737e78;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.06);
      border-radius: 8px;
      font-size: 8px;
      transition: color .2s ease, border-color .2s ease;
    }

    .timeline-switch:hover {
      color: var(--green-bright);
      border-color: rgba(var(--accent-rgb),.25);
    }

    .release-strip {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
      gap: 7px;
      min-width: 0;
    }

    .release-item {
      position: relative;
      display: grid;
      min-width: 0;
      min-height: 78px;
      align-content: center;
      gap: 6px;
      padding: 11px 12px;
      color: #7c8781;
      background: rgba(255,255,255,.022);
      border: 1px solid rgba(255,255,255,.052);
      border-radius: 11px;
      transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
    }

    .release-item:hover,
    .release-item.is-current {
      color: #dce8e1;
      background: rgba(var(--accent-rgb),.055);
      border-color: rgba(var(--accent-rgb),.19);
      transform: translateY(-1px);
    }

    .release-item time {
      color: var(--green);
      font-family: var(--font-display);
      font-size: 8px;
    }

    .release-item span {
      overflow: hidden;
      font-size: 8px;
      line-height: 1.5;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .moment-copy {
      margin: 9px 0 2px;
      color: #8d9792;
      font-size: 10px;
      line-height: 1.75;
      overflow-wrap: anywhere;
    }

    .archive-layout-full {
      align-items: start;
    }

    .account-state {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 5px 8px;
      color: #83efb3;
      background: rgba(var(--accent-rgb),.07);
      border: 1px solid rgba(var(--accent-rgb),.18);
      border-radius: 999px;
      font-size: 8px;
    }

    .account-state::before {
      width: 5px;
      height: 5px;
      content: "";
      background: var(--green);
      border-radius: 50%;
      box-shadow: 0 0 7px rgba(var(--accent-rgb),.55);
    }

    .login-options a {
      color: #638c74;
      font-size: 8px;
    }

    body.auth-mode {
      min-height: 100vh;
      overflow: auto;
    }

    .login-captcha {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      align-items: center;
      gap: 8px;
    }

    .login-captcha img {
      width: 104px;
      height: 38px;
      object-fit: cover;
      cursor: pointer;
      background: #fff;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 8px;
    }

    .sidebar-overlay {
      position: fixed;
      z-index: 55;
      inset: 0;
      background: rgba(0,4,2,.78);
    }

    body.sidebar-open {
      overflow: hidden;
    }

    .site-footer {
      display: flex;
      min-height: 64px;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 10px 18px;
      margin-top: auto;
      padding: 18px 2px 8px;
      color: #59645e;
      border-top: 1px solid rgba(255,255,255,.055);
      font-size: 8px;
      line-height: 1.7;
    }

    .site-footer > div:first-child {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 16px;
    }

    .site-footer a {
      color: #718078;
      transition: color .2s ease;
    }

    .site-footer a:hover {
      color: var(--green-bright);
    }

    .footer-info {
      flex: 1 0 100%;
      color: #535e58;
    }

    .footer-info :where(p, ul, ol) {
      margin: 0;
    }

    /* Emlog widgets */
    .emstudio-widget-sidebar {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
      gap: 12px;
      margin: 14px 0 24px;
    }

    .side-widget {
      min-width: 0;
      padding: 17px;
      border-radius: 16px;
    }

    .side-widget h3 {
      margin: 0 0 12px;
      color: #cbd5cf;
      font-family: var(--font-display);
      font-size: 12px;
      font-weight: 550;
    }

    .side-widget ul {
      display: grid;
      gap: 0;
      margin: 0;
      padding: 0;
      list-style: none;
    }

    .side-widget li {
      border-top: 1px solid rgba(255,255,255,.05);
    }

    .side-widget li a {
      display: flex;
      min-width: 0;
      justify-content: space-between;
      gap: 10px;
      padding: 9px 0;
      color: #78837d;
      font-size: 8px;
      line-height: 1.55;
      transition: color .2s ease;
    }

    .side-widget li a:hover {
      color: #d8e6de;
    }

    .side-widget li a span {
      flex: 0 0 auto;
      color: #4f5a54;
    }

    .side-widget li > .widget-copy {
      padding-top: 9px;
    }

    .side-widget li > small {
      display: block;
      padding: 4px 0 9px;
      color: #505b55;
      font-size: 7px;
    }

    .side-widget form {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      gap: 7px;
    }

    .side-widget input {
      min-width: 0;
      height: 36px;
      padding: 0 10px;
      color: #d8e1dc;
      background: rgba(0,0,0,.18);
      border: 1px solid rgba(255,255,255,.075);
      border-radius: 9px;
      outline: none;
    }

    .side-widget form button {
      padding: 0 12px;
      color: #cffff0;
      background: rgba(var(--accent-rgb),.09);
      border: 1px solid rgba(var(--accent-rgb),.22);
      border-radius: 9px;
      cursor: pointer;
      font-size: 8px;
    }

    .widget-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .widget-tags a {
      padding: 5px 8px;
      color: #7d8982;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.065);
      border-radius: 999px;
      font-size: 8px;
    }

    .widget-tags a:hover {
      color: var(--green-bright);
      border-color: rgba(var(--accent-rgb),.22);
    }

    .widget-copy {
      color: #78837d;
      font-size: 9px;
      line-height: 1.8;
      overflow-wrap: anywhere;
    }

    .widget-copy > :first-child { margin-top: 0; }
    .widget-copy > :last-child { margin-bottom: 0; }

    .side-blogger {
      display: grid;
      grid-template-columns: 52px minmax(0, 1fr);
      align-items: center;
      gap: 6px 12px;
    }

    .side-blogger h3 {
      grid-column: 1 / -1;
    }

    .side-blogger > img {
      grid-row: 2 / span 2;
      width: 52px;
      height: 52px;
      object-fit: cover;
      border: 1px solid rgba(255,255,255,.12);
      border-radius: 14px;
    }

    .side-blogger > strong {
      align-self: end;
      color: #cbd6d0;
      font-size: 10px;
    }

    .side-blogger > p {
      align-self: start;
      margin: 0;
      color: #66716b;
      font-size: 8px;
      line-height: 1.55;
    }

    .side-calendar > a {
      display: grid;
      gap: 6px;
      padding: 13px;
      color: #7f8a84;
      background: rgba(var(--accent-rgb),.035);
      border: 1px solid rgba(var(--accent-rgb),.11);
      border-radius: 11px;
    }

    .side-calendar > a strong {
      color: #d2ddd7;
      font-family: var(--font-display);
      font-size: 15px;
      font-weight: 500;
    }

    .side-calendar > a span {
      color: #66716b;
      font-size: 8px;
    }

    /* Article and standalone page */
    .article-view {
      min-width: 0;
      padding: 14px 0 30px;
    }

    .page-view .article-hero {
      grid-template-columns: 1fr;
    }

    .article-hero {
      position: relative;
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(240px, 34%);
      min-height: 290px;
      align-items: stretch;
      gap: clamp(24px, 4vw, 54px);
      padding: clamp(28px, 4vw, 52px);
      border-radius: 22px;
      overflow: hidden;
    }

    .article-hero::before {
      position: absolute;
      width: 360px;
      height: 360px;
      right: -160px;
      bottom: -220px;
      content: "";
      background: radial-gradient(circle, rgba(var(--accent-rgb),.075), transparent 70%);
      border: 1px solid rgba(var(--accent-rgb),.1);
      border-radius: 50%;
      pointer-events: none;
    }

    .article-heading {
      position: relative;
      z-index: 1;
      align-self: center;
      min-width: 0;
    }

    .article-heading:only-child {
      grid-column: 1 / -1;
      max-width: 920px;
    }

    .article-kicker {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 7px;
      margin-bottom: 17px;
      color: var(--green);
      font-family: var(--font-display);
      font-size: 8px;
      letter-spacing: .14em;
    }

    .top-badge {
      padding: 4px 7px;
      color: #d9ffe9;
      background: rgba(var(--accent-rgb),.09);
      border: 1px solid rgba(var(--accent-rgb),.23);
      border-radius: 999px;
      font-family: var(--font-body);
      font-size: 7px;
      letter-spacing: 0;
    }

    .article-heading h1 {
      max-width: 900px;
      margin: 0;
      color: #edf5f1;
      font-family: var(--font-display);
      font-size: clamp(30px, 4.2vw, 54px);
      font-weight: 550;
      letter-spacing: -.035em;
      line-height: 1.15;
      text-wrap: balance;
    }

    .article-heading > p {
      max-width: 760px;
      margin: 18px 0 0;
      color: #89948e;
      font-size: 11px;
      line-height: 1.8;
    }

    .article-meta {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 8px 16px;
      margin-top: 24px;
      color: #6d7872;
      font-size: 8px;
    }

    .article-meta > span,
    .article-meta > a {
      display: inline-flex;
      align-items: center;
      gap: 5px;
    }

    .article-meta .icon {
      width: 12px;
      height: 12px;
      color: #718078;
    }

    .article-meta a:hover {
      color: var(--green-bright);
    }

    .article-meta .article-sort-badge {
      padding: 3px 7px;
      color: var(--category-label-color, #9aaba2);
      font-size: inherit;
    }

    .article-meta .article-sort-badge.category-color-link:hover,
    .article-meta .article-sort-badge.category-color-link:focus-visible {
      color: var(--category-label-color, #b6c5bd);
    }

    .article-edit-link {
      padding: 4px 7px;
      color: #8fe9b7;
      background: rgba(var(--accent-rgb),.05);
      border: 1px solid rgba(var(--accent-rgb),.16);
      border-radius: 6px;
    }

    .article-cover {
      position: relative;
      z-index: 1;
      min-height: 210px;
      margin: 0;
      border: 1px solid rgba(255,255,255,.11);
      border-radius: 17px;
      overflow: hidden;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 18px 24px 50px rgba(0,0,0,.32);
      transform: rotate(1.5deg);
    }

    .article-cover img {
      display: block;
      width: 100%;
      height: 100%;
      min-height: 210px;
      object-fit: cover;
    }

    .article-layout {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 245px;
      align-items: start;
      gap: 14px;
      margin-top: 14px;
    }

    .article-main {
      min-width: 0;
      padding: clamp(24px, 4vw, 54px);
      border-radius: 20px;
    }

    .page-content {
      margin-top: 14px;
    }

    .article-content {
      color: #b9c3bd;
      font-size: clamp(14px, 1.2vw, 16px);
      line-height: 1.9;
      overflow-wrap: anywhere;
    }

    .article-content > :first-child { margin-top: 0; }
    .article-content > :last-child { margin-bottom: 0; }

    .markdown :where(h1, h2, h3, h4, h5, h6) {
      margin: 1.8em 0 .7em;
      color: #edf5f1;
      font-family: var(--font-display);
      font-weight: 560;
      line-height: 1.35;
      scroll-margin-top: 24px;
    }

    .markdown h1 { font-size: 2em; }
    .markdown h2 { font-size: 1.55em; }
    .markdown h3 { font-size: 1.28em; }
    .markdown h4 { font-size: 1.08em; }

    .markdown p,
    .markdown ul,
    .markdown ol,
    .markdown blockquote,
    .markdown pre,
    .markdown table {
      margin: 1.15em 0;
    }

    .markdown a {
      color: #7be7aa;
      text-decoration: underline;
      text-decoration-color: rgba(123,231,170,.35);
      text-underline-offset: 3px;
    }

    .markdown a:hover {
      color: #b0ffd1;
      text-decoration-color: currentColor;
    }

    .markdown img,
    .markdown video,
    .markdown iframe {
      display: block;
      max-width: 100%;
      margin: 1.6em auto;
      border-radius: 14px;
    }

    .markdown iframe {
      width: 100%;
      min-height: 360px;
      border: 0;
    }

    .markdown blockquote {
      padding: 14px 18px;
      color: #8f9a94;
      background: rgba(var(--accent-rgb),.035);
      border-left: 3px solid rgba(var(--accent-rgb),.48);
      border-radius: 0 10px 10px 0;
    }

    .markdown pre {
      max-width: 100%;
      padding: 17px;
      color: #b8d9c7;
      background: #050a07;
      border: 1px solid rgba(255,255,255,.075);
      border-radius: 13px;
      overflow: auto;
      line-height: 1.65;
      tab-size: 2;
    }

    .markdown pre code {
      padding: 0;
      color: inherit;
      background: transparent;
      border: 0;
    }

    .markdown table {
      display: block;
      width: 100%;
      border-collapse: collapse;
      overflow-x: auto;
    }

    .markdown th,
    .markdown td {
      min-width: 100px;
      padding: 10px 12px;
      border: 1px solid rgba(255,255,255,.08);
      text-align: left;
    }

    .markdown th {
      color: #d8e4dd;
      background: rgba(255,255,255,.035);
    }

    .markdown hr {
      height: 1px;
      margin: 2em 0;
      background: rgba(255,255,255,.08);
      border: 0;
    }

    .article-footer {
      display: flex;
      align-items: center;
      justify-content: space-between;
      flex-wrap: wrap;
      gap: 12px;
      margin-top: 42px;
      padding-top: 20px;
      border-top: 1px solid rgba(255,255,255,.065);
    }

    .article-tags {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .article-tags a {
      padding: 5px 8px;
      color: #83a993;
      background: rgba(var(--accent-rgb),.04);
      border: 1px solid rgba(var(--accent-rgb),.13);
      border-radius: 999px;
      font-size: 8px;
    }

    .article-counters {
      display: flex;
      gap: 10px;
      color: #5f6a64;
      font-size: 8px;
    }

    .article-toc {
      position: sticky;
      top: 14px;
      display: grid;
      gap: 10px;
      padding: 20px;
      border-radius: 17px;
    }

    .article-toc h2 {
      margin: 0;
      color: #dce5e0;
      font-family: var(--font-display);
      font-size: 17px;
      font-weight: 550;
    }

    .article-toc p {
      margin: 0 0 8px;
      color: #6d7872;
      font-size: 9px;
      line-height: 1.75;
    }

    .article-toc a {
      display: flex;
      min-height: 34px;
      align-items: center;
      justify-content: space-between;
      padding: 0 10px;
      color: #86918b;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.06);
      border-radius: 9px;
      font-size: 8px;
    }

    .article-toc a::after {
      content: "→";
      color: var(--green);
    }

    .neighbor-log {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 10px;
      margin-top: 14px;
    }

    .neighbor-card {
      display: grid;
      min-width: 0;
      gap: 8px;
      padding: 17px 19px;
      background: rgba(13,17,16,.82);
      border: 1px solid var(--line);
      border-radius: 15px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
      transition: border-color .2s ease, transform .2s ease;
    }

    .neighbor-card:hover {
      border-color: rgba(var(--accent-rgb),.22);
      transform: translateY(-2px);
    }

    .neighbor-card.next {
      text-align: right;
    }

    .neighbor-card span {
      color: var(--green);
      font-size: 8px;
    }

    .neighbor-card strong {
      overflow: hidden;
      color: #c9d3cd;
      font-size: 10px;
      font-weight: 550;
      line-height: 1.55;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    /* Comments */
    .comments-section,
    .comment-form-card {
      margin-top: 14px;
      padding: clamp(20px, 3vw, 32px);
      background:
        linear-gradient(145deg, rgba(255,255,255,.045), transparent 42%),
        var(--panel);
      border: 1px solid var(--line);
      border-radius: 19px;
      box-shadow: inset 0 1px 0 rgba(255,255,255,.045), 0 22px 65px rgba(0,0,0,.3);
    }

    .comments-section > header,
    .comment-form-card > header {
      margin-bottom: 18px;
    }

    .comments-section h2,
    .comment-form-card h2 {
      margin: 0;
      color: #e1e9e5;
      font-family: var(--font-display);
      font-size: 20px;
      font-weight: 550;
    }

    .comments-section h2 small {
      color: #69746e;
      font-size: .55em;
      font-weight: 400;
    }

    .comment-item {
      display: grid;
      grid-template-columns: 38px minmax(0, 1fr);
      gap: 12px;
      margin-top: 9px;
      padding: 16px;
      border-radius: 14px;
    }

    .comment-item.is-child {
      margin-left: clamp(22px, 5vw, 64px);
    }

    .comment-item > img {
      width: 38px;
      height: 38px;
      object-fit: cover;
      border: 1px solid rgba(255,255,255,.13);
      border-radius: 11px;
    }

    .comment-item > div {
      min-width: 0;
    }

    .comment-item header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      color: #d3ddd7;
      font-size: 9px;
    }

    .comment-item header time {
      color: #59645e;
      font-size: 8px;
    }

    .comment-copy {
      margin-top: 9px;
      color: #8c9791;
      font-size: 10px;
      line-height: 1.75;
      overflow-wrap: anywhere;
    }

    .comment-copy > :first-child { margin-top: 0; }
    .comment-copy > :last-child { margin-bottom: 0; }

    .comment-copy a {
      color: #74dda2;
    }

    .comment-copy img {
      max-width: 100%;
      border-radius: 10px;
    }

    .comment-reply-button {
      margin-top: 10px;
      padding: 5px 8px;
      color: #718079;
      background: rgba(255,255,255,.025);
      border: 1px solid rgba(255,255,255,.06);
      border-radius: 7px;
      cursor: pointer;
      font-size: 8px;
    }

    .comment-reply-button:hover {
      color: var(--green-bright);
      border-color: rgba(var(--accent-rgb),.2);
    }

    .comment-reply-slot:not(:empty) {
      margin-top: 14px;
      padding-top: 14px;
      border-top: 1px solid rgba(255,255,255,.06);
    }

    .comment-form-card > p {
      color: #89948e;
      font-size: 10px;
      line-height: 1.7;
    }

    .comment-form-card > p a {
      color: var(--green-bright);
    }

    #commentform {
      display: grid;
      gap: 13px;
    }

    .comment-replying {
      margin: 0;
      color: #76827b;
      font-size: 8px;
    }

    .comment-replying strong {
      color: var(--green-bright);
      font-weight: 550;
    }

    .comment-replying:has(strong:empty) {
      display: none;
    }

    #commentform label {
      display: grid;
      gap: 7px;
      color: #79847e;
      font-size: 8px;
    }

    #commentform :where(input, textarea) {
      width: 100%;
      min-width: 0;
      color: #dce5e0;
      background: rgba(0,0,0,.2);
      border: 1px solid rgba(255,255,255,.075);
      border-radius: 10px;
      outline: none;
      transition: border-color .2s ease, box-shadow .2s ease;
    }

    #commentform input {
      height: 39px;
      padding: 0 11px;
    }

    #commentform textarea {
      min-height: 132px;
      padding: 11px;
      resize: vertical;
      line-height: 1.7;
    }

    #commentform :where(input, textarea):focus {
      border-color: rgba(var(--accent-rgb),.34);
      box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.065);
    }

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

    .comment-captcha {
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 9px;
      color: #737e78;
      font-size: 8px;
    }

    .comment-captcha img {
      max-height: 38px;
      background: #fff;
      border-radius: 8px;
    }

    .comment-captcha input {
      width: min(180px, 100%) !important;
    }

    .comment-form-actions {
      display: flex;
      justify-content: flex-end;
      gap: 8px;
      padding-top: 3px;
    }

    .comment-form-actions button {
      min-height: 37px;
      padding: 0 15px;
      color: #d9fce8;
      background: rgba(var(--accent-rgb),.1);
      border: 1px solid rgba(var(--accent-rgb),.24);
      border-radius: 999px;
      cursor: pointer;
      font-size: 8px;
    }

    .comment-form-actions button[type="button"] {
      color: #7a857f;
      background: transparent;
      border-color: rgba(255,255,255,.075);
    }

    /* 404 */
    .error-screen {
      position: relative;
      display: grid;
      min-height: 100vh;
      min-height: 100dvh;
      padding: 22px;
      place-items: center;
      overflow: hidden;
    }

    .error-screen::before,
    .error-screen::after {
      position: absolute;
      content: "";
      border: 1px solid rgba(255,255,255,.055);
      border-radius: 50%;
      pointer-events: none;
    }

    .error-screen::before {
      width: min(72vw, 820px);
      height: min(72vw, 820px);
      transform: rotate(-12deg);
    }

    .error-screen::after {
      width: min(48vw, 540px);
      height: min(48vw, 540px);
      border-color: rgba(var(--accent-rgb),.08);
      transform: rotate(18deg);
    }

    .error-card {
      position: relative;
      z-index: 1;
      width: min(660px, 100%);
      padding: clamp(34px, 7vw, 76px);
      border-radius: 24px;
      text-align: center;
      overflow: hidden;
    }

    .error-card::before {
      position: absolute;
      width: 250px;
      height: 250px;
      top: -150px;
      right: -80px;
      content: "";
      background: radial-gradient(circle, rgba(var(--accent-rgb),.09), transparent 70%);
      border-radius: 50%;
      pointer-events: none;
    }

    .error-card > strong {
      display: block;
      margin: 4px 0 8px;
      color: rgba(230,241,235,.94);
      font-family: var(--font-display);
      font-size: clamp(86px, 18vw, 150px);
      font-weight: 450;
      letter-spacing: -.08em;
      line-height: .9;
      text-shadow: 0 0 50px rgba(var(--accent-rgb),.12);
    }

    .error-card h1 {
      margin: 20px 0 0;
      color: #e8f0ec;
      font-family: var(--font-display);
      font-size: clamp(22px, 4vw, 34px);
      font-weight: 550;
    }

    .error-card > p {
      max-width: 480px;
      margin: 13px auto 0;
      color: #7e8983;
      font-size: 10px;
      line-height: 1.8;
    }

    .error-search {
      display: grid;
      grid-template-columns: minmax(0, 1fr) auto;
      width: min(450px, 100%);
      margin: 26px auto 12px;
      gap: 7px;
    }

    .error-search input {
      padding-inline: 13px;
    }

    .error-search button {
      min-width: 72px;
      color: #d8ffea;
      background: rgba(var(--accent-rgb),.1);
      border: 1px solid rgba(var(--accent-rgb),.25);
      border-radius: 10px;
      cursor: pointer;
      font-size: 9px;
    }

    .error-card > .primary-button {
      width: max-content;
      margin: 0 auto;
    }

    /* Readability scale: keep supporting copy legible on standard-density screens. */
    .brand-name,
    .nav-text,
    .primary-button,
    .stat-label,
    .post-cell-main h3,
    .archive-month h3,
    .friend-card h3,
    .favorite-grid h3,
    .side-widget h3 {
      font-size: var(--font-md);
    }

    .profile-name,
    .page-toolbar-card p,
    .archive-hero p,
    .tags-hero > p,
    .category-card p,
    .archive-posts a,
    .composer-main textarea,
    .moment-copy,
    .friend-card p,
    .about-hero p,
    .about-grid p,
    .comment-copy,
    .comment-form-card > p,
    .error-card > p {
      font-size: 13px;
    }

    .switcher-label,
    .switcher span,
    .page-title p,
    .segment,
    .toolbar-button,
    .group-heading,
    .task-name,
    .timeline-title,
    .field label,
    .form-actions button,
    .toast,
    .page-filter-pills button,
    .page-filter-pills a,
    .post-cell-main p,
    .empty-state p,
    .archive-total span,
    .moment-item header,
    .moment-item p,
    .composer-main footer button,
    .about-actions a,
    .site-timeline p,
    .login-brand b,
    .login-copy p,
    .login-form header p,
    .login-field,
    .login-field input,
    .login-submit,
    .register-button,
    .empty-copy,
    .deck-empty,
    .moment-copy,
    .widget-copy,
    .side-blogger > p,
    .side-calendar > a span,
    .article-heading > p,
    .article-toc p,
    .neighbor-card strong,
    .comment-item header {
      font-size: var(--font-sm);
    }

    .profile-role,
    .shortcut,
    .stat-number small,
    .stat-trend,
    .group-count,
    .task-id,
    .task-due,
    .priority-chip,
    .progress-value small,
    .file-meta,
    .file-title,
    .timeline-month,
    .timeline-view button,
    .row-label,
    .timeline-bar,
    .eyebrow,
    .post-table-head,
    .table-category,
    .post-table-row time,
    .pagination button,
    .pagination a,
    .pagination span,
    .category-card footer,
    .year-switcher span,
    .archive-month header p,
    .archive-posts b,
    .composer-main footer,
    .moment-item header time,
    .moment-item footer button,
    .mini-stat-list span,
    .moment-aside p,
    .tag-insights span,
    .tag-insights p,
    .friend-card div > span,
    .about-grid span,
    .site-timeline time,
    .timeline-switch,
    .progress-link,
    .site-footer,
    .side-widget li a,
    .side-widget li > small,
    .side-widget form button,
    .widget-tags a,
    .article-kicker,
    .top-badge,
    .article-meta,
    .article-tags a,
    .article-counters,
    .article-toc a,
    .neighbor-card span,
    .comment-item header time,
    .comment-reply-button,
    .comment-replying,
    #commentform label,
    .comment-captcha,
    .comment-form-actions button,
    .error-search button {
      font-size: var(--font-xs);
    }

    .page-toolbar-card p,
    .archive-hero p,
    .tags-hero > p,
    .post-cell-main p,
    .category-card p,
    .friend-card p,
    .about-hero p,
    .about-grid p,
    .site-timeline p,
    .comment-copy,
    .comment-form-card > p {
      color: #929f98;
    }

    .about-contact {
      color: #a4bbb0 !important;
      font-size: 12px !important;
    }

    /* Personal center uses the same readable scale as the public content pages. */
    .user-identity p {
      color: #96a29b;
      font-size: 13px;
    }

    .user-hero-stats span,
    .profile-stat-grid b,
    .activity-card header a,
    .activity-card li time,
    .user-list small,
    .user-list time,
    .comment-list time,
    .comment-list a,
    .favorite-grid span,
    .favorite-grid p,
    .security-row small,
    .security-row > button:not(.switch-control),
    .security-row > a,
    .account-state {
      font-size: var(--font-xs);
    }

    .user-edit-button,
    .profile-stat-grid span,
    .activity-card li p,
    .panel-heading p,
    .panel-heading > button,
    .panel-heading > a,
    .comment-list header,
    .account-form > label,
    .account-form .field-row label,
    .security-row b {
      font-size: var(--font-sm);
    }

    .profile-nav button,
    .profile-nav .logout-item,
    .activity-card li b,
    .user-list b,
    .comment-list p,
    .comment-list .profile-comment-copy {
      font-size: 13px;
    }

    .activity-card h3,
    .panel-heading h3 {
      font-size: 16px;
    }

    .list-status {
      font-size: 10px;
    }

    .profile-nav button,
    .profile-stat-grid span,
    .activity-card li p,
    .panel-heading p,
    .user-list small,
    .user-list time,
    .comment-list p,
    .comment-list .profile-comment-copy,
    .favorite-grid p,
    .security-row small {
      color: #8d9992;
    }

    @keyframes tag-marquee-left {
      from { transform: translateX(0); }
      to { transform: translateX(-50%); }
    }

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

    @keyframes rise-in {
      from { opacity: 0; transform: translateY(12px); }
      to { opacity: 1; transform: translateY(0); }
    }

    @keyframes slide-left {
      from { opacity: 0; transform: translateX(15px); }
      to { opacity: 1; transform: translateX(0); }
    }

    @keyframes float-card {
      0%, 100% { translate: 0 0; }
      50% { translate: 0 -5px; }
    }

    @media (max-width: 1280px) {
      .app-shell {
        grid-template-columns: 74px minmax(0, 1fr) 260px;
      }

      .app-shell.wide-view {
        grid-template-columns: 74px minmax(0, 1fr);
      }

      .sidebar {
        align-items: center;
        padding-inline: 9px;
      }

      .brand-name,
      .nav-text,
      .nav-arrow,
      .workspace-switcher,
      .profile-meta {
        display: none;
      }

      .brand {
        padding-inline: 0;
      }

      .nav-list {
        width: 100%;
      }

      .nav-item {
        justify-content: center;
        padding: 0;
      }

      .nav-item.active .nav-arrow {
        position: absolute;
        right: 6px;
        display: block;
        width: 10px;
      }

      .profile {
        justify-content: center;
      }

      .file-card:nth-child(10),
      .file-card:nth-child(9) {
        display: none;
      }
    }

    @media (max-width: 1080px) {
      .app-shell {
        grid-template-columns: 74px minmax(0, 1fr);
      }

      .detail-panel {
        position: fixed;
        z-index: 40;
        top: 14px;
        right: 14px;
        width: min(310px, calc(100% - 28px));
        animation: none;
        transform: translateX(calc(100% + 32px));
        transition: transform .3s ease;
      }

      .detail-panel.open {
        transform: translateX(0);
      }

      .detail-close-mobile {
        display: inline-grid !important;
      }

      .stats-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) 112px;
      }
    }

    @media (max-width: 820px) {
      .app-shell {
        display: block;
        width: min(100% - 20px, 720px);
        margin: 10px auto;
      }

      .sidebar {
        position: fixed;
        z-index: 60;
        inset: 10px auto 10px 10px;
        width: 210px;
        height: auto;
        min-height: 0;
        align-items: stretch;
        transform: translateX(calc(-100% - 22px));
        transition: transform .3s ease;
      }

      .sidebar.open {
        transform: translateX(0);
      }

      .brand-name,
      .nav-text,
      .nav-arrow,
      .workspace-switcher,
      .profile-meta {
        display: block;
      }

      .nav-item {
        justify-content: flex-start;
        padding: 0 13px;
      }

      .profile {
        justify-content: flex-start;
      }

      .workspace {
        padding-top: 0;
      }

      .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 9px;
      }

      .mobile-menu {
        display: inline-grid;
      }

      .page-title p,
      .top-actions .icon-button,
      .primary-button span {
        display: none;
      }

      .page-title h1 {
        font-size: 17px;
      }

      .primary-button {
        width: 42px;
        min-width: 42px;
        height: 42px;
        padding: 0;
        gap: 0;
        justify-content: center;
        border-radius: 50%;
        line-height: 1;
      }

      /* 窄屏写作入口收敛为单一加号，避免文字隐藏后箭头挤偏图标。 */
      .top-actions .primary-button .primary-chevron {
        display: none;
      }

      .top-actions .primary-button > .icon:not(.primary-chevron) {
        width: 19px;
        height: 19px;
      }

      .top-actions {
        min-width: 42px;
        justify-content: flex-end;
      }

      .search-box input {
        height: 37px;
      }

      .shortcut {
        display: none;
      }

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

      .stat-card.alert-card {
        min-height: 92px;
      }

      .section-heading {
        align-items: flex-start;
        flex-direction: column;
      }

      .board-controls {
        width: 100%;
        justify-content: space-between;
        overflow-x: auto;
        scrollbar-width: none;
      }

      .board-controls::-webkit-scrollbar {
        display: none;
      }

      .board-card {
        grid-template-columns: 210px minmax(430px, 1fr);
        overflow-x: auto;
      }

      .timeline-card {
        overflow-x: auto;
      }

      .page-toolbar-card,
      .archive-hero {
        align-items: flex-start;
        flex-direction: column;
      }

      .page-filter-pills {
        justify-content: flex-start;
      }

      .post-table-head {
        display: none;
      }

      .post-table-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 8px;
        padding: 14px 10px;
      }

      .post-cell-main {
        grid-column: 1 / -1;
        align-items: flex-start;
      }

      .post-table-row.has-post-media {
        min-height: 104px;
      }

      .post-media {
        flex-basis: 112px;
        width: 112px;
        height: 72px;
      }

      .post-cell-main .post-index {
        padding-top: 4px;
      }

      .post-cell-copy {
        padding-top: 3px;
      }

      .table-category,
      .table-metric,
      .post-table-row time {
        display: none;
      }

      .row-action {
        position: absolute;
        right: 14px;
      }

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

      .archive-layout,
      .moment-layout,
      .profile-layout {
        grid-template-columns: 1fr;
      }

      .year-switcher,
      .profile-nav {
        display: flex;
        overflow-x: auto;
        scrollbar-width: none;
      }

      .year-switcher button,
      .year-switcher a,
      .profile-nav button {
        flex: 0 0 auto;
      }

      .profile-nav .logout-item {
        flex: 0 0 auto;
        margin-top: 0;
        border-top: 0;
      }

      .archive-month {
        grid-template-columns: 120px minmax(0, 1fr);
      }

      .moment-aside {
        display: none;
      }

      .tag-insights,
      .about-grid,
      .profile-stat-grid,
      .favorite-grid {
        grid-template-columns: 1fr;
      }

      .friend-grid {
        grid-template-columns: 1fr;
      }

      .link-apply {
        grid-template-columns: 1fr 1fr;
      }

      .link-apply > div {
        grid-column: 1 / -1;
      }

      .about-hero {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 22px;
        padding: 26px;
      }

      .about-monogram {
        width: 105px;
        height: 150px;
        font-size: 37px;
      }

      .site-timeline {
        grid-template-columns: 1fr;
      }

      .user-hero {
        grid-template-columns: 82px minmax(0, 1fr) auto;
      }

      .user-hero-stats {
        grid-column: 1 / -1;
        justify-content: flex-start;
      }
    }

    @media (max-width: 760px) {
      .login-screen {
        padding: 10px;
      }

      .login-shell {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 20px);
      }

      .login-story {
        display: none;
      }

      .login-form-side {
        padding: 60px 28px 35px;
      }

      .tags-hero {
        padding: 22px;
      }

      .tag-marquee {
        min-height: 270px;
        gap: 11px;
        margin: 18px -22px -2px;
        padding-block: 20px;
      }

      .tag-marquee::before,
      .tag-marquee::after {
        width: 34px;
      }

      .tag-marquee-group {
        min-width: min(760px, 100vw);
        gap: 10px;
        padding-right: 10px;
      }

      .tag-marquee a {
        min-height: 32px;
        padding-inline: 11px;
        font-size: 11px;
      }

      .profile-like-item {
        min-height: 0;
        align-items: stretch;
        flex-direction: column;
        gap: 12px;
        padding: 14px;
      }

      .profile-like-copy h3 {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        white-space: normal;
      }

      .profile-like-actions {
        width: 100%;
      }

      .profile-like-actions a,
      .profile-like-actions button {
        flex: 1 1 0;
      }
    }

    @media (max-width: 540px) {
      .topbar {
        grid-template-columns: auto 1fr auto;
        grid-template-areas:
          "menu title add"
          "search search search";
        padding: 8px 0 12px;
      }

      .mobile-menu { grid-area: menu; }
      .page-title { grid-area: title; }
      .search-box { grid-area: search; }
      .top-actions { grid-area: add; }

      .stats-grid {
        gap: 9px;
      }

      .stat-card {
        min-height: 99px;
        padding: 14px;
      }

      .stat-number {
        font-size: 24px;
      }

      .stat-icon {
        width: 34px;
        height: 34px;
      }

      .segment {
        padding: 0 9px;
      }

      .control-group .toolbar-button span {
        display: none;
      }

      .board-card {
        grid-template-columns: 195px minmax(410px, 1fr);
      }

      .toast {
        right: 12px;
        bottom: 12px;
        left: 12px;
      }

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

      .page-toolbar-card {
        padding: 18px;
      }

      .category-grid {
        grid-template-columns: 1fr;
      }

      .category-card {
        min-height: 190px;
      }

      .archive-hero {
        padding: 23px;
      }

      .archive-total strong {
        font-size: 60px;
      }

      .archive-month {
        grid-template-columns: 1fr;
      }

      .tag-cloud {
        padding-inline: 0;
      }

      .link-apply,
      .about-hero,
      .account-form .field-row {
        grid-template-columns: 1fr;
      }

      .about-monogram {
        width: 76px;
        height: 92px;
      }

      .user-hero {
        grid-template-columns: 70px minmax(0, 1fr);
        padding: 20px;
      }

      .user-avatar-large {
        width: 66px;
        height: 66px;
        border-radius: 18px;
      }

      .user-edit-button {
        grid-column: 1 / -1;
        width: max-content;
      }

      .user-hero-stats {
        gap: 14px;
      }

      .user-list > div {
        grid-template-columns: 52px minmax(0, 1fr);
      }

      .user-list time {
        display: none;
      }
    }

    @media (max-width: 820px) {
      .board-card {
        scroll-padding-inline: 18px;
        overscroll-behavior-inline: contain;
      }

      .article-hero {
        grid-template-columns: 1fr;
        min-height: 0;
        gap: 24px;
        padding: 30px;
      }

      .article-cover {
        min-height: 230px;
        transform: none;
      }

      .article-cover img {
        min-height: 230px;
        max-height: 420px;
      }

      .article-layout {
        grid-template-columns: 1fr;
      }

      .article-toc {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .article-toc > :not(a) {
        grid-column: 1 / -1;
      }

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

      .site-footer {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
      }
    }

    @media (max-width: 540px) {
      .article-view {
        padding-top: 8px;
      }

      .article-hero {
        padding: 22px;
        border-radius: 17px;
      }

      .article-heading h1 {
        font-size: clamp(27px, 10vw, 38px);
      }

      .article-heading > p {
        margin-top: 13px;
        font-size: 13px;
      }

      .article-meta {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 18px;
      }

      .article-cover,
      .article-cover img {
        min-height: 180px;
      }

      .article-main {
        padding: 21px;
        border-radius: 16px;
      }

      .article-content {
        font-size: 14px;
      }

      .markdown iframe {
        min-height: 220px;
      }

      .article-footer {
        align-items: flex-start;
        flex-direction: column;
        margin-top: 32px;
      }

      .article-toc {
        grid-template-columns: 1fr;
      }

      .article-toc > :not(a) {
        grid-column: auto;
      }

      .neighbor-log {
        grid-template-columns: 1fr;
      }

      .neighbor-card.next {
        text-align: left;
      }

      .comments-section,
      .comment-form-card {
        padding: 18px;
        border-radius: 16px;
      }

      .comment-form-grid {
        grid-template-columns: 1fr;
      }

      .comment-item {
        grid-template-columns: 32px minmax(0, 1fr);
        gap: 10px;
        padding: 13px;
      }

      .comment-item > img {
        width: 32px;
        height: 32px;
        border-radius: 9px;
      }

      .comment-item.is-child {
        margin-left: 12px;
      }

      .comment-item header {
        align-items: flex-start;
        flex-direction: column;
        gap: 3px;
      }

      .comment-form-actions {
        justify-content: stretch;
      }

      .comment-form-actions button {
        flex: 1;
      }

      .release-strip,
      .emstudio-widget-sidebar {
        grid-template-columns: 1fr;
      }

      .site-footer {
        align-items: flex-start;
        flex-direction: column;
      }

      .error-screen {
        padding: 10px;
      }

      .error-card {
        padding: 34px 20px;
        border-radius: 18px;
      }

      .error-search {
        grid-template-columns: 1fr;
      }

      .error-search button {
        min-height: 38px;
      }
    }

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

      .tag-marquee {
        min-height: 0;
        overflow: visible;
        contain: none;
      }

      .tag-marquee::before,
      .tag-marquee::after,
      .tag-marquee-group.is-clone {
        display: none;
      }

      .tag-marquee-row {
        width: 100%;
        animation: none !important;
        transform: none !important;
      }

      .tag-marquee-group {
        width: 100%;
        min-width: 0;
        justify-content: flex-start;
        flex-wrap: wrap;
        padding-right: 0;
      }
    }

/* EmlogStudio 1.2 integration: readable scale, fixed home viewport and telemetry. */
:root {
  --accent-rgb: 24, 226, 118;
  --font-xs: 12px;
  --font-sm: 13px;
  --font-md: 15px;
}

.avatar > img,
.profile-avatar-image {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.profile-name { font-size: 13px; }
.profile-role { color: #89968f; font-size: 11px; }
.detail-description,
.detail-row { font-size: 13px; }
.detail-row dt { color: #a5b1aa; }
.detail-row dd { color: #e2eae6; }
.site-footer { color: #7f8d85; font-size: 11px; }

.recommendation-card {
  padding: 14px;
  background:
    linear-gradient(135deg, rgba(var(--accent-rgb), .075), transparent 42%),
    linear-gradient(165deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .018));
  border-color: rgba(var(--accent-rgb), .16);
}

.recommendation-header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.recommendation-header h4 { margin: 0; }
.recommendation-header > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #9aaba2;
  font-size: 11px;
}

.recommendation-header > span i {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(var(--accent-rgb), .5);
}

.recommendation-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 6px;
  margin: 11px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}

.recommendation-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-height: 34px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  color: #aebbb4;
  background: color-mix(in srgb, var(--recommend-color, var(--green)) 7%, rgba(8, 12, 10, .78));
  border: 1px solid color-mix(in srgb, var(--recommend-color, var(--green)) 20%, transparent);
  border-radius: 9px;
}

.recommendation-list li .icon {
  width: 12px;
  color: var(--recommend-color, var(--green));
}

.recommendation-list a {
  overflow: hidden;
  color: #cbd7d0;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recommendation-list li:hover {
  background: color-mix(in srgb, var(--recommend-color, var(--green)) 13%, rgba(8, 12, 10, .82));
  border-color: color-mix(in srgb, var(--recommend-color, var(--green)) 38%, transparent);
}

.recommendation-list li:hover a { color: #f2f8f5; }
.recommendation-dot {
  width: 7px;
  height: 7px;
  background: var(--recommend-color, var(--green));
  border-radius: 50%;
  box-shadow: 0 0 9px color-mix(in srgb, var(--recommend-color, var(--green)) 52%, transparent);
}

.recommendation-empty { grid-template-columns: 1fr !important; }

.footer-monitor {
  margin-top: 8px;
  padding: 11px 12px;
  border-radius: 16px;
}

.footer-monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.footer-monitor-header h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
}

.footer-monitor-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #91a098;
  font-size: 10px;
}

.footer-monitor-live i {
  width: 6px;
  height: 6px;
  background: var(--green);
  border-radius: 50%;
  box-shadow: 0 0 9px rgba(var(--accent-rgb), .55);
}

.footer-monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 6px;
}

.footer-monitor-item {
  position: relative;
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  min-height: 70px;
  align-content: center;
  gap: 1px 7px;
  padding: 8px;
  color: #9fada5;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(255, 255, 255, .065);
  border-radius: 11px;
}

.footer-monitor-item > .icon {
  grid-row: 1 / span 3;
  width: 16px;
  margin: 3px auto 0;
  color: var(--green);
}

.footer-monitor-item > span { font-size: 10px; }
.footer-monitor-item strong {
  color: #edf5f1;
  font-family: var(--font-display);
  font-size: 15px;
  font-style: normal;
  font-weight: 600;
}
.footer-monitor-item strong small,
.footer-monitor-item strong em {
  color: #819087;
  font-family: var(--font-body);
  font-size: 9px;
  font-style: normal;
}
.footer-monitor-item p {
  margin: 1px 0 0;
  color: #6f7c75;
  font-size: 9px;
  line-height: 1.35;
}
.footer-monitor-link:hover {
  color: #dff9eb;
  background: rgba(var(--accent-rgb), .055);
  border-color: rgba(var(--accent-rgb), .2);
}

.footer-monitor-link .footer-monitor-arrow {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #84928a;
  border-radius: 6px;
  transition: color .18s ease, transform .18s ease, background .18s ease;
}

.footer-monitor-link .footer-monitor-arrow .icon {
  width: 14px;
  height: 14px;
}

.footer-monitor-link:hover .footer-monitor-arrow,
.footer-monitor-link:focus-visible .footer-monitor-arrow {
  color: #e6fff1;
  background: rgba(var(--accent-rgb), .12);
  transform: translateX(2px);
}

.site-footer-copy,
.footer-records {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 16px;
}
.workspace-footer-stack {
  min-width: 0;
}
.footer-record {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.footer-record img {
  display: block;
  flex: 0 0 auto;
  object-fit: contain;
}
.footer-record-icp img { width: 16px; height: 16px; }
.footer-record-police img { width: 20px; height: 20px; }

@media (min-width: 821px) {
  body.emstudio-view-home {
    height: 100vh;
    min-height: 0;
    overflow: hidden;
  }

  .home-viewport-shell {
    height: calc(100vh - 28px);
    min-height: 0;
  }

  .home-viewport-shell > .detail-panel {
    height: 100%;
    min-height: 0;
  }

  .home-workspace-frame {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto auto auto;
    align-content: start;
    padding-right: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    /* 始终预留滚动条槽，分类展开时不会压缩中间区域与顶部统计卡。 */
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    scrollbar-color: rgba(var(--accent-rgb), .28) transparent;
    scrollbar-width: thin;
  }

  .home-route-view.active {
    display: grid;
    min-height: auto;
    align-content: start;
    overflow: visible;
  }

  .home-workspace-frame::-webkit-scrollbar { width: 5px; }
  .home-workspace-frame::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), .24);
    border-radius: 99px;
  }

  @supports not (scrollbar-gutter: stable) {
    .home-workspace-frame { overflow-y: scroll; }
  }

  .home-middle-region {
    height: auto;
    min-height: 473px;
    max-height: none;
  }

  .home-middle-region.board-card {
    overflow: hidden;
  }

  /* “最近发布”区域移除后，将释放的高度交还给文章浏览并保持卡组居中。 */
  .home-middle-region .file-card {
    top: calc(50% - 127px);
  }

  .home-middle-region .document-stage::before {
    bottom: calc(50% - 137px);
  }

  [data-category-list-scroll] {
    height: auto;
    min-height: 0;
    padding-right: 5px;
    overflow: visible;
  }

  .category-post-scroll {
    max-height: none;
    overflow: visible;
  }

  .home-workspace-frame > .workspace-footer-stack {
    min-height: 0;
    margin-top: 5px;
  }

  .home-workspace-frame > .workspace-footer-stack .footer-monitor {
    margin-top: 0;
  }

  .home-workspace-frame > .workspace-footer-stack .site-footer {
    min-height: 46px;
    padding-block: 8px 4px;
  }
}

/* 分类详情卡的内容在固定高度内按四行排布。标题最多两行，数值区自动吸收余量，
   这样自定义分类名、字号和环扇卡尺寸变化都不会挤到底部链接。 */
.home-middle-region .progress-document {
  display: grid;
  min-height: 205px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(28px, auto) auto minmax(0, 1fr) auto;
  row-gap: 5px;
}

.home-middle-region .progress-document::after { z-index: 0; }

.home-middle-region .progress-document > * {
  position: relative;
  z-index: 1;
  min-width: 0;
}

.home-middle-region .progress-top {
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}

.home-middle-region .progress-top > span {
  min-width: 0;
  max-height: 2.5em;
  overflow: hidden;
  display: -webkit-box;
  line-height: 1.25;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  word-break: break-word;
}

.home-middle-region .progress-close {
  flex: 0 0 28px;
  margin: -2px -2px 0 0;
}

.home-middle-region .progress-period { margin-top: 0; }

.home-middle-region .progress-value {
  align-self: end;
  margin-top: 0;
}

.home-middle-region .progress-link {
  position: relative;
  left: auto;
  bottom: auto;
  align-self: end;
}

@media (max-width: 820px) {
  body.emstudio-view-home {
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .home-viewport-shell,
  .home-workspace-frame { height: auto; min-height: 0; }
  .home-workspace-frame { display: flex; overflow: visible; }
  .home-route-view.active { overflow: visible; }
  .home-middle-region { height: auto; max-height: none; }
  [data-category-list-scroll] { height: auto; overflow: visible; }
  .category-post-scroll { max-height: none; overflow: visible; }
  .footer-monitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 540px) {
  .footer-monitor { padding: 13px; }
  .footer-monitor-grid { grid-template-columns: 1fr; }
  .footer-monitor-item { min-height: 80px; }
  .footer-records { align-items: flex-start; flex-direction: column; }
}

/* 首页分类区域：展开内容自然撑高，只让整个首页内容视图负责纵向滚动。 */
.category-list-panel,
.category-post-scroll {
  height: auto;
  max-height: none;
  overflow: visible;
}

.category-deck-panel {
  min-height: 473px;
}

.deck-settings-trigger {
  position: absolute;
  z-index: 65;
  top: 14px;
  right: 14px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #aebbb5;
  background: rgba(6, 10, 8, .88);
  border: 1px solid rgba(229, 247, 239, .14);
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .24);
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.deck-settings-trigger:hover,
.deck-settings-trigger:focus-visible,
.deck-settings-trigger[aria-expanded="true"] {
  color: #effff6;
  background: rgba(var(--accent-rgb), .14);
  border-color: rgba(var(--accent-rgb), .48);
  outline: none;
}

.deck-settings-trigger .icon {
  width: 17px;
  height: 17px;
}

.deck-settings-backdrop {
  position: fixed;
  z-index: 109;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  background: rgba(0, 3, 2, .58);
  transition: opacity .2s ease, visibility 0s linear .2s;
}

.deck-settings-backdrop.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.deck-settings-drawer {
  position: fixed;
  z-index: 110;
  top: 14px;
  right: 14px;
  bottom: 14px;
  display: flex;
  width: min(356px, calc(100vw - 28px));
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  color: #e9f0ec;
  background:
    linear-gradient(145deg, rgba(var(--accent-rgb), .06), transparent 38%),
    #0b100e;
  border-color: rgba(222, 241, 232, .16);
  border-radius: 18px;
  box-shadow: -18px 0 48px rgba(0, 0, 0, .48);
  visibility: hidden;
  transform: translateX(calc(100% + 30px));
  transition: transform .24s cubic-bezier(.2, .76, .24, 1), visibility 0s linear .24s;
}

.deck-settings-drawer.is-open {
  visibility: visible;
  transform: translateX(0);
  transition-delay: 0s;
}

.deck-settings-header {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(222, 241, 232, .1);
}

.deck-settings-header span {
  display: block;
  margin-bottom: 4px;
  color: var(--green-bright);
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .16em;
}

.deck-settings-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -.02em;
}

.deck-settings-close {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #9da9a3;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  cursor: pointer;
}

.deck-settings-close:hover,
.deck-settings-close:focus-visible {
  color: #f4faf7;
  border-color: rgba(var(--accent-rgb), .38);
  outline: none;
}

.deck-settings-close .icon {
  width: 16px;
  height: 16px;
}

.deck-settings-form {
  display: flex;
  min-height: 0;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 20px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--accent-rgb), .26) transparent;
}

.deck-setting-group {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  padding: 14px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(225, 243, 234, .09);
  border-radius: 13px;
}

fieldset.deck-setting-group {
  border: 1px solid rgba(225, 243, 234, .09);
}

.deck-setting-group legend,
.deck-setting-title > span {
  padding: 0;
  color: #e2ebe6;
  font-size: 13px;
  font-weight: 650;
}

.deck-setting-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.deck-setting-title small,
.deck-setting-group > p {
  margin: 0;
  color: #77827d;
  font-size: 11px;
  line-height: 1.6;
}

.deck-layout-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.deck-layout-options label {
  position: relative;
  cursor: pointer;
}

.deck-layout-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.deck-layout-options label > span {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 4px;
  padding: 11px;
  color: #98a49e;
  background: rgba(2, 5, 4, .46);
  border: 1px solid rgba(225, 243, 234, .08);
  border-radius: 10px;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.deck-layout-options b {
  font-size: 13px;
  font-weight: 650;
}

.deck-layout-options small {
  font-size: 10px;
  line-height: 1.45;
}

.deck-layout-options input:checked + span {
  color: #eafff3;
  background: rgba(var(--accent-rgb), .09);
  border-color: rgba(var(--accent-rgb), .4);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .08);
}

.deck-layout-options input:focus-visible + span {
  outline: 2px solid rgba(var(--accent-rgb), .56);
  outline-offset: 2px;
}

.deck-color-field,
.deck-range-field {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 68px;
  min-height: 38px;
  align-items: center;
  gap: 9px;
  color: #aeb9b3;
  font-size: 12px;
}

.deck-color-field input[type="color"] {
  width: 100%;
  height: 34px;
  padding: 3px;
  background: #080c0a;
  border: 1px solid rgba(225, 243, 234, .12);
  border-radius: 8px;
  cursor: pointer;
}

.deck-color-field output,
.deck-range-field output {
  color: #d4ddd8;
  font-family: var(--font-display);
  font-size: 11px;
  text-align: right;
}

/* 顶部统计卡四通道色板：紧凑展示，但每一色都可读、可单独编辑。 */
.deck-stat-palette {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: rgba(3, 8, 6, .34);
  border: 1px solid rgba(225, 243, 234, .075);
  border-radius: 10px;
}

.deck-stat-palette > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #dfe9e3;
  font-size: 12px;
  font-weight: 650;
}

.deck-stat-palette > header small {
  color: #77827d;
  font-size: 10px;
  font-weight: 400;
}

.deck-fusion-swatch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.deck-fusion-swatch {
  display: grid;
  min-width: 0;
  gap: 4px;
  color: #9eaaa4;
  font-size: 10px;
}

.deck-fusion-swatch > span {
  padding-left: 1px;
}

.deck-fusion-swatch input[type="color"] {
  width: 100%;
  min-width: 0;
  height: 31px;
  padding: 2px;
  background: #080c0a;
  border: 1px solid rgba(225, 243, 234, .13);
  border-radius: 7px;
  cursor: pointer;
}

.deck-fusion-swatch input[type="color"]:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), .62);
  outline-offset: 2px;
}

.deck-fusion-swatch output {
  overflow: hidden;
  color: #ccd8d1;
  font-family: var(--font-display);
  font-size: 9px;
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-range-field input[type="range"] {
  width: 100%;
  accent-color: var(--green);
}

.deck-settings-status {
  min-height: 20px;
  color: #8f9a94;
  font-size: 11px;
  line-height: 1.55;
}

.deck-settings-status.is-error {
  color: #ff8178;
}

.deck-settings-status.is-success {
  color: var(--green-bright);
}

.deck-settings-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-top: auto;
}

.deck-settings-actions button {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 14px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.deck-settings-reset {
  color: #aab5af;
  background: transparent;
  border: 1px solid rgba(225, 243, 234, .12);
}

.deck-settings-save {
  color: #02170d;
  background: var(--green-bright);
  border: 1px solid rgba(var(--accent-rgb), .7);
}

.deck-settings-save .icon {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.deck-settings-actions button:disabled {
  opacity: .56;
  cursor: wait;
}

body.deck-settings-open {
  overflow: hidden !important;
}

/* “普通”模式完全取消倾斜和层叠，方便在卡片较多时快速浏览。 */
.deck-layout-normal .document-stage {
  min-height: 473px;
  padding: 62px 18px 20px;
}

.deck-layout-normal .document-stage::before {
  display: none;
}

.deck-layout-normal .doc-deck {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 11px;
  align-content: start;
  pointer-events: auto;
}

.home-middle-region.deck-layout-normal .file-card {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  height: 136px;
  opacity: 1;
  transform: none;
  transform-origin: center;
}

.home-middle-region.deck-layout-normal .file-card:hover,
.home-middle-region.deck-layout-normal .file-card:focus-visible {
  transform: translateY(-5px);
}

.home-middle-region.deck-layout-normal .file-card.selected {
  opacity: 0;
  transform: none;
}

.deck-layout-normal .file-card::before {
  top: 20px;
  left: 16px;
  width: 46px;
  height: 43px;
}

.deck-layout-normal .file-meta {
  left: 14px;
  bottom: 42px;
  font-size: 10px;
}

.deck-layout-normal .file-title {
  right: 12px;
  bottom: 14px;
  left: 14px;
  width: auto;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.deck-layout-normal .progress-document {
  --deck-tilt: 0deg;
}

@media (max-width: 820px) {
  .home-middle-region.board-card {
    grid-template-columns: minmax(0, 1fr);
    overflow: visible;
  }

  .category-list-panel {
    padding: 10px;
  }

  .category-deck-panel,
  .deck-layout-normal .document-stage {
    min-height: 360px;
  }

  .deck-layout-normal .document-stage {
    padding-top: 62px;
  }

  .home-middle-region .file-card:nth-child(1) { --x: -36px; }
  .home-middle-region .file-card:nth-child(2) { --x: 0px; }
  .home-middle-region .file-card:nth-child(3) { --x: 36px; }
  .home-middle-region .file-card:nth-child(4) { --x: 72px; }
  .home-middle-region .file-card:nth-child(5) { --x: 108px; }
  .home-middle-region .file-card:nth-child(6) { --x: 144px; }
  .home-middle-region .file-card:nth-child(7) { --x: 180px; }
  .home-middle-region .file-card:nth-child(8) { --x: 216px; }

  .deck-settings-drawer {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: min(356px, calc(100vw - 20px));
  }
}

@media (max-width: 540px) {
  .category-deck-panel {
    min-height: 330px;
  }

  .home-middle-region:not(.deck-layout-normal) .file-card {
    left: 16%;
    width: 82px;
    height: 214px;
  }

  .home-middle-region .file-card:nth-child(1) { --x: -28px; }
  .home-middle-region .file-card:nth-child(2) { --x: 0px; }
  .home-middle-region .file-card:nth-child(3) { --x: 28px; }
  .home-middle-region .file-card:nth-child(4) { --x: 56px; }
  .home-middle-region .file-card:nth-child(5) { --x: 84px; }
  .home-middle-region .file-card:nth-child(6) { --x: 112px; }
  .home-middle-region .file-card:nth-child(7) { --x: 140px; }
  .home-middle-region .file-card:nth-child(8) { --x: 168px; }

  .deck-layout-normal .doc-deck {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .deck-color-field,
  .deck-range-field {
    grid-template-columns: 74px minmax(0, 1fr) 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .deck-settings-backdrop,
  .deck-settings-drawer,
  .deck-layout-normal .file-card {
    transition: none;
  }
}

/* 首页统计卡：静态色场只作为 WebGL 不可用时的回退，动态材质由 stats-fusion.js 绘制。 */
.stat-fusion-canvas,
.stat-fusion-field {
  display: none;
}

.stats-style-fusion .stat-card {
  isolation: isolate;
  border-color: rgba(228, 246, 238, .14);
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .045), transparent 44%),
    #0a100d;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .09),
    0 10px 24px rgba(0, 0, 0, .2);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.stats-style-fusion .stat-fusion-canvas {
  position: absolute;
  z-index: 0;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease;
}

.stats-style-fusion .stat-card.is-fusion-webgl-ready .stat-fusion-canvas {
  opacity: .88;
}

.stats-style-fusion .stat-card:nth-child(1) {
  --stat-fluid-a: 24, 226, 118;
  --stat-fluid-b: 20, 184, 166;
  --stat-fluid-c: 240, 181, 95;
  --stat-fluid-d: 56, 216, 170;
}

.stats-style-fusion .stat-card:nth-child(2) {
  --stat-fluid-a: 240, 181, 95;
  --stat-fluid-b: 224, 120, 92;
  --stat-fluid-c: 108, 166, 111;
  --stat-fluid-d: 189, 188, 156;
}

.stats-style-fusion .stat-card:nth-child(3) {
  --stat-fluid-a: 56, 189, 248;
  --stat-fluid-b: 24, 226, 184;
  --stat-fluid-c: 163, 230, 53;
  --stat-fluid-d: 75, 193, 251;
}

.stats-style-fusion .stat-card:nth-child(4) {
  --stat-fluid-a: 251, 113, 133;
  --stat-fluid-b: 239, 138, 76;
  --stat-fluid-c: 240, 195, 95;
  --stat-fluid-d: 196, 146, 179;
}

.stats-style-fusion .stat-fusion-field {
  position: absolute;
  z-index: 0;
  inset: -18% -8% -28% 36%;
  display: block;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 72% 88% at 82% 13%, rgba(var(--stat-fluid-a), .72) 0, rgba(var(--stat-fluid-a), .3) 34%, transparent 69%),
    radial-gradient(ellipse 78% 96% at 48% 92%, rgba(var(--stat-fluid-b), .58) 0, rgba(var(--stat-fluid-b), .22) 37%, transparent 72%),
    radial-gradient(ellipse 58% 70% at 98% 88%, rgba(var(--stat-fluid-c), .56) 0, rgba(var(--stat-fluid-c), .18) 39%, transparent 70%),
    radial-gradient(ellipse 64% 72% at 18% 18%, rgba(var(--stat-fluid-d), .48) 0, rgba(var(--stat-fluid-d), .14) 40%, transparent 74%),
    linear-gradient(125deg, transparent 8%, rgba(var(--stat-fluid-a), .12) 42%, rgba(var(--stat-fluid-b), .16) 67%, rgba(var(--stat-fluid-d), .13) 82%, transparent 96%);
  border-radius: 48% 34% 45% 38%;
  opacity: .72;
  transform: rotate(-7deg);
  transition: opacity .22s ease, transform .24s ease;
}

.stats-style-fusion .stat-card.is-fusion-webgl-ready .stat-fusion-field {
  opacity: 0;
}

.stats-style-fusion .stat-fusion-field::before,
.stats-style-fusion .stat-fusion-field::after {
  position: absolute;
  content: "";
  pointer-events: none;
  border-radius: 50%;
}

.stats-style-fusion .stat-fusion-field::before {
  inset: 16% -14% 9% 8%;
  border: 1px solid rgba(245, 255, 250, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transform: rotate(12deg);
}

.stats-style-fusion .stat-fusion-field::after {
  top: 11%;
  right: 13%;
  width: 38%;
  height: 22%;
  background: radial-gradient(ellipse, rgba(255, 255, 255, .26), transparent 72%);
  transform: rotate(-11deg);
}

.stats-style-fusion .stat-card::before {
  z-index: 1;
  right: -18px;
  bottom: -51px;
  width: 154px;
  border-top-color: rgba(246, 255, 251, .3);
  box-shadow: 0 -5px 14px rgba(var(--stat-fluid-a), .08);
}

.stats-style-fusion .stat-card::after {
  z-index: 1;
  top: -18px;
  right: -4px;
  width: 82px;
  height: 82px;
  background: radial-gradient(circle, rgba(255, 255, 255, .11), transparent 68%);
}

.stats-style-fusion .stat-label,
.stats-style-fusion .stat-number,
.stats-style-fusion .stat-trend {
  position: relative;
  z-index: 2;
}

.stats-style-fusion .stat-icon {
  z-index: 3;
  background: rgba(10, 17, 14, .52);
  border-color: rgba(236, 252, 244, .18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.stats-style-fusion .stat-number small,
.stats-style-fusion .stat-trend {
  color: #929e98;
}

@media (hover: hover) {
  .stats-style-fusion .stat-card:hover {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .11),
      0 14px 28px rgba(0, 0, 0, .24);
    transform: translateY(-2px);
  }

  .stats-style-fusion .stat-card:not(.is-fusion-webgl-ready):hover .stat-fusion-field {
    opacity: .84;
    transform: translateX(-2px) rotate(-5deg);
  }
}

/* 正反面只在立体环启用；普通列表继续沿用原来的文件卡结构。 */
.file-card-face {
  display: block;
}

.file-card-back {
  display: none;
}

/* 首页分类卡：完整的 3D 圆环。悬停只上浮与变色，不改变卡片朝向。 */
.home-middle-region.deck-layout-orbit .document-stage {
  --deck-tilt: 0deg;
  perspective: 1040px;
  perspective-origin: 50% 44%;
}

.home-middle-region.deck-layout-orbit .document-stage::before {
  left: 7%;
  right: 7%;
  bottom: 44px;
  height: 90px;
  background: radial-gradient(ellipse, rgba(228, 246, 237, .16), rgba(var(--accent-rgb), .055) 31%, transparent 71%);
  transform: rotateX(64deg);
}

.home-middle-region.deck-layout-orbit .doc-deck {
  z-index: 1;
  animation: emstudio-category-orbit-spin 32s linear infinite;
  transform-style: preserve-3d;
  transform-origin: 50% 54%;
  will-change: transform;
}

.home-middle-region.deck-layout-orbit .doc-deck::after {
  display: none;
}

.home-middle-region.deck-layout-orbit .category-deck-panel::after {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  width: min(76%, 430px);
  height: 160px;
  content: "";
  pointer-events: none;
  border: 1px solid rgba(231, 247, 239, .11);
  border-radius: 50%;
  box-shadow: inset 0 0 22px rgba(var(--accent-rgb), .035);
  transform:
    translate(
      calc(-50% + var(--deck-orbit-offset-x, 0px)),
      calc(-47% + var(--deck-orbit-offset-y, 0px))
    )
    rotateX(67deg);
}

@keyframes emstudio-category-orbit-spin {
  from {
    transform:
      translate3d(var(--deck-orbit-offset-x, 0px), var(--deck-orbit-offset-y, 0px), 0)
      rotateX(calc(0deg - var(--deck-view-angle, 18deg)))
      rotateY(0deg);
  }
  to {
    transform:
      translate3d(var(--deck-orbit-offset-x, 0px), var(--deck-orbit-offset-y, 0px), 0)
      rotateX(calc(0deg - var(--deck-view-angle, 18deg)))
      rotateY(360deg);
  }
}

.home-middle-region.deck-layout-orbit.deck-orbit-paused .doc-deck,
.home-middle-region.deck-layout-orbit.deck-orbit-pointer-paused .doc-deck,
.home-middle-region.deck-layout-orbit.deck-orbit-focus-paused .doc-deck {
  animation-play-state: paused;
}

.home-middle-region.deck-layout-orbit .file-card {
  --deck-angle: 0deg;
  --deck-lift: 0px;
  z-index: auto;
  top: 50%;
  left: 50%;
  width: var(--deck-orbit-card-width, 102px);
  height: var(--deck-orbit-card-height, 184px);
  opacity: 1;
  background: transparent;
  border: 0;
  box-shadow: none;
  backface-visibility: visible;
  transform:
    translate(-50%, -50%)
    rotateY(var(--deck-angle))
    translateZ(var(--deck-effective-radius, var(--deck-radius, 190px)))
    translateY(var(--deck-lift));
  transform-origin: 50% 50%;
  transform-style: preserve-3d;
  transition:
    opacity .18s ease,
    color .18s ease,
    transform .22s cubic-bezier(.2, .78, .24, 1);
}

.home-middle-region.deck-layout-orbit .file-card::before,
.home-middle-region.deck-layout-orbit .file-card::after {
  display: none;
}

.home-middle-region.deck-layout-orbit .file-card-face {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border: 1px solid rgba(239, 255, 247, .32);
  border-radius: 10px;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  transition:
    opacity .18s ease,
    color .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    box-shadow .2s ease;
}

.home-middle-region.deck-layout-orbit .file-card-front {
  background:
    linear-gradient(106deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .035) 58%, transparent 76%),
    var(--deck-card-color, #4a5550);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .24),
    8px 12px 20px rgba(0, 0, 0, .34);
  transform: translateZ(.8px);
}

.home-middle-region.deck-layout-orbit .file-card-front::before {
  position: absolute;
  top: 27px;
  left: 15px;
  width: 51px;
  height: 49px;
  content: "";
  opacity: .26;
  background:
    repeating-linear-gradient(0deg, rgba(9, 15, 12, .36) 0 5px, transparent 5px 12px),
    repeating-linear-gradient(90deg, rgba(9, 15, 12, .3) 0 5px, transparent 5px 12px);
  border: 1px solid rgba(10, 16, 13, .12);
  border-radius: 4px;
  transition: opacity .18s ease, background-color .18s ease, border-color .18s ease;
}

.home-middle-region.deck-layout-orbit .file-card-front::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(103deg, transparent 26%, rgba(255, 255, 255, .3) 45%, transparent 61%),
    linear-gradient(180deg, rgba(255, 255, 255, .1), transparent 46%, rgba(0, 0, 0, .13));
  border-radius: inherit;
  opacity: .58;
  pointer-events: none;
}

.home-middle-region.deck-layout-orbit .file-card-back {
  opacity: .76;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .3)),
    linear-gradient(116deg, rgba(255, 255, 255, .08), transparent 56%),
    var(--deck-card-color, #4a5550);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .14),
    5px 9px 17px rgba(0, 0, 0, .24);
  transform: rotateY(180deg) translateZ(.8px) scale(.96);
}

.home-middle-region.deck-layout-orbit .file-card:hover,
.home-middle-region.deck-layout-orbit .file-card:focus-visible {
  --deck-lift: -10px;
  color: #eafff3;
  background: transparent;
  border-color: rgba(var(--accent-rgb), .82);
  box-shadow: none;
  transform:
    translate(-50%, -50%)
    rotateY(var(--deck-angle))
    translateZ(var(--deck-effective-radius, var(--deck-radius, 190px)))
    translateY(var(--deck-lift));
}

.home-middle-region.deck-layout-orbit .file-card:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), .84);
  outline-offset: 4px;
}

.home-middle-region.deck-layout-orbit .file-card:hover .file-card-front,
.home-middle-region.deck-layout-orbit .file-card:focus-visible .file-card-front {
  background:
    linear-gradient(106deg, rgba(255, 255, 255, .16), rgba(var(--accent-rgb), .12) 55%, transparent 78%),
    var(--deck-card-hover, #08743d);
  border-color: rgba(var(--accent-rgb), .82);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .3),
    9px 14px 22px rgba(0, 0, 0, .38);
}

.home-middle-region.deck-layout-orbit .file-card:hover .file-card-back,
.home-middle-region.deck-layout-orbit .file-card:focus-visible .file-card-back {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .18), rgba(0, 0, 0, .34)),
    var(--deck-card-hover, #08743d);
  border-color: rgba(var(--accent-rgb), .48);
}

.home-middle-region.deck-layout-orbit .file-card:hover .file-card-front::before,
.home-middle-region.deck-layout-orbit .file-card:focus-visible .file-card-front::before {
  opacity: .43;
  background:
    repeating-linear-gradient(0deg, rgba(230, 255, 242, .58) 0 5px, transparent 5px 12px),
    repeating-linear-gradient(90deg, rgba(230, 255, 242, .52) 0 5px, transparent 5px 12px);
  border-color: rgba(231, 255, 243, .2);
}

.home-middle-region.deck-layout-orbit .file-card:hover .file-title,
.home-middle-region.deck-layout-orbit .file-card:focus-visible .file-title {
  color: #f1fff7;
}

.home-middle-region.deck-layout-orbit .file-card.selected {
  --deck-lift: 0px;
  opacity: 0;
  transform:
    translate(-50%, -50%)
    rotateY(var(--deck-angle))
    translateZ(var(--deck-effective-radius, var(--deck-radius, 190px)))
    translateY(var(--deck-lift));
}

.home-middle-region.deck-layout-orbit .file-meta {
  left: 11px;
  bottom: 48px;
  gap: 5px;
  font-size: 10px;
}

.home-middle-region.deck-layout-orbit .file-title {
  right: 9px;
  bottom: 15px;
  left: 11px;
  width: auto;
  overflow: visible;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
  word-break: break-all;
}

/* 无内联角度的演示/旧缓存页面仍能形成完整的十卡环。 */
.home-middle-region.deck-layout-orbit .file-card:nth-child(1) { --deck-angle: 0deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(2) { --deck-angle: 36deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(3) { --deck-angle: 72deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(4) { --deck-angle: 108deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(5) { --deck-angle: 144deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(6) { --deck-angle: 180deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(7) { --deck-angle: 216deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(8) { --deck-angle: 252deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(9) { --deck-angle: 288deg; }
.home-middle-region.deck-layout-orbit .file-card:nth-child(10) { --deck-angle: 324deg; }

@media (max-width: 1280px) {
  .home-middle-region.deck-layout-orbit .file-card:nth-child(9),
  .home-middle-region.deck-layout-orbit .file-card:nth-child(10) {
    display: block;
  }
}

@media (max-width: 820px) {
  .home-middle-region.deck-layout-orbit .document-stage {
    --deck-effective-radius: 145px;
    perspective: 820px;
    perspective-origin: 50% 46%;
  }

  .home-middle-region.deck-layout-orbit .file-card {
    width: min(var(--deck-orbit-card-width, 102px), 88px);
    height: min(var(--deck-orbit-card-height, 184px), 166px);
  }
}

@media (max-width: 540px) {
  .home-middle-region:not(.deck-layout-normal).deck-layout-orbit .file-card {
    left: 50%;
    width: min(var(--deck-orbit-card-width, 102px), 76px);
    height: min(var(--deck-orbit-card-height, 184px), 150px);
  }

  .home-middle-region.deck-layout-orbit .document-stage {
    --deck-effective-radius: 116px;
    perspective: 720px;
  }

  .home-middle-region.deck-layout-orbit .file-card-front::before {
    top: 22px;
    left: 11px;
    width: 43px;
    height: 41px;
  }

  .home-middle-region.deck-layout-orbit .file-meta {
    left: 8px;
    bottom: 42px;
    font-size: 9px;
  }

  .home-middle-region.deck-layout-orbit .file-title {
    right: 6px;
    bottom: 12px;
    left: 8px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce), (update: slow) {
  .stats-style-fusion .stat-card,
  .stats-style-fusion .stat-fusion-canvas,
  .stats-style-fusion .stat-fusion-field,
  .home-middle-region.deck-layout-orbit .file-card-face,
  .home-middle-region.deck-layout-orbit .file-card {
    transition: none;
  }

  .home-middle-region.deck-layout-orbit .doc-deck {
    animation: none;
    will-change: auto;
    transform:
      translate3d(var(--deck-orbit-offset-x, 0px), var(--deck-orbit-offset-y, 0px), 0)
      rotateX(calc(0deg - var(--deck-view-angle, 18deg)))
      rotateY(0deg);
  }
}

/* EmlogStudio 1.6.9: personal dashboard -------------------------------------------------- */
.emstudio-view-profile .profile-dashboard {
  --profile-surface: rgba(10, 17, 13, .92);
  --profile-surface-soft: rgba(225, 255, 238, .035);
  --profile-line: rgba(221, 248, 232, .11);
  --profile-muted: #91a097;
  --profile-subtle: #627068;
}

.emstudio-view-profile .profile-dashboard-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  min-height: 210px;
  align-items: center;
  gap: 28px;
  padding: 28px 30px;
  overflow: hidden;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .055), transparent 34%),
    radial-gradient(ellipse 58% 120% at 88% 104%, rgba(var(--accent-rgb), .16), transparent 68%),
    linear-gradient(145deg, rgba(13, 23, 17, .98), rgba(7, 12, 9, .98));
  border-color: rgba(var(--accent-rgb), .18);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .09), 0 18px 34px rgba(0, 0, 0, .22);
}

.emstudio-view-profile .profile-dashboard-hero::before {
  position: absolute;
  z-index: -1;
  top: -92px;
  right: 19%;
  width: 260px;
  height: 260px;
  content: "";
  background: radial-gradient(circle, rgba(var(--accent-rgb), .13), transparent 67%);
  border-radius: 50%;
  pointer-events: none;
}

.emstudio-view-profile .profile-dashboard-hero .user-cover-lines {
  z-index: -1;
  inset: -32% -15% -42% 42%;
  opacity: .8;
  background:
    repeating-radial-gradient(ellipse at 57% 106%, transparent 0 24px, rgba(190, 255, 219, .105) 25px 26px, transparent 27px 42px),
    linear-gradient(100deg, transparent, rgba(var(--accent-rgb), .09));
  mask-image: linear-gradient(90deg, transparent, rgba(0, 0, 0, .88) 26%, rgba(0, 0, 0, .72));
}

.emstudio-view-profile .profile-hero-glow {
  position: absolute;
  z-index: -1;
  display: block;
  border-radius: 50%;
  pointer-events: none;
}

.emstudio-view-profile .profile-hero-glow-one {
  right: 4%;
  bottom: -132px;
  width: 310px;
  height: 210px;
  background: radial-gradient(ellipse, rgba(var(--accent-rgb), .12), transparent 70%);
}

.emstudio-view-profile .profile-hero-glow-two {
  top: 22px;
  right: 31%;
  width: 9px;
  height: 9px;
  background: var(--green-bright);
  box-shadow: 0 0 0 5px rgba(var(--accent-rgb), .1), 0 0 20px rgba(var(--accent-rgb), .42);
}

.emstudio-view-profile .profile-hero-intro {
  position: relative;
  z-index: 1;
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 18px;
}

.emstudio-view-profile .profile-dashboard-avatar {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  background: linear-gradient(145deg, #6c8677, #122018);
  border-color: rgba(223, 255, 235, .27);
  border-radius: 27px;
  box-shadow: 0 15px 26px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.emstudio-view-profile .profile-dashboard-avatar > img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.emstudio-view-profile .profile-dashboard-avatar > span {
  right: -4px;
  bottom: -4px;
  width: 15px;
  height: 15px;
  background: var(--green-bright);
  border-color: #111b14;
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .18);
}

.emstudio-view-profile .profile-dashboard-identity {
  min-width: 0;
}

.emstudio-view-profile .profile-identity-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.emstudio-view-profile .profile-dashboard-identity h2 {
  overflow: hidden;
  margin: 0;
  color: #f3fbf6;
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  letter-spacing: .015em;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emstudio-view-profile .profile-role-badge {
  display: inline-flex;
  min-height: 25px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 8px;
  color: #bff8d4;
  background: rgba(var(--accent-rgb), .095);
  border: 1px solid rgba(var(--accent-rgb), .21);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.emstudio-view-profile .profile-role-badge .icon {
  width: 13px;
  height: 13px;
  color: var(--green-bright);
}

.emstudio-view-profile .profile-dashboard-identity p {
  max-width: 580px;
}

.emstudio-view-profile .profile-user-handle {
  margin: 8px 0 0;
  color: #a5b4ac;
  font-size: 13px;
  letter-spacing: .025em;
}

.emstudio-view-profile .profile-user-bio {
  display: -webkit-box;
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.emstudio-view-profile .profile-hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(55px, 1fr));
  flex: 0 0 auto;
  gap: 0;
  padding-left: 22px;
  border-left: 1px solid rgba(226, 249, 235, .12);
}

.emstudio-view-profile .profile-hero-stats > div {
  min-width: 64px;
  gap: 5px;
  padding: 0 12px;
  text-align: center;
}

.emstudio-view-profile .profile-hero-stats > div + div {
  border-left: 1px solid rgba(226, 249, 235, .09);
}

.emstudio-view-profile .profile-hero-stats strong {
  color: #f2fbf5;
  font-size: 24px;
  font-weight: 600;
  line-height: 1;
}

.emstudio-view-profile .profile-hero-stats span {
  color: #9aa99f;
  font-size: 12px;
}

.emstudio-view-profile .profile-edit-button {
  min-height: 38px;
  justify-self: end;
  gap: 7px;
  padding: 0 14px;
  color: #e0fae9;
  background: rgba(240, 255, 247, .07);
  border-color: rgba(229, 255, 239, .18);
  font-size: 13px;
  text-decoration: none;
  transition: color .16s ease, background-color .16s ease, border-color .16s ease;
}

.emstudio-view-profile .profile-edit-button .icon {
  width: 15px;
  height: 15px;
  color: var(--green-bright);
}

.emstudio-view-profile .profile-edit-button:hover,
.emstudio-view-profile .profile-edit-button:focus-visible {
  color: #f3fff7;
  background: rgba(var(--accent-rgb), .13);
  border-color: rgba(var(--accent-rgb), .4);
  outline: none;
}

.emstudio-view-profile .profile-dashboard-layout {
  grid-template-columns: 210px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.emstudio-view-profile .profile-dashboard-nav {
  position: sticky;
  /* Match the fixed global sidebar's 14px desktop viewport offset. */
  top: 14px;
  display: grid;
  gap: 5px;
  padding: 13px;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .052), transparent 42%),
    rgba(9, 15, 11, .94);
  border-color: var(--profile-line);
  border-radius: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 26px rgba(0, 0, 0, .17);
}

.emstudio-view-profile .profile-nav-caption {
  margin: 2px 8px 8px;
  color: #6e7d74;
  font-size: 11px;
  letter-spacing: .1em;
}

.emstudio-view-profile .profile-dashboard-nav button {
  width: 100%;
  min-height: 44px;
  justify-content: flex-start;
  gap: 10px;
  padding: 0 10px;
  color: #a1afa6;
  border-color: transparent;
  border-radius: 11px;
  font-size: 13px;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.emstudio-view-profile .profile-dashboard-nav button > .icon:first-child {
  width: 16px;
  height: 16px;
  color: #75837a;
}

.emstudio-view-profile .profile-dashboard-nav .profile-nav-arrow {
  width: 14px;
  height: 14px;
  margin-left: auto;
  color: #536158;
  opacity: .72;
  transition: transform .15s ease, color .15s ease;
}

.emstudio-view-profile .profile-dashboard-nav button:hover,
.emstudio-view-profile .profile-dashboard-nav button:focus-visible {
  color: #e2eee7;
  background: rgba(255, 255, 255, .048);
  border-color: rgba(255, 255, 255, .07);
  outline: none;
}

.emstudio-view-profile .profile-dashboard-nav button.active {
  color: #ecfdf2;
  background:
    linear-gradient(100deg, rgba(var(--accent-rgb), .17), rgba(var(--accent-rgb), .055) 72%, transparent),
    rgba(255, 255, 255, .035);
  border-color: rgba(var(--accent-rgb), .25);
  box-shadow: inset 3px 0 0 var(--green-bright);
}

.emstudio-view-profile .profile-dashboard-nav button.active > .icon:first-child,
.emstudio-view-profile .profile-dashboard-nav button.active .profile-nav-arrow {
  color: var(--green-bright);
}

.emstudio-view-profile .profile-dashboard-nav button.active .profile-nav-arrow {
  transform: translateX(2px);
}

.emstudio-view-profile .profile-dashboard-nav .logout-item {
  min-height: 44px;
  gap: 10px;
  margin-top: 9px;
  padding: 0 10px;
  color: #d58c85;
  border-top-color: rgba(255, 255, 255, .075);
  border-radius: 10px;
  font-size: 13px;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease;
}

.emstudio-view-profile .profile-dashboard-nav .logout-item:hover,
.emstudio-view-profile .profile-dashboard-nav .logout-item:focus-visible {
  color: #ffc8c0;
  background: rgba(255, 111, 97, .075);
  outline: none;
}

.emstudio-view-profile .profile-dashboard-content {
  min-width: 0;
}

.emstudio-view-profile .profile-dashboard-stat-grid {
  gap: 14px;
}

.emstudio-view-profile .profile-dashboard-stat-grid > article {
  position: relative;
  display: block;
  min-height: 125px;
  padding: 18px;
  overflow: hidden;
  background:
    linear-gradient(132deg, rgba(255, 255, 255, .065), transparent 48%),
    rgba(10, 17, 13, .91);
  border-color: var(--profile-line);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 10px 20px rgba(0, 0, 0, .13);
  transition: border-color .16s ease, background-color .16s ease;
}

.emstudio-view-profile .profile-dashboard-stat-grid > article::after {
  position: absolute;
  right: -24px;
  bottom: -38px;
  width: 104px;
  height: 104px;
  content: "";
  opacity: .72;
  background: radial-gradient(circle, rgba(var(--accent-rgb), .12), transparent 67%);
  border-radius: 50%;
  pointer-events: none;
}

.emstudio-view-profile .profile-dashboard-stat-grid > article:nth-child(2)::after {
  opacity: .55;
  background: radial-gradient(circle, rgba(79, 198, 255, .12), transparent 67%);
}

.emstudio-view-profile .profile-dashboard-stat-grid > article:nth-child(3)::after {
  opacity: .58;
  background: radial-gradient(circle, rgba(235, 192, 93, .12), transparent 67%);
}

.emstudio-view-profile .profile-dashboard-stat-grid > article:hover {
  background:
    linear-gradient(132deg, rgba(var(--accent-rgb), .09), transparent 52%),
    rgba(12, 21, 15, .95);
  border-color: rgba(var(--accent-rgb), .28);
}

.emstudio-view-profile .profile-stat-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 1;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--green-bright);
  background: rgba(var(--accent-rgb), .11);
  border: 1px solid rgba(var(--accent-rgb), .2);
  border-radius: 13px;
}

.emstudio-view-profile .profile-dashboard-stat-grid > article:nth-child(2) .profile-stat-icon {
  color: #8fdcff;
  background: rgba(56, 189, 248, .09);
  border-color: rgba(56, 189, 248, .19);
}

.emstudio-view-profile .profile-dashboard-stat-grid > article:nth-child(3) .profile-stat-icon {
  color: #f5d688;
  background: rgba(240, 181, 95, .09);
  border-color: rgba(240, 181, 95, .19);
}

.emstudio-view-profile .profile-stat-icon .icon {
  width: 19px;
  height: 19px;
}

.emstudio-view-profile .profile-dashboard-stat-grid article > div {
  position: relative;
  z-index: 1;
  min-width: 0;
  max-width: calc(100% - 52px);
}

.emstudio-view-profile .profile-dashboard-stat-grid span:not(.profile-stat-icon) {
  display: block;
  color: #a8b6ae;
  font-size: 13px;
}

.emstudio-view-profile .profile-dashboard-stat-grid strong {
  margin: 8px 0 5px;
  color: #f4fbf6;
  font-family: var(--font-display);
  font-size: 29px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1;
}

.emstudio-view-profile .profile-dashboard-stat-grid b {
  color: #71db9c;
  font-size: 12px;
  font-weight: 500;
}

.emstudio-view-profile .profile-dashboard-stat-grid > article:nth-child(2) b { color: #82d4f5; }
.emstudio-view-profile .profile-dashboard-stat-grid > article:nth-child(3) b { color: #e8c977; }

.emstudio-view-profile .profile-recent-card {
  margin-top: 16px;
  padding: 21px 23px 10px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .05), transparent 36%),
    rgba(9, 15, 11, .92);
  border-color: var(--profile-line);
  border-radius: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 24px rgba(0, 0, 0, .14);
}

.emstudio-view-profile .profile-recent-card > header {
  align-items: center;
}

.emstudio-view-profile .profile-section-kicker {
  display: block;
  margin-bottom: 5px;
  color: #6c8274;
  font-size: 11px;
  letter-spacing: .09em;
}

.emstudio-view-profile .profile-recent-card h3,
.emstudio-view-profile .profile-dashboard-content .panel-heading h3 {
  color: #edf7f0;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: .01em;
}

.emstudio-view-profile .profile-recent-card header > a {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  gap: 5px;
  color: #b7c6bc;
  font-size: 13px;
  text-decoration: none;
  transition: color .15s ease;
}

.emstudio-view-profile .profile-recent-card header > a .icon {
  width: 14px;
  height: 14px;
  color: var(--green-bright);
  transition: transform .15s ease;
}

.emstudio-view-profile .profile-recent-card header > a:hover,
.emstudio-view-profile .profile-recent-card header > a:focus-visible {
  color: #f0fff5;
  outline: none;
}

.emstudio-view-profile .profile-recent-card header > a:hover .icon,
.emstudio-view-profile .profile-recent-card header > a:focus-visible .icon {
  transform: translateX(2px);
}

.emstudio-view-profile .profile-recent-card ul {
  margin-top: 16px;
}

.emstudio-view-profile .profile-recent-card li {
  position: relative;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  min-height: 72px;
  padding: 13px 0 13px;
  border-top-color: rgba(231, 250, 239, .075);
}

.emstudio-view-profile .profile-recent-card li:not(:last-child)::after {
  position: absolute;
  top: 35px;
  bottom: -14px;
  left: 8px;
  width: 1px;
  content: "";
  background: linear-gradient(var(--green), rgba(var(--accent-rgb), .05));
  opacity: .42;
}

.emstudio-view-profile .profile-recent-card li > i {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  margin: 5px 0 0 4px;
  background: var(--green-bright);
  border: 2px solid #132119;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .11), 0 0 13px rgba(var(--accent-rgb), .34);
}

.emstudio-view-profile .profile-activity-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.emstudio-view-profile .profile-recent-card li b {
  color: #b8c6be;
  font-size: 12px;
  font-weight: 500;
}

.emstudio-view-profile .profile-activity-meta time {
  flex: 0 0 auto;
  color: #78877e;
  font-size: 12px;
}

.emstudio-view-profile .profile-recent-card li p {
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.42;
}

.emstudio-view-profile .profile-recent-card li p a {
  color: #e5f0e9;
  text-decoration: none;
  transition: color .15s ease;
}

.emstudio-view-profile .profile-recent-card li p a:hover,
.emstudio-view-profile .profile-recent-card li p a:focus-visible {
  color: var(--green-bright);
  outline: none;
}

.emstudio-view-profile .profile-dashboard-content .panel-heading {
  min-height: 76px;
  padding: 0 3px 14px;
}

.emstudio-view-profile .profile-dashboard-content .panel-heading p {
  margin-top: 6px;
  color: var(--profile-muted);
  font-size: 13px;
  line-height: 1.5;
}

.emstudio-view-profile .profile-dashboard-content .panel-heading > a,
.emstudio-view-profile .profile-dashboard-content .panel-heading > button {
  height: 34px;
  padding: 0 13px;
  color: #d9fbe5;
  background: rgba(var(--accent-rgb), .1);
  border-color: rgba(var(--accent-rgb), .25);
  font-size: 12px;
  text-decoration: none;
}

.emstudio-view-profile .profile-dashboard-content .user-list,
.emstudio-view-profile .profile-dashboard-content .account-form {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .045), transparent 42%),
    var(--profile-surface);
  border-color: var(--profile-line);
  border-radius: 18px;
}

.emstudio-view-profile .profile-dashboard-content .user-list {
  padding: 7px 18px;
}

.emstudio-view-profile .profile-dashboard-content .user-list > div {
  min-height: 76px;
  grid-template-columns: 63px minmax(0, 1fr) auto;
  gap: 15px;
  border-bottom-color: rgba(228, 248, 236, .075);
}

.emstudio-view-profile .profile-dashboard-content .list-status {
  padding: 5px 7px;
  border-radius: 7px;
  font-size: 11px;
}

.emstudio-view-profile .profile-dashboard-content .user-list b {
  color: #dfeae3;
  font-size: 14px;
}

.emstudio-view-profile .profile-dashboard-content .user-list b a {
  color: inherit;
  text-decoration: none;
}

.emstudio-view-profile .profile-dashboard-content .user-list b a:hover,
.emstudio-view-profile .profile-dashboard-content .user-list b a:focus-visible {
  color: var(--green-bright);
  outline: none;
}

.emstudio-view-profile .profile-dashboard-content .user-list small,
.emstudio-view-profile .profile-dashboard-content .user-list time {
  color: var(--profile-muted);
  font-size: 12px;
}

.emstudio-view-profile .profile-dashboard-content .comment-list {
  gap: 12px;
}

.emstudio-view-profile .profile-dashboard-content .comment-list article {
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .04), transparent 48%),
    var(--profile-surface);
  border-color: var(--profile-line);
  border-radius: 17px;
}

.emstudio-view-profile .profile-dashboard-content .comment-list header {
  color: #dce8e0;
  font-size: 14px;
}

.emstudio-view-profile .profile-dashboard-content .comment-list time,
.emstudio-view-profile .profile-dashboard-content .comment-list a {
  color: var(--profile-muted);
  font-size: 12px;
}

.emstudio-view-profile .profile-dashboard-content .comment-list .profile-comment-copy {
  color: #b8c6be;
  font-size: 14px;
  line-height: 1.7;
}

.emstudio-view-profile .profile-favorite-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.emstudio-view-profile .profile-favorite-card {
  position: relative;
  display: flex;
  min-height: 156px;
  flex-direction: column;
  justify-content: space-between;
  padding: 18px 18px 15px;
  overflow: hidden;
  background:
    linear-gradient(130deg, rgba(255, 255, 255, .06), transparent 48%),
    var(--profile-surface);
  border: 1px solid var(--profile-line);
  border-radius: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 10px 19px rgba(0, 0, 0, .12);
  transition: opacity .18s ease, transform .18s ease, border-color .16s ease, background-color .16s ease;
}

.emstudio-view-profile .profile-favorite-card::after {
  position: absolute;
  right: -28px;
  bottom: -38px;
  width: 118px;
  height: 118px;
  content: "";
  background: radial-gradient(circle, rgba(var(--accent-rgb), .11), transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}

.emstudio-view-profile .profile-favorite-card:hover {
  background:
    linear-gradient(130deg, rgba(var(--accent-rgb), .1), transparent 53%),
    rgba(12, 20, 15, .95);
  border-color: rgba(var(--accent-rgb), .28);
}

.emstudio-view-profile .profile-favorite-card.is-removing {
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
}

.emstudio-view-profile .profile-favorite-main {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  padding-right: 66px;
  color: inherit;
  text-decoration: none;
}

.emstudio-view-profile .profile-favorite-main > span {
  display: block;
  overflow: hidden;
  color: #7fe4a5;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emstudio-view-profile .profile-favorite-main h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 13px 0 9px;
  color: #e4eee8;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.emstudio-view-profile .profile-favorite-main p {
  margin: 0;
  color: var(--profile-muted);
  font-size: 12px;
}

.emstudio-view-profile .profile-favorite-actions {
  position: absolute;
  z-index: 2;
  top: 14px;
  right: 14px;
  display: flex;
  gap: 6px;
}

.emstudio-view-profile .profile-favorite-icon-button {
  display: inline-flex;
  width: 31px;
  height: 31px;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #9eafa5;
  background: rgba(6, 11, 8, .48);
  border: 1px solid rgba(229, 251, 238, .12);
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.emstudio-view-profile .profile-favorite-icon-button .icon {
  width: 15px;
  height: 15px;
}

.emstudio-view-profile .profile-favorite-icon-button.is-unfavorite {
  color: #9be6b8;
  background: rgba(var(--accent-rgb), .09);
  border-color: rgba(var(--accent-rgb), .18);
}

.emstudio-view-profile .profile-favorite-icon-button:hover,
.emstudio-view-profile .profile-favorite-icon-button:focus-visible {
  color: #f0fff5;
  background: rgba(var(--accent-rgb), .17);
  border-color: rgba(var(--accent-rgb), .4);
  outline: none;
}

.emstudio-view-profile .profile-favorite-icon-button.is-unfavorite:hover,
.emstudio-view-profile .profile-favorite-icon-button.is-unfavorite:focus-visible {
  color: #ffd0ca;
  background: rgba(244, 130, 117, .11);
  border-color: rgba(244, 130, 117, .43);
}

.emstudio-view-profile .profile-favorite-icon-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.emstudio-view-profile .profile-favorite-icon-button.is-pending .icon {
  animation: profile-like-icon-spin .72s linear infinite;
}

.emstudio-view-profile .profile-favorite-status {
  min-height: 18px;
  margin: 8px 2px 0;
  color: var(--profile-muted);
  font-size: 12px;
}

.emstudio-view-profile .profile-favorite-status:empty { display: none; }

.emstudio-view-profile .profile-dashboard-content .profile-like-list {
  gap: 12px;
}

.emstudio-view-profile .profile-dashboard-content .profile-like-item {
  min-height: 102px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .045), transparent 45%),
    var(--profile-surface);
  border-color: var(--profile-line);
  border-radius: 17px;
}

.emstudio-view-profile .profile-dashboard-content .profile-like-copy > span {
  color: #79d99d;
  font-size: 12px;
}

.emstudio-view-profile .profile-dashboard-content .profile-like-copy h3 {
  font-size: 16px;
}

.emstudio-view-profile .profile-dashboard-content .profile-like-copy p {
  color: var(--profile-muted);
  font-size: 12px;
}

.emstudio-view-profile .profile-dashboard-content .profile-like-actions {
  gap: 8px;
}

.emstudio-view-profile .profile-dashboard-content .profile-like-actions .profile-like-icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  color: #9aaca1;
  background: rgba(255, 255, 255, .025);
  border-color: rgba(225, 249, 234, .12);
  border-radius: 10px;
}

.emstudio-view-profile .profile-dashboard-content .profile-like-actions .profile-like-icon-button.is-open {
  color: #a8e7bf;
  background: rgba(var(--accent-rgb), .075);
  border-color: rgba(var(--accent-rgb), .18);
}

.emstudio-view-profile .profile-dashboard-content .profile-like-actions .profile-like-icon-button.is-unlike {
  color: #9be6b8;
  background: rgba(var(--accent-rgb), .09);
  border-color: rgba(var(--accent-rgb), .19);
}

.emstudio-view-profile .profile-dashboard-content .profile-like-actions .profile-like-icon-button:hover,
.emstudio-view-profile .profile-dashboard-content .profile-like-actions .profile-like-icon-button:focus-visible {
  color: #f0fff5;
  background: rgba(var(--accent-rgb), .17);
  border-color: rgba(var(--accent-rgb), .42);
  outline: none;
}

.emstudio-view-profile .profile-dashboard-content .profile-like-actions .profile-like-icon-button.is-unlike:hover,
.emstudio-view-profile .profile-dashboard-content .profile-like-actions .profile-like-icon-button.is-unlike:focus-visible {
  color: #ffd0ca;
  background: rgba(244, 130, 117, .11);
  border-color: rgba(244, 130, 117, .43);
}

.emstudio-view-profile .profile-dashboard-content .account-form {
  gap: 16px;
  padding: 20px;
}

.emstudio-view-profile .profile-dashboard-content .account-form input,
.emstudio-view-profile .profile-dashboard-content .account-form textarea {
  color: #dfece4;
  background: rgba(2, 6, 4, .45);
  border-color: rgba(225, 250, 235, .12);
  font-size: 13px;
}

.emstudio-view-profile .profile-dashboard-content .security-row {
  min-height: 61px;
  border-top-color: rgba(230, 249, 238, .075);
}

.emstudio-view-profile .profile-dashboard-content .security-row b {
  color: #dceae1;
  font-size: 13px;
}

.emstudio-view-profile .profile-dashboard-content .security-row small {
  color: var(--profile-muted);
  font-size: 12px;
}

.emstudio-view-profile .profile-dashboard-content .security-row > a,
.emstudio-view-profile .profile-dashboard-content .account-state {
  font-size: 12px;
}

.emstudio-view-profile .profile-dashboard .empty-state {
  padding: 24px;
  background: var(--profile-surface);
  border-color: var(--profile-line);
  border-radius: 17px;
}

@media (max-width: 1120px) {
  .emstudio-view-profile .profile-dashboard-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 22px;
  }

  .emstudio-view-profile .profile-edit-button {
    grid-column: 2;
    justify-self: end;
  }

  .emstudio-view-profile .profile-hero-stats {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 14px 0 0;
    border-top: 1px solid rgba(226, 249, 235, .1);
    border-left: 0;
  }

  .emstudio-view-profile .profile-hero-stats > div:first-child { padding-left: 0; }
}

@media (max-width: 760px) {
  .emstudio-view-profile .profile-dashboard-hero {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: 18px;
    padding: 22px;
  }

  .emstudio-view-profile .profile-dashboard-hero .user-cover-lines {
    inset: -30% -60% -24% 16%;
    opacity: .52;
  }

  .emstudio-view-profile .profile-hero-intro { gap: 14px; }

  .emstudio-view-profile .profile-dashboard-avatar {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
    border-radius: 22px;
  }

  .emstudio-view-profile .profile-dashboard-identity h2 { font-size: 22px; }
  .emstudio-view-profile .profile-role-badge { min-height: 23px; padding-inline: 7px; font-size: 10px; }
  .emstudio-view-profile .profile-user-handle { margin-top: 6px; font-size: 12px; }
  .emstudio-view-profile .profile-user-bio { margin-top: 4px; font-size: 12px; }

  .emstudio-view-profile .profile-edit-button {
    grid-column: auto;
    justify-self: start;
    order: 3;
  }

  .emstudio-view-profile .profile-hero-stats {
    grid-column: auto;
    width: 100%;
    justify-self: stretch;
    order: 2;
  }

  .emstudio-view-profile .profile-hero-stats > div {
    min-width: 0;
    padding-inline: 9px;
  }

  .emstudio-view-profile .profile-dashboard-layout {
    grid-template-columns: 1fr;
    gap: 13px;
    margin-top: 13px;
  }

  .emstudio-view-profile .profile-dashboard-nav {
    position: static;
    display: flex;
    gap: 7px;
    padding: 9px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .emstudio-view-profile .profile-dashboard-nav::-webkit-scrollbar { display: none; }
  .emstudio-view-profile .profile-nav-caption { display: none; }

  .emstudio-view-profile .profile-dashboard-nav button,
  .emstudio-view-profile .profile-dashboard-nav .logout-item {
    width: auto;
    min-height: 42px;
    flex: 0 0 auto;
    gap: 7px;
    margin: 0;
    padding: 0 11px;
    border-top: 0;
    border-radius: 10px;
    font-size: 12px;
  }

  .emstudio-view-profile .profile-dashboard-nav .profile-nav-arrow { display: none; }

  .emstudio-view-profile .profile-dashboard-stat-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .emstudio-view-profile .profile-dashboard-stat-grid > article {
    min-height: 102px;
  }

  .emstudio-view-profile .profile-favorite-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .emstudio-view-profile .profile-dashboard-hero { padding: 18px; border-radius: 18px; }
  .emstudio-view-profile .profile-identity-title { flex-wrap: wrap; gap: 6px; }
  .emstudio-view-profile .profile-dashboard-identity h2 { max-width: 100%; }
  .emstudio-view-profile .profile-hero-stats strong { font-size: 21px; }
  .emstudio-view-profile .profile-hero-stats span { font-size: 11px; }
  .emstudio-view-profile .profile-recent-card { padding: 18px 16px 8px; }
  .emstudio-view-profile .profile-recent-card h3,
  .emstudio-view-profile .profile-dashboard-content .panel-heading h3 { font-size: 17px; }
  .emstudio-view-profile .profile-recent-card header > a { font-size: 12px; }
  .emstudio-view-profile .profile-activity-meta { align-items: flex-start; flex-direction: column; gap: 3px; }
  .emstudio-view-profile .profile-recent-card li { min-height: 86px; }
  .emstudio-view-profile .profile-recent-card li p { font-size: 14px; }
  .emstudio-view-profile .profile-dashboard-content .panel-heading { min-height: 70px; align-items: flex-start; }
  .emstudio-view-profile .profile-dashboard-content .panel-heading > a { flex: 0 0 auto; }
  .emstudio-view-profile .profile-dashboard-content .user-list { padding-inline: 13px; }
  .emstudio-view-profile .profile-dashboard-content .user-list > div { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding-block: 10px; }
  .emstudio-view-profile .profile-dashboard-content .user-list time { grid-column: 2; }
  .emstudio-view-profile .profile-favorite-card { min-height: 145px; }
  .emstudio-view-profile .profile-dashboard-content .profile-like-item { align-items: stretch; }
  .emstudio-view-profile .profile-dashboard-content .profile-like-actions { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce), (update: slow) {
  .emstudio-view-profile .profile-edit-button,
  .emstudio-view-profile .profile-dashboard-nav button,
  .emstudio-view-profile .profile-dashboard-nav .profile-nav-arrow,
  .emstudio-view-profile .profile-dashboard-stat-grid > article,
  .emstudio-view-profile .profile-recent-card header > a .icon,
  .emstudio-view-profile .profile-favorite-card,
  .emstudio-view-profile .profile-favorite-icon-button {
    transition: none;
  }

  .emstudio-view-profile .profile-favorite-icon-button.is-pending .icon { animation: none; }
}

/* Announcement centre and top notification bell ------------------------------------------- */
.emstudio-view-profile .announcement-panel-heading {
  align-items: center;
}

.emstudio-view-profile .announcement-unread-summary {
  display: inline-flex;
  min-height: 27px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 9px;
  color: #ffd7d2;
  background: rgba(244, 104, 91, .11);
  border: 1px solid rgba(244, 104, 91, .25);
  border-radius: 999px;
  font-size: 11px;
}

.emstudio-view-profile .announcement-center {
  display: grid;
  gap: 16px;
}

.emstudio-view-profile .announcement-composer,
.emstudio-view-profile .announcement-history {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(138deg, rgba(255, 255, 255, .05), transparent 43%),
    rgba(9, 15, 11, .92);
  border: 1px solid rgba(226, 249, 235, .11);
  border-radius: 19px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 12px 24px rgba(0, 0, 0, .14);
}

.emstudio-view-profile .announcement-composer {
  padding: 20px;
}

.emstudio-view-profile .announcement-composer::before,
.emstudio-view-profile .announcement-history::before {
  position: absolute;
  top: -70px;
  right: -46px;
  width: 168px;
  height: 168px;
  content: "";
  background: radial-gradient(circle, rgba(var(--accent-rgb), .1), transparent 68%);
  border-radius: 50%;
  pointer-events: none;
}

.emstudio-view-profile .announcement-composer > header,
.emstudio-view-profile .announcement-history > header {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.emstudio-view-profile .announcement-composer h4,
.emstudio-view-profile .announcement-history h4 {
  margin: 0;
  color: #edf8f1;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
}

.emstudio-view-profile .announcement-composer-state,
.emstudio-view-profile .announcement-history-count {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 0 8px;
  color: #8da198;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(229, 249, 237, .09);
  border-radius: 999px;
  font-size: 11px;
}

.emstudio-view-profile .announcement-composer-state.is-editing {
  color: #ffe0a3;
  background: rgba(240, 181, 95, .09);
  border-color: rgba(240, 181, 95, .22);
}

.emstudio-view-profile .announcement-composer-state.is-uploading {
  color: #b8eaca;
  background: rgba(var(--accent-rgb), .1);
  border-color: rgba(var(--accent-rgb), .27);
}

.emstudio-view-profile .announcement-composer-state.is-saving {
  color: #b9d7ff;
  background: rgba(96, 156, 255, .1);
  border-color: rgba(96, 156, 255, .26);
}

.emstudio-view-profile .announcement-title-input {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 44px;
  margin-top: 18px;
  padding: 0 13px;
  color: #edf8f1;
  outline: none;
  background: rgba(3, 7, 5, .52);
  border: 1px solid rgba(225, 248, 233, .12);
  border-radius: 11px;
  font-size: 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.emstudio-view-profile .announcement-title-input::placeholder { color: #66746c; }

.emstudio-view-profile .announcement-title-input:focus,
.emstudio-view-profile .announcement-editor:focus {
  border-color: rgba(var(--accent-rgb), .43);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08);
}

.emstudio-view-profile .announcement-editor-tools {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  padding: 7px;
  background: rgba(255, 255, 255, .025);
  border: 1px solid rgba(228, 249, 236, .09);
  border-radius: 11px 11px 0 0;
}

.emstudio-view-profile .announcement-editor-tools button {
  display: inline-grid;
  width: 29px;
  height: 29px;
  place-items: center;
  padding: 0;
  color: #a8b8ae;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 13px;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}

.emstudio-view-profile .announcement-editor-tools button .icon {
  width: 15px;
  height: 15px;
}

.emstudio-view-profile .announcement-tool-separator {
  width: 1px;
  height: 18px;
  margin: 0 1px;
  background: rgba(225, 248, 233, .12);
}

.emstudio-view-profile .announcement-editor-tools button:hover,
.emstudio-view-profile .announcement-editor-tools button:focus-visible,
.emstudio-view-profile .announcement-editor-tools button.is-active {
  color: #eefff4;
  background: rgba(var(--accent-rgb), .11);
  border-color: rgba(var(--accent-rgb), .24);
  outline: none;
}

.emstudio-view-profile .announcement-editor {
  position: relative;
  z-index: 1;
  min-height: 176px;
  padding: 14px;
  overflow: auto;
  color: #d4e2d9;
  outline: none;
  background: rgba(3, 7, 5, .43);
  border: 1px solid rgba(225, 248, 233, .12);
  border-top: 0;
  border-radius: 0 0 11px 11px;
  font-size: 14px;
  line-height: 1.75;
  word-break: break-word;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.emstudio-view-profile .announcement-editor[aria-disabled="true"] {
  cursor: wait;
  opacity: .72;
}

.emstudio-view-profile .announcement-editor.is-dragging {
  background: rgba(var(--accent-rgb), .08);
  border-color: rgba(var(--accent-rgb), .54);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .16), 0 0 0 3px rgba(var(--accent-rgb), .08);
}

.emstudio-view-profile .announcement-editor:empty::before {
  content: attr(data-placeholder);
  color: #66746c;
  pointer-events: none;
}

.emstudio-view-profile .announcement-editor h2,
.emstudio-view-profile .announcement-editor h3,
.emstudio-view-profile .announcement-editor h4 {
  margin: 1em 0 .5em;
  color: #eef9f2;
  font-family: var(--font-display);
}

.emstudio-view-profile .announcement-editor h3 { font-size: 18px; }
.emstudio-view-profile .announcement-editor h4 { font-size: 16px; }
.emstudio-view-profile .announcement-editor p { margin: 0 0 .75em; }
.emstudio-view-profile .announcement-editor ul,
.emstudio-view-profile .announcement-editor ol { margin: 0 0 .85em; padding-left: 1.35em; }

.emstudio-view-profile .announcement-editor blockquote {
  margin: .8em 0;
  padding: .35em .85em;
  color: #b7c8bc;
  background: rgba(var(--accent-rgb), .055);
  border-left: 3px solid var(--green);
}

.emstudio-view-profile .announcement-editor a {
  color: #9af0be;
  text-decoration-color: rgba(var(--accent-rgb), .48);
}

.emstudio-view-profile .announcement-editor > img,
.emstudio-view-profile .announcement-editor p > img,
.emstudio-view-profile .announcement-editor li > img {
  display: block;
  max-width: min(100%, 620px);
  max-height: 360px;
  margin: 11px 0;
  border: 1px solid rgba(230, 249, 237, .14);
  border-radius: 11px;
  box-shadow: 0 9px 21px rgba(0, 0, 0, .16);
}

.emstudio-view-profile .announcement-editor-upload-card {
  display: inline-grid;
  grid-template-columns: 40px minmax(0, 1fr) 23px;
  width: min(100%, 310px);
  min-height: 52px;
  align-items: center;
  gap: 9px;
  margin: 6px 2px;
  padding: 6px 7px;
  color: #c9d8cf;
  vertical-align: middle;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(225, 248, 233, .12);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
}

.emstudio-view-profile .announcement-editor-upload-card.is-uploading { border-color: rgba(var(--accent-rgb), .34); }
.emstudio-view-profile .announcement-editor-upload-card.is-error { color: #ffc6c0; border-color: rgba(244, 130, 117, .4); }

.emstudio-view-profile .announcement-editor-upload-card img {
  display: block;
  width: 40px;
  height: 40px;
  border-radius: 7px;
  object-fit: cover;
}

.emstudio-view-profile .announcement-editor-upload-card > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.emstudio-view-profile .announcement-editor-upload-card strong,
.emstudio-view-profile .announcement-editor-upload-card small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emstudio-view-profile .announcement-editor-upload-card strong { color: #e7f3eb; font-size: 11px; font-weight: 600; }
.emstudio-view-profile .announcement-editor-upload-card small { color: #84968b; font-size: 10px; }
.emstudio-view-profile .announcement-editor-upload-card.is-error small { color: #e9a59d; }

.emstudio-view-profile .announcement-editor-upload-remove {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  padding: 0;
  color: #9aaca1;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.emstudio-view-profile .announcement-editor-upload-remove:hover,
.emstudio-view-profile .announcement-editor-upload-remove:focus-visible {
  color: #ffd8d2;
  background: rgba(244, 130, 117, .12);
  border-color: rgba(244, 130, 117, .28);
  outline: none;
}

.emstudio-view-profile .announcement-composer > footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 13px;
}

.emstudio-view-profile .announcement-composer-meta {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.emstudio-view-profile .announcement-composer-help {
  max-width: 500px;
  margin: 0;
  color: #7e8d84;
  font-size: 12px;
  line-height: 1.55;
}

.emstudio-view-profile .announcement-editor-count {
  color: #65776d;
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .02em;
}

.emstudio-view-profile .announcement-composer > footer > div:not(.announcement-composer-meta) {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.emstudio-view-profile .announcement-cancel-button,
.emstudio-view-profile .announcement-publish-button {
  display: inline-flex;
  min-height: 35px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease;
}

.emstudio-view-profile .announcement-cancel-button {
  color: #aab9b0;
  background: transparent;
  border: 1px solid rgba(228, 249, 236, .12);
}

.emstudio-view-profile .announcement-cancel-button:hover,
.emstudio-view-profile .announcement-cancel-button:focus-visible {
  color: #ecf8f0;
  background: rgba(255, 255, 255, .06);
  outline: none;
}

.emstudio-view-profile .announcement-publish-button {
  color: #ecfff3;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .28), rgba(var(--accent-rgb), .12));
  border: 1px solid rgba(var(--accent-rgb), .43);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.emstudio-view-profile .announcement-publish-button .icon {
  width: 15px;
  height: 15px;
}

.emstudio-view-profile .announcement-publish-button:hover,
.emstudio-view-profile .announcement-publish-button:focus-visible {
  color: #fff;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .4), rgba(var(--accent-rgb), .17));
  border-color: rgba(var(--accent-rgb), .64);
  outline: none;
}

.emstudio-view-profile .announcement-publish-button:disabled,
.emstudio-view-profile .announcement-cancel-button:disabled {
  cursor: wait;
  opacity: .55;
}

.emstudio-view-profile .announcement-form-status,
.emstudio-view-profile .announcement-history-status {
  min-height: 18px;
  margin: 9px 1px 0;
  color: #94a79b;
  font-size: 12px;
}

.emstudio-view-profile .announcement-form-status.is-error,
.emstudio-view-profile .announcement-history-status.is-error { color: #f2aaa2; }
.emstudio-view-profile .announcement-form-status.is-success,
.emstudio-view-profile .announcement-history-status.is-success { color: #9ce8b9; }
.emstudio-view-profile .announcement-form-status.is-loading,
.emstudio-view-profile .announcement-history-status.is-loading { color: #b3c9bd; }

.emstudio-view-profile .announcement-form-status:empty,
.emstudio-view-profile .announcement-history-status:empty { display: none; }

.emstudio-view-profile .announcement-history {
  padding: 20px;
}

.emstudio-view-profile .announcement-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
  margin-top: 16px;
}

.emstudio-view-profile .announcement-item {
  position: relative;
  padding: 16px 17px 14px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .035), transparent 55%),
    rgba(5, 10, 7, .46);
  border-color: rgba(226, 249, 235, .1);
  border-radius: 14px;
  box-shadow: none;
  transition: opacity .18s ease, transform .18s ease, border-color .15s ease, background-color .15s ease;
}

.emstudio-view-profile .announcement-item.is-unread {
  background:
    linear-gradient(110deg, rgba(var(--accent-rgb), .09), transparent 52%),
    rgba(8, 15, 11, .62);
  border-color: rgba(var(--accent-rgb), .24);
}

.emstudio-view-profile .announcement-item.is-removing {
  pointer-events: none;
  opacity: 0;
  transform: translateX(10px);
}

.emstudio-view-profile .announcement-item > header {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.emstudio-view-profile .announcement-item-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.emstudio-view-profile .announcement-item-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  background: #65746b;
  border-radius: 50%;
}

.emstudio-view-profile .announcement-item.is-unread .announcement-item-dot {
  background: var(--green-bright);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .12), 0 0 11px rgba(var(--accent-rgb), .36);
}

.emstudio-view-profile .announcement-item h5 {
  overflow: hidden;
  margin: 0;
  color: #e8f2eb;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emstudio-view-profile .announcement-item time {
  flex: 0 0 auto;
  color: #7f9086;
  font-size: 11px;
}

.emstudio-view-profile .announcement-item-content {
  margin: 12px 0 13px 16px;
  color: #afc0b5;
  font-size: 13px;
  line-height: 1.72;
  word-break: break-word;
}

.emstudio-view-profile .announcement-item-content > :first-child { margin-top: 0; }
.emstudio-view-profile .announcement-item-content > :last-child { margin-bottom: 0; }
.emstudio-view-profile .announcement-item-content p { margin: 0 0 .72em; }
.emstudio-view-profile .announcement-item-content h2,
.emstudio-view-profile .announcement-item-content h3,
.emstudio-view-profile .announcement-item-content h4 { margin: 1em 0 .5em; color: #e2eee6; font-family: var(--font-display); }
.emstudio-view-profile .announcement-item-content h3 { font-size: 16px; }
.emstudio-view-profile .announcement-item-content h4 { font-size: 14px; }
.emstudio-view-profile .announcement-item-content ul,
.emstudio-view-profile .announcement-item-content ol { margin: .6em 0; padding-left: 1.35em; }

.emstudio-view-profile .announcement-item-content blockquote {
  margin: .75em 0;
  padding: .35em .8em;
  color: #b9c9bd;
  background: rgba(var(--accent-rgb), .055);
  border-left: 3px solid rgba(var(--accent-rgb), .6);
}

.emstudio-view-profile .announcement-item-content a {
  color: #8cecb2;
  text-decoration-color: rgba(var(--accent-rgb), .35);
}

.emstudio-view-profile .announcement-item-content img {
  display: block;
  max-width: min(100%, 620px);
  max-height: 360px;
  margin: 10px 0;
  border: 1px solid rgba(230, 249, 237, .12);
  border-radius: 10px;
  object-fit: contain;
}

.emstudio-view-profile .announcement-item > footer {
  display: flex;
  min-height: 26px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-left: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(227, 248, 235, .075);
}

.emstudio-view-profile .announcement-item > footer > span {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  color: #83948a;
  font-size: 11px;
}

.emstudio-view-profile .announcement-item > footer > span .icon {
  width: 13px;
  height: 13px;
  color: #78d69c;
}

.emstudio-view-profile .announcement-item-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.emstudio-view-profile .announcement-item-actions > button {
  min-height: 27px;
  padding: 0 8px;
  color: #a8baaf;
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(226, 249, 235, .1);
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  transition: color .14s ease, background-color .14s ease, border-color .14s ease;
}

.emstudio-view-profile .announcement-item-actions > button:hover,
.emstudio-view-profile .announcement-item-actions > button:focus-visible {
  color: #edfff3;
  background: rgba(var(--accent-rgb), .11);
  border-color: rgba(var(--accent-rgb), .28);
  outline: none;
}

.emstudio-view-profile .announcement-item-actions > .announcement-icon-action {
  display: inline-grid;
  width: 27px;
  padding: 0;
  place-items: center;
}

.emstudio-view-profile .announcement-item-actions > .announcement-icon-action .icon {
  width: 14px;
  height: 14px;
}

.emstudio-view-profile .announcement-item-actions > .announcement-icon-action.is-danger:hover,
.emstudio-view-profile .announcement-item-actions > .announcement-icon-action.is-danger:focus-visible {
  color: #ffd0ca;
  background: rgba(244, 130, 117, .11);
  border-color: rgba(244, 130, 117, .37);
}

.emstudio-view-profile .announcement-empty-state {
  position: relative;
  z-index: 1;
  margin-top: 16px;
}

.announcement-bell-wrap {
  position: relative;
  z-index: 120;
  flex: 0 0 auto;
}

.announcement-bell {
  position: relative;
  display: inline-grid;
  isolation: isolate;
}

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

.announcement-badge {
  position: absolute;
  top: -4px;
  right: -5px;
  display: inline-grid;
  min-width: 16px;
  height: 16px;
  align-items: center;
  padding: 0 4px;
  color: #fff8f7;
  background: #ec5d52;
  border: 2px solid #050807;
  border-radius: 999px;
  box-shadow: 0 0 0 2px rgba(236, 93, 82, .12), 0 2px 7px rgba(0, 0, 0, .28);
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
}

.announcement-badge[hidden] { display: none; }

/* `main` is focused programmatically after PJAX keyboard navigation so screen
   readers announce the newly loaded page. It is not an interactive control;
   suppress the browser's viewport-sized default outline without removing
   focus indicators from links, buttons, or form fields. */
#mainContent:focus,
#mainContent:focus-visible {
  outline: none;
}

.announcement-bell.is-open {
  color: #effff5;
  background: rgba(var(--accent-rgb), .1);
  border-color: rgba(var(--accent-rgb), .25);
}

.announcement-popover {
  position: absolute;
  z-index: 250;
  top: calc(100% + 12px);
  right: 0;
  width: min(380px, calc(100vw - 28px));
  overflow: hidden;
  color: #e4f0e8;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .065), transparent 44%),
    #0a110d;
  border: 1px solid rgba(224, 249, 234, .16);
  border-radius: 17px;
  box-shadow: 0 22px 42px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .08);
  transform-origin: right top;
  animation: announcement-popover-in .16s ease both;
}

@keyframes announcement-popover-in {
  from { opacity: 0; transform: translateY(-4px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.announcement-popover[hidden] { display: none; }

.announcement-popover > header {
  display: flex;
  min-height: 53px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 15px;
  border-bottom: 1px solid rgba(225, 248, 233, .09);
}

.announcement-popover > header h2 {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: #f0fbf4;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
}

.announcement-popover > header h2 .icon {
  width: 16px;
  height: 16px;
  color: var(--green-bright);
}

.announcement-popover-count {
  color: #91a49a;
  font-size: 11px;
}

.announcement-popover-list {
  display: grid;
  max-height: min(430px, calc(100vh - 142px));
  overflow: auto;
  overscroll-behavior: contain;
}

.announcement-popover-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 9px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(225, 248, 233, .075);
}

.announcement-popover-item.is-read > i {
  background: #65746b;
  box-shadow: none;
}

.announcement-popover-item:last-child { border-bottom: 0; }

.announcement-popover-item > i {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  background: var(--green-bright);
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .1);
}

.announcement-popover-item h3 {
  overflow: hidden;
  margin: 0;
  color: #e6f2ea;
  font-size: 13px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.announcement-popover-item p {
  display: -webkit-box;
  overflow: hidden;
  margin: 4px 0 0;
  color: #9aaea1;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.announcement-popover-item footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  margin-top: 8px;
}

.announcement-popover-item time {
  color: #718178;
  font-size: 11px;
}

.announcement-popover-item footer button {
  min-height: 25px;
  padding: 0 7px;
  color: #b8f4cf;
  background: rgba(var(--accent-rgb), .08);
  border: 1px solid rgba(var(--accent-rgb), .2);
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
}

.announcement-popover-item footer button:hover,
.announcement-popover-item footer button:focus-visible {
  color: #f1fff6;
  background: rgba(var(--accent-rgb), .16);
  border-color: rgba(var(--accent-rgb), .36);
  outline: none;
}

.announcement-popover-item-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.announcement-popover-item-open:hover h3,
.announcement-popover-item-open:focus-visible h3 { color: #f4fff8; }

.announcement-popover-item-open:hover p { color: #b7cbbd; }

.announcement-popover-item-open:focus-visible {
  outline: 1px solid rgba(var(--accent-rgb), .62);
  outline-offset: 3px;
}

.announcement-popover-empty {
  padding: 28px 18px;
  color: #899a90;
  font-size: 13px;
  text-align: center;
}

.announcement-popover-empty.is-error { color: #e8a69e; }

.announcement-popover > footer {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  background: rgba(255, 255, 255, .02);
  border-top: 1px solid rgba(225, 248, 233, .075);
}

.announcement-popover > footer a,
.announcement-popover > footer .announcement-popover-tip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b7c9bd;
  font-size: 12px;
  text-decoration: none;
}

.announcement-popover > footer a .icon,
.announcement-popover > footer .announcement-popover-tip .icon {
  width: 13px;
  height: 13px;
  color: var(--green-bright);
}

.announcement-popover-tip { cursor: default; }

.announcement-detail-dialog {
  width: min(720px, calc(100vw - 28px));
  max-width: none;
  max-height: calc(100vh - 28px);
  max-height: min(760px, calc(100dvh - 28px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: #dcebe1;
  background:
    radial-gradient(circle at 88% 0%, rgba(var(--accent-rgb), .16), transparent 32%),
    linear-gradient(140deg, rgba(255, 255, 255, .065), transparent 38%),
    #09110c;
  border: 1px solid rgba(221, 247, 230, .18);
  border-radius: 20px;
  box-shadow: 0 30px 84px rgba(0, 0, 0, .62), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.announcement-detail-dialog:not([open]) { display: none; }

.announcement-detail-dialog::backdrop { background: rgba(0, 6, 3, .76); backdrop-filter: blur(5px); }

.announcement-detail-shell {
  display: grid;
  max-height: min(760px, calc(100dvh - 28px));
  grid-template-rows: auto auto minmax(0, 1fr) auto;
}

.announcement-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(224, 247, 232, .1);
}

.announcement-detail-header > div { min-width: 0; }

.announcement-detail-kicker {
  display: block;
  margin-bottom: 5px;
  color: var(--green-bright);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
}

.announcement-detail-header h2 {
  margin: 0;
  color: #f2fbf5;
  font-family: var(--font-display);
  font-size: clamp(19px, 3vw, 24px);
  font-weight: 650;
  line-height: 1.28;
}

.announcement-detail-close {
  display: inline-grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  padding: 0;
  color: #a8b9ad;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(224, 247, 232, .12);
  border-radius: 10px;
  cursor: pointer;
}

.announcement-detail-close .icon { width: 16px; height: 16px; }

.announcement-detail-close:hover,
.announcement-detail-close:focus-visible {
  color: #f3fff6;
  background: rgba(var(--accent-rgb), .14);
  border-color: rgba(var(--accent-rgb), .38);
  outline: none;
}

.announcement-detail-meta {
  padding: 11px 24px;
  color: #8ca096;
  border-bottom: 1px solid rgba(224, 247, 232, .075);
  font-size: 12px;
  line-height: 1.45;
}

.announcement-detail-content {
  min-height: 0;
  padding: 23px 24px 28px;
  overflow: auto;
  overscroll-behavior: contain;
  color: #c9d9ce;
  font-size: 15px;
  line-height: 1.78;
  word-break: break-word;
}

.announcement-detail-content.is-loading { opacity: .82; }

.announcement-detail-content > :first-child { margin-top: 0; }
.announcement-detail-content > :last-child { margin-bottom: 0; }
.announcement-detail-content p { margin: 0 0 1em; }

.announcement-detail-content h2,
.announcement-detail-content h3,
.announcement-detail-content h4,
.announcement-detail-content h5,
.announcement-detail-content h6 {
  margin: 1.25em 0 .55em;
  color: #effaf2;
  font-family: var(--font-display);
  line-height: 1.34;
}

.announcement-detail-content h2 { font-size: 22px; }
.announcement-detail-content h3 { font-size: 19px; }
.announcement-detail-content h4 { font-size: 17px; }
.announcement-detail-content h5,
.announcement-detail-content h6 { font-size: 15px; }

.announcement-detail-content ul,
.announcement-detail-content ol { margin: .85em 0; padding-left: 1.45em; }

.announcement-detail-content blockquote {
  margin: 1em 0;
  padding: 10px 14px;
  color: #b7cabc;
  background: rgba(var(--accent-rgb), .055);
  border-left: 3px solid rgba(var(--accent-rgb), .62);
  border-radius: 0 9px 9px 0;
}

.announcement-detail-content a { color: #8debb1; text-underline-offset: 3px; }

.announcement-detail-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.1em auto;
  border: 1px solid rgba(225, 247, 232, .12);
  border-radius: 12px;
}

.announcement-detail-content table {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 1em 0;
  overflow: auto;
  border-collapse: collapse;
}

.announcement-detail-content th,
.announcement-detail-content td { padding: 8px 10px; border: 1px solid rgba(225, 247, 232, .13); }
.announcement-detail-content th { color: #e9f7ed; background: rgba(255, 255, 255, .045); }

.announcement-detail-content pre,
.announcement-detail-content code {
  font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace);
}

.announcement-detail-content pre {
  margin: 1em 0;
  padding: 13px 15px;
  overflow: auto;
  color: #d8eee0;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(225, 247, 232, .1);
  border-radius: 10px;
}

.announcement-detail-footer {
  display: flex;
  justify-content: flex-end;
  min-height: 58px;
  align-items: center;
  padding: 10px 24px;
  background: rgba(255, 255, 255, .025);
  border-top: 1px solid rgba(224, 247, 232, .09);
}

.announcement-detail-footer button {
  min-height: 32px;
  padding: 0 12px;
  color: #c7f6d8;
  background: rgba(var(--accent-rgb), .09);
  border: 1px solid rgba(var(--accent-rgb), .25);
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
}

.announcement-detail-footer button:hover,
.announcement-detail-footer button:focus-visible {
  color: #f2fff6;
  background: rgba(var(--accent-rgb), .17);
  border-color: rgba(var(--accent-rgb), .43);
  outline: none;
}

.announcement-detail-footer button[hidden] { display: none; }

html.announcement-detail-open { overflow: hidden; }

@media (max-width: 820px) {
  .top-actions .announcement-bell { display: inline-grid; }
  .announcement-popover { position: fixed; top: max(66px, env(safe-area-inset-top)); right: 10px; }
}

@media (max-width: 620px) {
  .announcement-detail-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    border-radius: 16px;
  }
  .announcement-detail-shell { max-height: calc(100dvh - 20px); }
  .announcement-detail-header { gap: 12px; padding: 18px 17px 14px; }
  .announcement-detail-meta { padding: 10px 17px; }
  .announcement-detail-content { padding: 18px 17px 22px; font-size: 14px; line-height: 1.72; }
  .announcement-detail-content h2 { font-size: 20px; }
  .announcement-detail-content h3 { font-size: 18px; }
  .announcement-detail-footer { min-height: 54px; padding: 10px 17px; }
  .emstudio-view-profile .announcement-composer,
  .emstudio-view-profile .announcement-history { padding: 16px; border-radius: 16px; }
  .emstudio-view-profile .announcement-composer > footer { align-items: flex-start; flex-direction: column; }
  .emstudio-view-profile .announcement-composer > footer > div { width: 100%; justify-content: flex-end; }
  .emstudio-view-profile .announcement-editor { min-height: 150px; }
  .emstudio-view-profile .announcement-item { padding: 14px; }
  .emstudio-view-profile .announcement-item-content,
  .emstudio-view-profile .announcement-item > footer { margin-left: 0; }
  .emstudio-view-profile .announcement-item > header { align-items: flex-start; }
  .emstudio-view-profile .announcement-item h5 { white-space: normal; }
  .emstudio-view-profile .announcement-item > footer { align-items: flex-start; flex-direction: column; }
  .emstudio-view-profile .announcement-item-actions { width: 100%; justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce), (update: slow) {
  .emstudio-view-profile .announcement-title-input,
  .emstudio-view-profile .announcement-editor-tools button,
  .emstudio-view-profile .announcement-cancel-button,
  .emstudio-view-profile .announcement-publish-button,
  .emstudio-view-profile .announcement-item,
  .emstudio-view-profile .announcement-item-actions > button { transition: none; }
}

/* Homepage rhythm: a compact 4 / 8 / 12 / 16 / 24px system keeps the
   fixed rails, content workspace and footer visually aligned. */
body.emstudio-view-home {
  --em-home-space-1: 4px;
  --em-home-space-2: 8px;
  --em-home-space-3: 12px;
  --em-home-space-4: 16px;
  --em-home-space-5: 24px;
  --em-home-type-meta: 11px;
  --em-home-type-label: 13px;
  --em-home-type-body: 14px;
  /* Dashboard-only tokens. Shared application chrome inherits the global
     readable scale so PJAX route changes do not alter its typography. */
  --em-home-type-title: 20px;
  --em-home-type-metric: 30px;
  --em-home-lh-tight: 1.3;
  --em-home-lh-ui: 1.45;
  --em-home-lh-body: 1.65;
}

@media (min-width: 821px) {
  /* Shared sidebar, topbar and action controls use the global readable scale.
     Home-only rules below are limited to the dashboard content itself. */
  body.emstudio-view-home .home-route-view.active {
    gap: var(--em-home-space-4);
    padding-top: var(--em-home-space-2);
  }

  body.emstudio-view-home .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--em-home-space-4);
    margin-top: 0;
  }

  body.emstudio-view-home .stat-card,
  body.emstudio-view-home .stat-card.alert-card {
    min-height: 112px;
    padding: var(--em-home-space-4) 18px;
  }

  body.emstudio-view-home .stat-label {
    color: #d8e2dc;
    font-size: var(--em-home-type-label);
    font-weight: 500;
    line-height: 1.4;
  }

  body.emstudio-view-home .stat-icon,
  body.emstudio-view-home .alert-card .stat-icon {
    width: 38px;
    height: 38px;
  }

  body.emstudio-view-home .alert-card .stat-icon {
    color: var(--red);
    background: rgba(255, 92, 80, .06);
    border-color: rgba(255, 92, 80, .14);
  }

  body.emstudio-view-home .stat-number {
    gap: 6px;
    margin-top: var(--em-home-space-2);
    font-size: var(--em-home-type-metric);
    line-height: 1;
  }

  body.emstudio-view-home .stat-number small {
    color: #9aa89f;
    font-size: var(--em-home-type-meta);
    line-height: 1.3;
  }

  body.emstudio-view-home .stat-trend {
    margin-top: 10px;
    color: #89978e;
    font-size: 12px;
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .board-section {
    margin-top: 0;
  }

  body.emstudio-view-home .board-card {
    margin-top: 0;
    border-radius: 18px;
  }

  body.emstudio-view-home .task-groups {
    padding: var(--em-home-space-3) 0 var(--em-home-space-3) var(--em-home-space-3);
  }

  body.emstudio-view-home .task-group {
    margin-bottom: var(--em-home-space-2);
  }

  body.emstudio-view-home .task-group:last-child {
    margin-bottom: 0;
  }

  body.emstudio-view-home .group-heading {
    height: 38px;
    padding-inline: var(--em-home-space-3);
    font-size: var(--em-home-type-label);
    font-weight: 500;
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .group-count {
    padding: 3px 7px;
    font-size: var(--em-home-type-meta);
    line-height: 1;
  }

  body.emstudio-view-home .task-list {
    gap: 2px;
    padding: 0 6px 6px;
  }

  body.emstudio-view-home .task-row {
    min-height: 32px;
    gap: 6px;
    padding-inline: 7px;
  }

  body.emstudio-view-home .task-name {
    font-size: 12px;
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .task-id,
  body.emstudio-view-home .task-due {
    font-size: var(--em-home-type-meta);
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .file-meta {
    font-size: var(--em-home-type-meta);
    line-height: 1.35;
  }

  body.emstudio-view-home .file-title {
    font-size: clamp(11px, .75vw, 13px);
    font-weight: 600;
    line-height: 1.35;
  }

  body.emstudio-view-home .progress-top {
    font-size: 18px;
    font-weight: 600;
    line-height: var(--em-home-lh-tight);
  }

  body.emstudio-view-home .progress-period {
    font-size: 12px;
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .detail-header {
    min-height: 44px;
    padding: 0 0 var(--em-home-space-4);
  }

  body.emstudio-view-home .detail-header h2 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.35;
  }

  body.emstudio-view-home .detail-id {
    margin-top: 14px;
    color: #9aa89f;
    font-size: var(--em-home-type-meta);
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .detail-title-line {
    margin-top: var(--em-home-space-2);
  }

  body.emstudio-view-home .detail-title-line h3 {
    font-size: var(--em-home-type-title);
    font-weight: 600;
    line-height: var(--em-home-lh-tight);
  }

  body.emstudio-view-home .high-badge,
  body.emstudio-view-home .tag {
    font-size: 12px;
    line-height: 1.3;
  }

  body.emstudio-view-home .detail-description {
    min-height: 0;
    margin: var(--em-home-space-3) 0 14px;
    color: #b1bdb6;
    font-size: var(--em-home-type-body);
    line-height: var(--em-home-lh-body);
  }

  body.emstudio-view-home .detail-list {
    gap: var(--em-home-space-3);
  }

  body.emstudio-view-home .detail-row {
    font-size: var(--em-home-type-label);
    line-height: 1.5;
  }

  body.emstudio-view-home .detail-row dt {
    color: #9aa89f;
  }

  body.emstudio-view-home .detail-row dd {
    color: #dce7e1;
  }

  body.emstudio-view-home .recommendation-header h4 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
  }

  body.emstudio-view-home .recommendation-header > span,
  body.emstudio-view-home .recommendation-list a,
  body.emstudio-view-home .suggestion-button,
  body.emstudio-view-home .detail-button,
  body.emstudio-view-home .complete-button {
    font-size: 12px;
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .detail-actions {
    gap: var(--em-home-space-2);
    padding-top: var(--em-home-space-3);
  }

  body.emstudio-view-home .detail-button,
  body.emstudio-view-home .complete-button {
    min-height: 42px;
  }

  body.emstudio-view-home .home-workspace-frame > .workspace-footer-stack {
    margin-top: var(--em-home-space-4);
  }

  body.emstudio-view-home .footer-monitor {
    padding: var(--em-home-space-3) 14px;
    border-radius: 18px;
  }

  body.emstudio-view-home .footer-monitor-header {
    margin-bottom: 10px;
  }

  body.emstudio-view-home .footer-monitor-header h2 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
  }

  body.emstudio-view-home .footer-monitor-live {
    font-size: var(--em-home-type-meta);
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .footer-monitor-grid {
    gap: var(--em-home-space-2);
  }

  body.emstudio-view-home .footer-monitor-item {
    min-height: 76px;
    padding: 10px;
  }

  body.emstudio-view-home .footer-monitor-item > span {
    font-size: 12px;
    line-height: 1.4;
  }

  body.emstudio-view-home .footer-monitor-item strong {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.1;
  }

  body.emstudio-view-home .footer-monitor-item strong small,
  body.emstudio-view-home .footer-monitor-item strong em,
  body.emstudio-view-home .footer-monitor-item p {
    color: #819087;
    font-size: var(--em-home-type-meta);
    line-height: var(--em-home-lh-ui);
  }

  body.emstudio-view-home .home-workspace-frame > .workspace-footer-stack .site-footer {
    min-height: 48px;
    margin-top: var(--em-home-space-3);
    padding-block: var(--em-home-space-3) var(--em-home-space-2);
    font-size: var(--em-home-type-meta);
    line-height: 1.5;
  }
}

@media (max-width: 820px) {
  body.emstudio-view-home .stats-grid {
    gap: var(--em-home-space-3);
  }
}

/* EmlogStudio 1.6.12: 首页统计卡与个人中心的收口布局。 */
body.emstudio-view-home .stat-card,
body.emstudio-view-home .stat-card.alert-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  grid-template-rows: 38px minmax(0, 1fr) auto 17px;
  min-height: 124px;
  padding: 16px 18px 14px;
}

body.emstudio-view-home .stat-label {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  min-height: 38px;
  align-items: center;
  padding-right: 8px;
}

body.emstudio-view-home .stat-icon,
body.emstudio-view-home .alert-card .stat-icon {
  position: relative;
  top: auto;
  right: auto;
  grid-column: 2;
  grid-row: 1;
  width: 38px;
  min-width: 38px;
  height: 38px;
  min-height: 38px;
  align-self: start;
  justify-self: end;
  box-sizing: border-box;
}

body.emstudio-view-home .stat-number {
  grid-column: 1 / -1;
  grid-row: 3;
  align-self: end;
  margin-top: 0;
}

body.emstudio-view-home .stat-trend {
  grid-column: 1 / -1;
  grid-row: 4;
  min-width: 0;
  min-height: 17px;
  margin: 5px 0 0;
  overflow: hidden;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 统计卡预设：色块本身是纯 CSS，低性能环境不额外增加绘制压力。 */
.deck-fusion-preset-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 2px;
  color: #dce7e0;
  font-size: 12px;
  font-weight: 650;
}

.deck-fusion-preset-heading small {
  color: #7f8d85;
  font-size: 10px;
  font-weight: 400;
}

.deck-fusion-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.deck-fusion-preset {
  display: grid;
  min-width: 0;
  min-height: 58px;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px;
  color: #dfeae3;
  text-align: left;
  background: rgba(255, 255, 255, .018);
  border: 1px solid rgba(226, 244, 234, .09);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.deck-fusion-preset:hover,
.deck-fusion-preset.is-selected {
  background: rgba(var(--accent-rgb), .075);
  border-color: rgba(var(--accent-rgb), .38);
}

.deck-fusion-preset:hover { transform: translateY(-1px); }

.deck-fusion-preset:focus-visible {
  outline: 2px solid rgba(var(--accent-rgb), .72);
  outline-offset: 2px;
}

.deck-fusion-preset-art {
  position: relative;
  display: grid;
  width: 38px;
  height: 38px;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  padding: 3px;
  overflow: hidden;
  background: #08100c;
  border: 1px solid rgba(236, 252, 244, .14);
  border-radius: 9px;
}

.deck-fusion-preset-art::after {
  position: absolute;
  inset: -26% 10% 48% -26%;
  content: "";
  background: linear-gradient(130deg, rgba(255, 255, 255, .42), transparent 61%);
  border-radius: 50%;
  opacity: .45;
  pointer-events: none;
}

.deck-fusion-preset-art i {
  display: block;
  min-width: 0;
  border-radius: 3px;
}

.deck-fusion-preset-art i:nth-child(1) { background: var(--preset-a); }
.deck-fusion-preset-art i:nth-child(2) { background: var(--preset-b); }
.deck-fusion-preset-art i:nth-child(3) { background: var(--preset-c); }
.deck-fusion-preset-art i:nth-child(4) { background: var(--preset-d); }

.deck-fusion-preset-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.deck-fusion-preset-copy b {
  overflow: hidden;
  color: #e6f0ea;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deck-fusion-preset-copy small {
  display: -webkit-box;
  overflow: hidden;
  color: #87938c;
  font-size: 9px;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.emstudio-view-profile .profile-dashboard-content .panel-heading > a,
.emstudio-view-profile .profile-dashboard-content .panel-heading > button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.emstudio-view-profile .profile-favorite-card {
  display: grid;
  min-height: 146px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.emstudio-view-profile .profile-favorite-main {
  display: flex;
  min-height: 113px;
  flex-direction: column;
  padding-right: 0;
}

.emstudio-view-profile .profile-favorite-main p {
  margin-top: auto;
}

.emstudio-view-profile .profile-favorite-actions {
  position: relative;
  top: auto;
  right: auto;
  align-self: start;
  gap: 7px;
}

.emstudio-view-profile .profile-favorite-icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 34px;
  box-sizing: border-box;
}

@media (max-width: 540px) {
  body.emstudio-view-home .stat-card,
  body.emstudio-view-home .stat-card.alert-card {
    min-height: 124px;
    padding: 14px;
  }

  body.emstudio-view-home .stat-icon,
  body.emstudio-view-home .alert-card .stat-icon {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
  }

  body.emstudio-view-home .stat-card {
    grid-template-columns: minmax(0, 1fr) 34px;
    grid-template-rows: 34px minmax(0, 1fr) auto 17px;
  }

  body.emstudio-view-home .stat-label { min-height: 34px; }
}

@media (prefers-reduced-motion: reduce), (update: slow) {
  .deck-fusion-preset { transition: none; }
  .deck-fusion-preset:hover { transform: none; }
}

/* Personal centre: administrator user management ----------------------------------------- */
.emstudio-view-profile .profile-admin-panel-heading {
  align-items: center;
}

.emstudio-view-profile .profile-admin-panel-heading .profile-section-kicker {
  margin-bottom: 4px;
}

.emstudio-view-profile .profile-admin-page-chip {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  color: #9be1b6;
  background: rgba(var(--accent-rgb), .075);
  border: 1px solid rgba(var(--accent-rgb), .19);
  border-radius: 999px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.emstudio-view-profile .profile-admin-page-chip .icon {
  width: 14px;
  height: 14px;
}

.emstudio-view-profile .profile-admin-users {
  overflow: hidden;
  background:
    linear-gradient(142deg, rgba(255, 255, 255, .052), transparent 35%),
    linear-gradient(90deg, rgba(var(--accent-rgb), .028), transparent 33%),
    var(--profile-surface);
  border: 1px solid var(--profile-line);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055), 0 12px 24px rgba(0, 0, 0, .13);
}

.emstudio-view-profile .profile-admin-users.is-unavailable {
  border-color: rgba(244, 190, 112, .22);
}

.emstudio-view-profile .profile-admin-user-head,
.emstudio-view-profile .profile-admin-user-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.25fr) minmax(90px, .55fr) minmax(126px, .72fr) minmax(84px, .46fr) minmax(248px, .94fr);
  column-gap: 15px;
  align-items: center;
}

.emstudio-view-profile .profile-admin-user-head {
  min-height: 42px;
  padding: 0 18px;
  color: #708077;
  background: rgba(255, 255, 255, .024);
  border-bottom: 1px solid rgba(228, 247, 236, .075);
  font-size: 11px;
  letter-spacing: .045em;
}

.emstudio-view-profile .profile-admin-user-list {
  display: grid;
}

.emstudio-view-profile .profile-admin-user-row {
  position: relative;
  min-height: 79px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(228, 247, 236, .072);
  transition: background-color .16s ease;
}

.emstudio-view-profile .profile-admin-user-row:last-child {
  border-bottom: 0;
}

.emstudio-view-profile .profile-admin-user-row:hover {
  background: linear-gradient(90deg, rgba(var(--accent-rgb), .045), transparent 48%);
}

.emstudio-view-profile .profile-admin-user-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.emstudio-view-profile .profile-admin-user-identity > img {
  display: block;
  width: 42px;
  min-width: 42px;
  height: 42px;
  object-fit: cover;
  background: #102016;
  border: 1px solid rgba(var(--accent-rgb), .21);
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .16);
}

.emstudio-view-profile .profile-admin-user-identity > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.emstudio-view-profile .profile-admin-user-identity strong {
  overflow: hidden;
  color: #e3eee6;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emstudio-view-profile .profile-admin-user-identity small {
  overflow: hidden;
  color: #819087;
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emstudio-view-profile .profile-admin-role {
  display: inline-flex;
  width: fit-content;
  min-height: 25px;
  align-items: center;
  padding: 0 8px;
  color: #b7d6c1;
  background: rgba(121, 217, 157, .075);
  border: 1px solid rgba(121, 217, 157, .16);
  border-radius: 8px;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.emstudio-view-profile .profile-admin-registered {
  color: #96a49b;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
}

.emstudio-view-profile .profile-admin-credits {
  color: #f1d488;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.emstudio-view-profile .profile-admin-credit-form {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
}

.emstudio-view-profile .profile-admin-credit-form input[type="number"] {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  color: #dce9e1;
  background: rgba(2, 7, 4, .48);
  border: 1px solid rgba(225, 249, 234, .13);
  border-radius: 9px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  outline: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.emstudio-view-profile .profile-admin-credit-form input[type="number"]::placeholder {
  color: #68776d;
}

.emstudio-view-profile .profile-admin-credit-form input[type="number"]:focus {
  background: rgba(3, 11, 6, .76);
  border-color: rgba(var(--accent-rgb), .48);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .095);
}

.emstudio-view-profile .profile-admin-credit-form input[type="number"]:disabled {
  cursor: not-allowed;
  opacity: .48;
}

.emstudio-view-profile .profile-admin-credit-form button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 10px;
  color: #d9fae5;
  background: rgba(var(--accent-rgb), .105);
  border: 1px solid rgba(var(--accent-rgb), .26);
  border-radius: 9px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 550;
  line-height: 1;
  white-space: nowrap;
  transition: color .15s ease, background-color .15s ease, border-color .15s ease, opacity .15s ease;
}

.emstudio-view-profile .profile-admin-credit-form button .icon {
  width: 14px;
  height: 14px;
}

.emstudio-view-profile .profile-admin-credit-form button:hover,
.emstudio-view-profile .profile-admin-credit-form button:focus-visible {
  color: #f3fff7;
  background: rgba(var(--accent-rgb), .19);
  border-color: rgba(var(--accent-rgb), .53);
  outline: none;
}

.emstudio-view-profile .profile-admin-credit-form button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.emstudio-view-profile .profile-admin-credit-form button.is-pending .icon {
  animation: profile-like-icon-spin .72s linear infinite;
}

.emstudio-view-profile .profile-admin-credit-status {
  display: none;
  grid-column: 1 / -1;
  margin: -1px 0 0;
  color: #84938a;
  font-size: 11px;
  line-height: 1.38;
}

.emstudio-view-profile .profile-admin-credit-status:not(:empty) {
  display: block;
}

.emstudio-view-profile .profile-admin-credit-status.is-error {
  color: #efaaa2;
}

.emstudio-view-profile .profile-admin-credit-status.is-success {
  color: #8ce1ac;
}

.emstudio-view-profile .profile-admin-empty-state {
  padding: 52px 20px;
  background: transparent;
  border: 0;
}

.emstudio-view-profile .profile-admin-empty-state .icon {
  width: 30px;
  height: 30px;
  color: #75d99d;
}

.emstudio-view-profile .profile-admin-pagination {
  margin-top: 12px;
  padding-top: 0;
  border-top: 0;
}

.emstudio-view-profile .profile-admin-pagination a,
.emstudio-view-profile .profile-admin-pagination span {
  min-width: 32px;
  min-height: 32px;
  color: #9baaa1;
  font-size: 12px;
}

.emstudio-view-profile .profile-admin-pagination .profile-admin-page-prev,
.emstudio-view-profile .profile-admin-pagination .profile-admin-page-next {
  padding-inline: 11px;
}

@media (max-width: 1160px) {
  .emstudio-view-profile .profile-admin-user-head,
  .emstudio-view-profile .profile-admin-user-row {
    grid-template-columns: minmax(190px, 1.15fr) minmax(72px, .48fr) minmax(106px, .68fr) minmax(66px, .4fr) minmax(205px, .84fr);
    column-gap: 11px;
  }

  .emstudio-view-profile .profile-admin-user-head,
  .emstudio-view-profile .profile-admin-user-row { padding-inline: 14px; }
  .emstudio-view-profile .profile-admin-credit-form button { padding-inline: 8px; }
}

@media (max-width: 860px) {
  .emstudio-view-profile .profile-admin-user-head { display: none; }

  .emstudio-view-profile .profile-admin-user-row {
    grid-template-columns: minmax(0, 1fr) minmax(95px, auto) minmax(96px, auto);
    gap: 11px 13px;
    padding: 15px;
  }

  .emstudio-view-profile .profile-admin-user-identity {
    grid-column: 1 / -1;
  }

  .emstudio-view-profile .profile-admin-role,
  .emstudio-view-profile .profile-admin-registered,
  .emstudio-view-profile .profile-admin-credits {
    display: grid;
    gap: 3px;
  }

  .emstudio-view-profile .profile-admin-role::before,
  .emstudio-view-profile .profile-admin-registered::before,
  .emstudio-view-profile .profile-admin-credits::before {
    content: attr(data-label);
    color: #6f7e75;
    font-family: var(--font-body);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: .04em;
  }

  .emstudio-view-profile .profile-admin-role {
    width: auto;
    min-height: 0;
    padding: 0;
    color: #b7d6c1;
    background: transparent;
    border: 0;
    border-radius: 0;
    line-height: 1.3;
  }

  .emstudio-view-profile .profile-admin-credit-form {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 180px) auto;
    justify-content: start;
    margin-top: 1px;
  }
}

@media (max-width: 560px) {
  .emstudio-view-profile .profile-admin-panel-heading {
    align-items: flex-start;
  }

  .emstudio-view-profile .profile-admin-page-chip {
    min-height: 28px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .emstudio-view-profile .profile-admin-user-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 13px 9px;
    padding: 14px;
  }

  .emstudio-view-profile .profile-admin-user-identity > img {
    width: 38px;
    min-width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .emstudio-view-profile .profile-admin-user-identity strong { font-size: 13px; }
  .emstudio-view-profile .profile-admin-registered { font-size: 11px; }
  .emstudio-view-profile .profile-admin-credits { font-size: 16px; }

  .emstudio-view-profile .profile-admin-credit-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .emstudio-view-profile .profile-admin-credit-form button span { display: none; }
  .emstudio-view-profile .profile-admin-credit-form button { width: 36px; padding: 0; }
  .emstudio-view-profile .profile-admin-pagination .profile-admin-page-prev,
  .emstudio-view-profile .profile-admin-pagination .profile-admin-page-next { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce), (update: slow) {
  .emstudio-view-profile .profile-admin-user-row,
  .emstudio-view-profile .profile-admin-credit-form input[type="number"],
  .emstudio-view-profile .profile-admin-credit-form button { transition: none; }

  .emstudio-view-profile .profile-admin-credit-form button.is-pending .icon { animation: none; }
}

/* Local rich-text announcement editor ---------------------------------------------------- */
.emstudio-view-profile .announcement-composer-meta {
  display: flex;
  min-width: 0;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.emstudio-view-profile .announcement-editor-count {
  flex: 0 0 auto;
  margin: 0 1px 1px 0;
  color: #77877d;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.emstudio-view-profile .announcement-editor.is-dragging {
  background: rgba(var(--accent-rgb), .08);
  box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .45), 0 0 0 3px rgba(var(--accent-rgb), .07);
}

.emstudio-view-profile .announcement-editor-image {
  display: block;
  max-width: min(100%, 680px);
  max-height: 420px;
  margin: 12px 0;
  border: 1px solid rgba(230, 249, 237, .14);
  border-radius: 10px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .2);
  object-fit: contain;
}

.emstudio-view-profile .announcement-editor-upload-card {
  display: inline-grid;
  grid-template-columns: 46px minmax(0, 1fr) 26px;
  width: min(100%, 390px);
  min-height: 62px;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  padding: 7px 8px;
  vertical-align: top;
  color: #c9d8cf;
  background: linear-gradient(135deg, rgba(var(--accent-rgb), .08), rgba(255, 255, 255, .025));
  border: 1px solid rgba(var(--accent-rgb), .2);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .055);
}

.emstudio-view-profile .announcement-editor-upload-card > img {
  display: block;
  width: 46px;
  height: 46px;
  background: #101812;
  border-radius: 7px;
  object-fit: cover;
}

.emstudio-view-profile .announcement-editor-upload-card > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.emstudio-view-profile .announcement-editor-upload-card strong {
  overflow: hidden;
  color: #e7f2eb;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.emstudio-view-profile .announcement-editor-upload-card small {
  color: #8fa398;
  font-size: 11px;
  line-height: 1.28;
}

.emstudio-view-profile .announcement-editor-upload-card.is-uploading small {
  color: #9aefbb;
}

.emstudio-view-profile .announcement-editor-upload-card.is-error {
  background: rgba(239, 103, 91, .075);
  border-color: rgba(239, 103, 91, .28);
}

.emstudio-view-profile .announcement-editor-upload-card.is-error small {
  color: #ffb5ad;
}

.emstudio-view-profile .announcement-editor-upload-remove {
  display: inline-grid;
  width: 24px;
  height: 24px;
  place-items: center;
  padding: 0;
  color: #aabbb0;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(230, 249, 237, .12);
  border-radius: 7px;
  cursor: pointer;
  font-size: 17px;
  line-height: 1;
}

.emstudio-view-profile .announcement-editor-upload-remove:hover,
.emstudio-view-profile .announcement-editor-upload-remove:focus-visible {
  color: #ffe0da;
  background: rgba(239, 103, 91, .12);
  border-color: rgba(239, 103, 91, .36);
  outline: none;
}

.emstudio-view-profile .announcement-composer.is-editor-locked .announcement-editor,
.emstudio-view-profile .announcement-composer.is-editor-locked .announcement-editor-tools {
  opacity: .64;
}

.emstudio-view-profile .announcement-editor-tools button:disabled {
  cursor: wait;
  opacity: .5;
}

.emstudio-view-profile .announcement-composer-state.is-uploading {
  color: #aef7c8;
  background: rgba(var(--accent-rgb), .11);
  border-color: rgba(var(--accent-rgb), .28);
}

.emstudio-view-profile .announcement-composer-state.is-saving {
  color: #d9e7df;
  background: rgba(157, 179, 166, .09);
  border-color: rgba(192, 218, 203, .18);
}

.emstudio-view-profile .announcement-form-status.is-error,
.emstudio-view-profile .announcement-history-status.is-error { color: #ffaaa0; }
.emstudio-view-profile .announcement-form-status.is-success,
.emstudio-view-profile .announcement-history-status.is-success { color: #9cf2bc; }
.emstudio-view-profile .announcement-form-status.is-loading,
.emstudio-view-profile .announcement-history-status.is-loading { color: #c5d5cb; }

.announcement-link-dialog {
  width: min(440px, calc(100vw - 28px));
  max-width: none;
  padding: 0;
  overflow: hidden;
  color: #e6f1e9;
  background:
    radial-gradient(circle at 88% 6%, rgba(var(--accent-rgb), .15), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .065), transparent 48%),
    #0b120e;
  border: 1px solid rgba(230, 249, 237, .18);
  border-radius: 17px;
  box-shadow: 0 24px 58px rgba(0, 0, 0, .48), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.announcement-link-dialog::backdrop {
  background: rgba(0, 5, 2, .72);
  backdrop-filter: blur(3px);
}

.announcement-link-dialog form { display: grid; gap: 15px; padding: 20px; }

.announcement-link-dialog header,
.announcement-link-dialog footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.announcement-link-dialog header > div { min-width: 0; }
.announcement-link-dialog header span { display: block; color: #78dca0; font-size: 11px; letter-spacing: .08em; }
.announcement-link-dialog header h2 { margin: 3px 0 0; color: #f0faf3; font-family: var(--font-display); font-size: 18px; font-weight: 600; }

.announcement-link-dialog label {
  display: grid;
  gap: 6px;
  color: #b9c9bf;
  font-size: 12px;
}

.announcement-link-dialog input {
  width: 100%;
  min-height: 39px;
  padding: 0 11px;
  color: #ebf6ee;
  outline: none;
  background: rgba(1, 6, 3, .54);
  border: 1px solid rgba(229, 249, 237, .13);
  border-radius: 9px;
  font-size: 13px;
}

.announcement-link-dialog input:focus {
  border-color: rgba(var(--accent-rgb), .48);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .08);
}

.announcement-link-dialog [data-announcement-link-error] {
  min-height: 16px;
  margin: -5px 0 0;
  color: #ffaaa0;
  font-size: 12px;
}

.announcement-link-dialog header button,
.announcement-link-dialog footer button {
  min-height: 33px;
  padding: 0 11px;
  color: #b7c8bd;
  background: rgba(255, 255, 255, .035);
  border: 1px solid rgba(229, 249, 237, .12);
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}

.announcement-link-dialog header button {
  display: inline-grid;
  width: 28px;
  height: 28px;
  min-height: 0;
  place-items: center;
  padding: 0;
  font-size: 17px;
}

.announcement-link-dialog footer button[type="submit"] {
  color: #effff4;
  background: rgba(var(--accent-rgb), .15);
  border-color: rgba(var(--accent-rgb), .36);
}

.announcement-link-dialog button:hover,
.announcement-link-dialog button:focus-visible {
  color: #fff;
  background: rgba(var(--accent-rgb), .14);
  border-color: rgba(var(--accent-rgb), .35);
  outline: none;
}

@media (max-width: 560px) {
  .emstudio-view-profile .announcement-composer > footer,
  .emstudio-view-profile .announcement-composer-meta {
    align-items: stretch;
    flex-direction: column;
  }

  .emstudio-view-profile .announcement-composer > footer > div { justify-content: flex-end; }
  .emstudio-view-profile .announcement-editor-count { align-self: flex-end; }
  .emstudio-view-profile .announcement-tool-separator { height: 16px; }
  .announcement-link-dialog form { padding: 17px; }
}

@media (prefers-reduced-motion: reduce), (update: slow) {
  .emstudio-view-profile .announcement-editor-upload-card,
  .emstudio-view-profile .announcement-editor-upload-remove,
  .announcement-link-dialog input,
  .announcement-link-dialog button { transition: none; }
}

/* EmlogStudio 1.0.1: profile dashboard layout ------------------------------------------ */
.emstudio-view-profile .profile-dashboard-layout {
  grid-template-columns: minmax(0, 1fr) clamp(230px, 18vw, 360px);
}

.emstudio-view-profile .profile-dashboard-layout > .profile-dashboard-content {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.emstudio-view-profile .profile-dashboard-layout > .profile-dashboard-nav {
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  align-self: start;
}

/* Keep the leading navigation glyph tied to the label when the menu moves right. */
.emstudio-view-profile .profile-dashboard-nav button > .icon:first-child,
.emstudio-view-profile .profile-dashboard-nav .logout-item > .icon:first-child {
  flex: 0 0 16px;
  order: 0;
}

.emstudio-view-profile .profile-dashboard-nav button > span,
.emstudio-view-profile .profile-dashboard-nav .logout-item > span {
  min-width: 0;
  order: 1;
  text-align: left;
}

.emstudio-view-profile .profile-dashboard-nav .profile-nav-arrow {
  flex: 0 0 14px;
  order: -1;
  margin-right: 0;
  margin-left: 0;
}

.emstudio-view-profile .profile-dashboard-nav button.active .profile-nav-arrow {
  transform: translateX(-2px);
}

/* Non-overview panels start with their actual content. The post action remains available. */
.emstudio-view-profile .profile-dashboard-content > .profile-panel--direct > .panel-heading {
  display: none;
}

.emstudio-view-profile .profile-dashboard-content > .profile-panel--direct.profile-panel--has-actions > .panel-heading {
  display: flex;
  min-height: 34px;
  justify-content: flex-end;
  padding: 0 0 10px;
}

.emstudio-view-profile .profile-dashboard-content > .profile-panel--direct.profile-panel--has-actions > .panel-heading > div {
  display: none;
}

.emstudio-view-profile .profile-dashboard-content > .profile-panel--direct.profile-panel--has-actions > .panel-heading > a {
  margin-left: auto;
}

/* Keep the single-column About page and its timeline aligned with the content grid. */
.about-hero > div:only-child {
  grid-column: 1 / -1;
  min-width: 0;
}

.site-timeline {
  grid-template-columns: 150px repeat(2, minmax(0, 1fr));
}

@media (max-width: 760px) {
  .emstudio-view-profile .profile-dashboard-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .emstudio-view-profile .profile-dashboard-layout > .profile-dashboard-nav,
  .emstudio-view-profile .profile-dashboard-layout > .profile-dashboard-content {
    grid-column: auto;
    grid-row: auto;
  }

  .emstudio-view-profile .profile-dashboard-content > .profile-panel--direct.profile-panel--has-actions > .panel-heading {
    padding-bottom: 8px;
  }
}
