/*
 * EmlogStudio theme styles
 * Local assets only; compatible with the PHP 7.4+ 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;
      background: var(--bg);
    }

    body {
      min-height: 100vh;
      margin: 0;
      color: var(--text);
      font-family: var(--font-body);
      font-size: var(--font-md);
      background:
        radial-gradient(circle at 78% 12%, rgba(16, 101, 59, 0.08), transparent 32%),
        #020403;
      overflow-x: hidden;
    }

    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 {
      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;
    }

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

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

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

    @media (forced-colors: active) {
      html.emstudio-pjax-loading::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;
    }

    .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 {
      margin: 10px 0;
      color: #77817c;
      font-size: 9px;
      line-height: 1.7;
    }

    .comment-list a {
      color: #4da878;
      font-size: 8px;
      text-decoration: 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 {
      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,
    .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: 39px;
        padding: 0;
        justify-content: center;
      }

      .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;
      }
    }

    @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);
}

.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 > .sidebar,
  .home-viewport-shell > .detail-panel {
    height: 100%;
    min-height: 0;
  }

  .home-workspace-frame {
    display: grid;
    height: 100%;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  .home-route-view.active {
    display: grid;
    min-height: 0;
    align-content: start;
    padding-right: 4px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(var(--accent-rgb), .28) transparent;
    scrollbar-width: thin;
  }

  .home-route-view::-webkit-scrollbar { width: 5px; }
  .home-route-view::-webkit-scrollbar-thumb {
    background: rgba(var(--accent-rgb), .24);
    border-radius: 99px;
  }

  .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 .progress-document {
    top: clamp(12px, var(--deck-preview-y, 31px), calc(100% - 217px));
  }

  .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;
  }
}

@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-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;
  }
}
