:root,
html.light {
  --hz-surface-container-low: #eff4ff;
  --hz-on-tertiary-container: #ffeedd;
  --hz-on-secondary-fixed: #002113;
  --hz-on-surface-variant: #434655;
  --hz-secondary-container: #6cf8bb;
  --hz-on-primary: #ffffff;
  --hz-surface-bright: #fbf6f3;
  --hz-on-primary-fixed-variant: #003ea8;
  --hz-error-container: #ffdad6;
  --hz-on-secondary: #ffffff;
  --hz-on-tertiary-fixed: #2a1700;
  --hz-error: #ba1a1a;
  --hz-on-surface: #130600;
  --hz-on-tertiary: #ffffff;
  --hz-surface-container-highest: #d3e4fe;
  --hz-secondary-fixed-dim: #4edea3;
  --hz-on-tertiary-fixed-variant: #653e00;
  --hz-primary: #c43d00;
  --hz-surface-container-lowest: #ffffff;
  --hz-primary-fixed-dim: #f9c4ae;
  --hz-on-primary-container: #fff7f3;
  --hz-tertiary-container: #996100;
  --hz-tertiary: #784b00;
  --hz-inverse-primary: #f9c4ae;
  --hz-outline: #737686;
  --hz-surface-variant: #d3e4fe;
  --hz-on-error-container: #93000a;
  --hz-surface: #fbf6f3;
  --hz-on-secondary-fixed-variant: #005236;
  --hz-primary-container: #ff5300;
  --hz-primary-fixed: #dbe1ff;
  --hz-secondary-fixed: #6ffbbe;
  --hz-surface-dim: #cbdbf5;
  --hz-on-primary-fixed: #00174b;
  --hz-surface-container-high: #dce9ff;
  --hz-inverse-on-surface: #fce3d8;
  --hz-on-error: #ffffff;
  --hz-surface-container: #e5eeff;
  --hz-tertiary-fixed-dim: #ffb95f;
  --hz-surface-tint: #0053db;
  --hz-inverse-surface: #213145;
  --hz-on-secondary-container: #00714d;
  --hz-tertiary-fixed: #ffddb8;
  --hz-secondary: #006c49;
  --hz-outline-variant: #c3c6d7;
  --hz-on-background: #130600;
  --hz-background: #fbf6f3;
  color-scheme: light;
}

html.dark {
  --hz-surface-container-low: #152338;
  --hz-on-tertiary-container: #ffddb8;
  --hz-on-secondary-fixed: #002113;
  --hz-on-surface-variant: #a8b0c4;
  --hz-secondary-container: #005236;
  --hz-on-primary: #ffffff;
  --hz-surface-bright: #0f1a2b;
  --hz-on-primary-fixed-variant: #f9c4ae;
  --hz-error-container: #93000a;
  --hz-on-secondary: #ffffff;
  --hz-on-tertiary-fixed: #2a1700;
  --hz-error: #ffb4ab;
  --hz-on-surface: #fce3d8;
  --hz-on-tertiary: #ffffff;
  --hz-surface-container-highest: #2a3b52;
  --hz-secondary-fixed-dim: #4edea3;
  --hz-on-tertiary-fixed-variant: #ffb95f;
  
  --hz-primary: #ff5300;
  --hz-surface-container-lowest: #1b0b03;
  --hz-primary-fixed-dim: #8aa4ff;
  --hz-on-primary-container: #fff7f3;
  --hz-tertiary-container: #996100;
  --hz-tertiary: #ffb95f;
  --hz-inverse-primary: #f9c4ae;
  --hz-outline: #5c6478;
  --hz-surface-variant: #2a3b52;
  --hz-on-error-container: #ffdad6;
  --hz-surface: #0f1a2b;
  --hz-on-secondary-fixed-variant: #6cf8bb;
  --hz-primary-container: #ff5300;
  --hz-primary-fixed: #00174b;
  --hz-secondary-fixed: #003824;
  --hz-surface-dim: #0a1220;
  --hz-on-primary-fixed: #dbe1ff;
  --hz-surface-container-high: #1c2d44;
  --hz-inverse-on-surface: #130600;
  --hz-on-error: #690005;
  --hz-surface-container: #152338;
  --hz-tertiary-fixed-dim: #ffb95f;
  --hz-surface-tint: #ff7433;
  --hz-inverse-surface: #fce3d8;
  --hz-on-secondary-container: #6cf8bb;
  --hz-tertiary-fixed: #2a1700;
  --hz-secondary: #4edea3;
  
  --hz-outline-variant: #243247;
  --hz-on-background: #fce3d8;
  --hz-background: #0f1a2b;
  color-scheme: dark;
}

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--hz-background);
  color: var(--hz-on-surface);
}

.card-shadow {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

.feed-card-shadow {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

.quest-feed-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quest-feed-card:hover {
  transform: translateY(-2px);
}

html.dark .card-shadow,
html.dark .feed-card-shadow {
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.45), 0 2px 4px -2px rgb(0 0 0 / 0.35);
}

.glass-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

html.dark .glass-card {
  background: rgba(15, 26, 43, 0.75);
  border: 1px solid rgba(195, 198, 215, 0.12);
}

.shadow-soft {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

html.dark .shadow-soft {
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.35), 0 2px 4px -2px rgb(0 0 0 / 0.25);
}

.dash-v2 .glass-card {
  border: none;
}


.page-section:has(#page-dashboard:not(.hidden-page)) {
  padding-top: 12px;
  padding-bottom: 12px;
}

@media (min-width: 640px) {
  .page-section:has(#page-dashboard:not(.hidden-page)) {
    padding-top: 16px;
    padding-bottom: 16px;
  }
}

.dash-v2 .dash-hero {
  min-height: 0;
  border: none;
  isolation: isolate;
  background-color: var(--hz-primary);
  background-image:
    repeating-linear-gradient(
      -60deg,
      rgba(255, 255, 255, 0.05) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.12) 3px 4px,
      transparent 4px 6px
    ),
    repeating-linear-gradient(
      30deg,
      rgba(255, 255, 255, 0.035) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.1) 3px 4px,
      transparent 4px 6px
    ),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--hz-primary) 55%, #061a4a) 0%,
      var(--hz-primary) 48%,
      color-mix(in srgb, var(--hz-primary) 72%, #7eb6ff) 100%
    );
  background-size: 7px 7px, 7px 7px, auto;
  box-shadow:
    0 10px 28px -8px color-mix(in srgb, var(--hz-primary) 45%, transparent),
    0 4px 10px -4px color-mix(in srgb, var(--hz-primary) 25%, transparent),
    inset 0 1px 0 rgb(255 255 255 / 0.12);
}

html.dark .dash-v2 .dash-hero {
  border: none !important;
  background-color: var(--hz-primary);
  background-image:
    repeating-linear-gradient(
      -60deg,
      rgba(255, 255, 255, 0.045) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.18) 3px 4px,
      transparent 4px 6px
    ),
    repeating-linear-gradient(
      30deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.14) 3px 4px,
      transparent 4px 6px
    ),
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--hz-primary) 50%, #020b24) 0%,
      var(--hz-primary) 46%,
      color-mix(in srgb, var(--hz-primary) 78%, #5a9fff) 100%
    );
  background-size: 7px 7px, 7px 7px, auto;
  box-shadow:
    0 10px 28px -8px rgb(0 0 0 / 0.45),
    0 4px 10px -4px color-mix(in srgb, var(--hz-primary) 35%, transparent),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
}

.dash-v2 .dash-hero-highlight {
  display: inline;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 0.12em 0.55em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  text-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background: #e6d9d3;
  border-radius: 10px;
}

html.dark .custom-scrollbar::-webkit-scrollbar-thumb {
  background: #3a4558;
}


.goals-tabs-pager {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.goals-module-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  max-width: 100%;
  padding: 4px;
  border-radius: 18px;
  background: color-mix(in srgb, var(--hz-surface-container-low, #e8eef7) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant, #c5cdd8) 55%, transparent);
  box-sizing: border-box;
}

html.dark .goals-module-rail {
  background: color-mix(in srgb, #0d1c2d 88%, transparent);
  border-color: rgba(255, 255, 255, 0.08);
}

.goals-module-carousel {
  display: none;
}

.goals-module-pill {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px 7px;
  border-radius: 14px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--hz-on-surface-variant, #8a756c);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
}

.goals-module-pill-icon {
  font-size: 20px !important;
  line-height: 1;
  opacity: 0.92;
}

.goals-module-pill-text {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.goals-module-pill.is-active {
  background: linear-gradient(160deg, #ff7433, #ff5300 55%, #a33200);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(255, 83, 0, 0.65);
  transform: translateY(-1px);
}

.goals-module-pill.is-active .goals-module-pill-icon {
  opacity: 1;
}

.goals-module-pill:not(.is-active):active {
  background: color-mix(in srgb, var(--hz-primary, #ff5300) 10%, transparent);
}

.goals-tabs-arrow {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--hz-outline-variant, rgba(255, 255, 255, 0.35));
  background: var(--hz-surface-container-lowest, #fff);
  color: var(--hz-on-surface, inherit);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.goals-tabs-arrow .material-symbols-outlined {
  font-size: 24px;
}

.goals-tabs-current {
  min-width: 0;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--hz-primary, #ff5300);
  background: color-mix(in srgb, var(--hz-primary, #ff5300) 16%, transparent);
  color: var(--hz-on-surface, inherit);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  font-weight: 700;
  font-size: 15px;
}

.goals-tabs-current-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.goals-tabs-dots {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: -8px;
}

.goals-tab-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hz-on-surface-variant, #b5a197) 55%, transparent);
  cursor: pointer;
}

.goals-tab-dot.is-active {
  width: 18px;
  background: var(--hz-primary, #ff5300);
}

.goals-tabs-desktop {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
}

.goals-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--hz-outline-variant, rgba(255, 255, 255, 0.35));
  background: var(--hz-surface-container-lowest, #fff);
  color: var(--hz-on-surface, inherit);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.goals-tab-icon {
  font-size: 18px !important;
  line-height: 1;
}

.goals-tab.is-active {
  background: var(--hz-primary, #ff5300);
  border-color: var(--hz-primary, #ff5300);
  color: var(--hz-on-primary, #fff);
}

html.dark .goals-tabs-arrow,
html.dark .goals-tab:not(.is-active) {
  background: var(--hz-surface-container-lowest);
  border-color: rgba(255, 255, 255, 0.18);
}

html.dark .goals-tabs-current {
  border-color: var(--hz-primary, #ff5300);
}

@media (min-width: 768px) {
  .goals-tabs-pager,
  .goals-tabs-dots,
  .goals-module-carousel,
  .goals-module-rail {
    display: none !important;
  }

  .goals-tabs-desktop {
    display: flex;
  }
}

.chart-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

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

.animate-fade-in {
  animation: fade-in 0.35s ease-out;
}

.nav-link.active {
  background-color: #ff5300 !important;
  color: #fff7f3 !important;
  border-left: 3px solid #c43d00;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
}

html.dark .nav-link.active {
  border-left-color: #f9c4ae;
}

html.dark .glass-card {
  background: rgba(31, 14, 5, 0.85);
  border: 1px solid rgba(42, 23, 12, 0.9);
}

html.dark .dash-v2 .glass-card {
  border: none;
}


html.dark .dash-v2 .bg-surface-container-lowest,
html.dark .dash-v2 [class*='border-outline-variant'] {
  border-color: rgba(42, 23, 12, 0.85) !important;
}

html.dark .dash-v2 .border-white\/80,
html.dark .dash-v2 .border-white,
html.dark .dash-v2 .border-white\/30 {
  border-color: rgba(42, 23, 12, 0.85) !important;
}


html.dark [class*='border-outline-variant'],
html.dark .border-outline-variant,
html.dark .border-outline {
  border-color: rgba(255, 255, 255, 0.14) !important;
}

html.dark .sidebar,
html.dark .sidebar [class*='border-outline'],
html.dark nav.border-t,
html.dark header [class*='border-outline'] {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.nav-link.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
  color: #fff7f3;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sidebar-nav .nav-link {
  line-height: 1.25;
}


:root {
  --sidebar-width: 14rem;
  --sidebar-width-collapsed: 4rem;
}

@media (min-width: 768px) {
  .sidebar {
    width: var(--sidebar-width);
    transition: width 0.22s ease;
    overflow: visible;
  }

  .app-main {
    margin-left: var(--sidebar-width);
    transition: margin-left 0.22s ease;
  }
}

body.sidebar-collapsed {
  --sidebar-width: var(--sidebar-width-collapsed);
}

.sidebar-collapse-btn {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 60;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 80%, transparent);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface-variant);
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  box-shadow: 0 1px 4px rgba(19, 6, 0, 0.1);
}

@media (min-width: 768px) {
  .sidebar-collapse-btn {
    display: flex;
  }

  .sidebar:hover .sidebar-collapse-btn,
  .sidebar-collapse-btn:focus-visible {
    opacity: 1;
    pointer-events: auto;
  }
}

.sidebar-collapse-btn:hover {
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
  border-color: var(--hz-outline-variant);
  box-shadow: 0 2px 8px rgba(19, 6, 0, 0.14);
}

.sidebar-collapse-btn .material-symbols-outlined {
  font-size: 16px;
  line-height: 1;
}

body.sidebar-collapsed .sidebar-brand > div {
  display: none;
}

body.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding-inline: 0.5rem;
}

body.sidebar-collapsed .sidebar-nav .nav-link {
  position: relative;
  justify-content: center;
  gap: 0;
  padding-inline: 0.75rem;
  overflow: hidden;
  font-size: 0;
  color: transparent;
}

body.sidebar-collapsed .sidebar-nav .nav-link .material-symbols-outlined {
  font-size: 20px;
  color: var(--hz-on-surface-variant);
}

body.sidebar-collapsed .nav-link.active .material-symbols-outlined {
  color: #fff7f3;
}

body.sidebar-collapsed .sidebar-nav .nav-link #tasks-badge {
  position: absolute;
  top: 6px;
  right: 8px;
  min-width: 8px;
  width: 8px;
  height: 8px;
  padding: 0;
  font-size: 0;
  margin: 0;
}

body.sidebar-collapsed .sidebar-footer button {
  justify-content: center;
  font-size: 0;
  color: transparent;
  gap: 0;
  padding-inline: 0.75rem;
}

body.sidebar-collapsed .sidebar-footer button .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}

body.sidebar-collapsed .sidebar-footer #btn-new-entry .material-symbols-outlined {
  color: var(--hz-on-primary);
}

.app-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(255, 83, 0, 0.25);
}

#mobile-drawer .mobile-drawer-panel {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

#mobile-drawer .mobile-drawer-head {
  padding-top: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  margin-bottom: 8px;
}

#mobile-drawer .mobile-drawer-nav .nav-link {
  color: var(--hz-on-surface-variant);
}

#mobile-drawer .mobile-drawer-nav .nav-link.active,
#mobile-drawer .mobile-drawer-nav .nav-link[aria-current="page"] {
  background: var(--hz-primary);
  color: var(--hz-on-primary);
}

#mobile-drawer .mobile-drawer-foot {
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

.mobile-nav-item.active {
  color: #c43d00;
  font-weight: 700;
}

html:not(.dark) .mobile-nav-item:not(.active) {
  color: #2a170c;
}

html.dark .mobile-nav-item.active {
  color: #f9c4ae;
}

.mobile-nav-item.active .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

.modal-backdrop {
  background: rgba(19, 6, 0, 0.45);
  backdrop-filter: blur(4px);
  overscroll-behavior: contain;
  touch-action: none;
}

.modal-backdrop #modal-panel,
.modal-backdrop [role="dialog"] {
  touch-action: auto;
  overscroll-behavior: contain;
}

html.dark .modal-backdrop {
  background: rgba(0, 0, 0, 0.65);
}


#media-viewer-root {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: auto;
}

.media-viewer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.media-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(6px);
}

.media-viewer-panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
}

.media-viewer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fff;
  padding: 4px 4px 12px;
  flex-shrink: 0;
}

.media-viewer-body {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  overflow: auto;
  background: #0b1220;
  padding: 8px;
}

.media-viewer-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  background: #fff;
  border-radius: 8px;
}

.media-viewer-frame {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  border-radius: 12px;
}


#modal-root {
  position: relative;
  z-index: 400;
}

.profile-onboard-layer {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  pointer-events: auto;
}

@media (min-width: 640px) {
  .profile-onboard-layer {
    align-items: center;
  }
}

.profile-onboard-scrim {
  position: absolute;
  inset: 0;
  background: rgba(19, 6, 0, 0.55);
  backdrop-filter: blur(4px);
}

.profile-onboard-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 28rem;
  pointer-events: auto;
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  border-radius: 16px;
  border: 1px solid var(--hz-outline-variant);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.priority-high { border-left: 4px solid #ba1a1a; }
.priority-medium { border-left: 4px solid #996100; }
.priority-low { border-left: 4px solid #006c49; }


.priority-chip-medium {
  background: #ffedd5;
  color: #9a3412;
}

html.dark .priority-chip-medium {
  background: rgba(255, 185, 95, 0.18);
  color: #ffb95f;
}

html.dark .priority-medium {
  border-left-color: #ffb95f;
}

.task-done {
  opacity: 0.55;
  text-decoration: line-through;
}

.task-overdue {
  border-color: rgba(186, 26, 26, 0.35);
  background: linear-gradient(0deg, rgba(186, 26, 26, 0.04), rgba(186, 26, 26, 0.04)),
    var(--hz-surface-container-lowest, #fff);
}

.task-overdue-flag {
  background: var(--hz-error-container, #ffdad6);
  color: var(--hz-on-error-container, #410002);
}

html.dark .task-overdue {
  border-color: rgba(255, 180, 171, 0.35);
  background: linear-gradient(0deg, rgba(186, 26, 26, 0.12), rgba(186, 26, 26, 0.12)),
    var(--hz-surface-container-lowest, #1a1a1a);
}

html.dark .task-overdue-flag {
  background: rgba(186, 26, 26, 0.35);
  color: #ffdad6;
}

.calendar-day {
  min-height: 88px;
}

.calendar-day.today {
  outline: 2px solid #ff5300;
  outline-offset: -2px;
}





.agenda-mtg-feed {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 8px 0 32px;
  width: 100%;
  max-width: none;
}
.agenda-mtg-day-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.agenda-mtg-day-title {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hz-on-surface);
}
.agenda-mtg-today-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--hz-primary) 14%, transparent);
  color: var(--hz-primary);
  font-size: 11px;
  font-weight: 700;
}
.agenda-mtg-now-line {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 2px 0 10px;
  pointer-events: none;
}
.agenda-mtg-now-time {
  font-size: 11px;
  font-weight: 700;
  color: #f97316;
  white-space: nowrap;
  padding-left: 16px;
}
.agenda-mtg-now-bar {
  position: relative;
  height: 2px;
  margin-right: 16px;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 0 0 1px color-mix(in srgb, #f97316 20%, transparent);
}
.agenda-mtg-now-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f97316;
}
.agenda-mtg-day-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agenda-mtg-empty {
  padding: 18px 16px;
  border-radius: 12px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface-variant);
  font-size: 14px;
}
.agenda-mtg-empty-feed {
  padding: 40px 16px;
  text-align: center;
  color: var(--hz-on-surface-variant);
  font-size: 14px;
}
.agenda-mtg-card {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.agenda-mtg-card:hover {
  background: var(--hz-surface-container);
}
.agenda-mtg-card.is-selected {
  border-color: var(--hz-primary);
  background: color-mix(in srgb, var(--hz-primary) 10%, var(--hz-surface-container-lowest));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hz-primary) 35%, transparent);
}
.agenda-mtg-card.has-conflict {
  border-color: color-mix(in srgb, var(--hz-error) 45%, var(--hz-outline-variant));
}
.agenda-mtg-time {
  font-size: 13px;
  font-weight: 500;
  color: var(--hz-on-surface-variant);
  padding-top: 2px;
  white-space: nowrap;
}
.agenda-mtg-body {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
.agenda-mtg-dot {
  width: 10px;
  height: 10px;
  margin-top: 5px;
  border-radius: 999px;
  background: #7c3aed;
  flex-shrink: 0;
}
.agenda-mtg-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--hz-on-surface);
  line-height: 1.3;
}
.agenda-mtg-meta {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--hz-on-surface-variant);
}
.agenda-mtg-conflict {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--hz-error);
  display: flex;
  align-items: center;
  gap: 6px;
}
.agenda-mtg-side {
  margin-left: auto;
  flex-shrink: 0;
}
.agenda-mtg-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 8px;
}
.agenda-mtg-more {
  min-width: 220px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-mtg-more:hover {
  background: var(--hz-surface-container);
}
@media (max-width: 640px) {
  .agenda-mtg-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .agenda-mtg-day-title { font-size: 18px; }
}


#page-agenda {
  --agenda-drawer-width: 400px;
  position: relative;
}
#page-agenda.has-drawer .agenda-meetings-header,
#page-agenda.has-drawer .agenda-mtg-feed {
  max-width: calc(100% - var(--agenda-drawer-width));
  padding-right: 12px;
}
.agenda-ed-backdrop {
  display: none;
}
.agenda-event-drawer {
  position: fixed;
  right: 0;
  width: var(--agenda-drawer-width);
  z-index: 45;
  border-left: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  padding: 20px 22px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  box-shadow: -4px 0 24px rgba(19, 6, 0, 0.06);
}
@media (max-width: 960px) {
  #page-agenda.has-drawer .agenda-meetings-header,
  #page-agenda.has-drawer .agenda-mtg-feed {
    max-width: none;
    padding-right: 0;
  }
  .agenda-ed-backdrop {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    z-index: 44;
    background: rgba(19, 6, 0, 0.35);
    border: none;
    cursor: pointer;
  }
  .agenda-event-drawer {
    z-index: 46;
    width: min(100%, 420px);
    box-shadow: -8px 0 32px rgba(19, 6, 0, 0.12);
  }
}

.agenda-create-drawer {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
}
.agenda-cr-header {
  padding-right: 36px;
  margin-bottom: 8px;
}
.agenda-cr-kicker {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--hz-on-surface-variant) 85%, var(--hz-on-surface));
}
html.dark .agenda-cr-kicker {
  color: color-mix(in srgb, var(--hz-on-surface) 84%, var(--hz-on-surface-variant));
}
.agenda-cr-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.agenda-cr-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #7c3aed;
  flex-shrink: 0;
}
.agenda-create-drawer input.agenda-cr-title-input,
.agenda-cr-title-input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background-color: transparent !important;
  padding: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hz-on-surface) !important;
  line-height: 1.2;
  box-shadow: none !important;
  --tw-ring-shadow: 0 0 #0000 !important;
  --tw-ring-offset-shadow: 0 0 #0000 !important;
  -webkit-text-fill-color: var(--hz-on-surface);
}
html.dark .agenda-create-drawer input.agenda-cr-title-input,
html.dark .agenda-cr-title-input {
  background-color: transparent !important;
  color: var(--hz-on-surface) !important;
  -webkit-text-fill-color: var(--hz-on-surface);
}
.agenda-cr-title-input:focus {
  outline: none;
}
.agenda-cr-subtitle {
  margin: 6px 0 0 22px;
  font-size: 14px;
  font-weight: 500;
  color: color-mix(in srgb, var(--hz-on-surface-variant) 88%, var(--hz-on-surface));
}
html.dark .agenda-cr-subtitle {
  color: color-mix(in srgb, var(--hz-on-surface) 78%, var(--hz-on-surface-variant));
}
.agenda-cr-sections {
  flex: 1;
  overflow-y: auto;
  margin: 8px -22px 0;
  padding: 0 22px 16px;
}
.agenda-cr-section {
  border-bottom: 1px solid var(--hz-outline-variant);
  padding: 14px 0;
}
.agenda-cr-section-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.agenda-cr-section-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--hz-on-surface);
}
.agenda-cr-chevron {
  font-size: 22px;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-section-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 14px;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-section-summary .material-symbols-outlined {
  font-size: 18px;
}
.agenda-cr-section.is-open .agenda-cr-section-summary {
  display: none;
}
.agenda-cr-section-body {
  display: none;
  margin-top: 12px;
}
.agenda-cr-section.is-open .agenda-cr-section-body {
  display: block;
}
.agenda-cr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.agenda-cr-chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-cr-chip.is-active {
  border-color: #ff5300;
  color: #ff5300;
  background: color-mix(in srgb, #ff5300 8%, transparent);
}
.agenda-cr-loc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.agenda-cr-loc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-cr-loc-btn .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-loc-btn.is-active {
  border-color: #ff5300;
  color: #ff5300;
  background: color-mix(in srgb, #ff5300 8%, transparent);
}
.agenda-cr-loc-btn.is-active .material-symbols-outlined {
  color: #ff5300;
}
.agenda-cr-loc-selected {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 8px 10px 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
}
.agenda-cr-loc-selected .material-symbols-outlined {
  font-size: 20px;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-loc-selected-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--hz-on-surface);
}
.agenda-cr-loc-clear {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--hz-on-surface-variant);
  cursor: pointer;
}
.agenda-cr-loc-clear:hover {
  background: var(--hz-surface-container);
  color: var(--hz-on-surface);
}
.agenda-cr-loc-clear .material-symbols-outlined {
  font-size: 18px;
}
.agenda-cr-loc-nested {
  margin-top: 12px;
  padding-left: 14px;
  border-left: 2px solid var(--hz-outline-variant);
}
.agenda-cr-loc-address-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--hz-on-surface);
}
.agenda-cr-loc-address {
  display: block;
  width: 100%;
  min-height: 84px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  font-family: inherit;
}
.agenda-cr-loc-address::placeholder {
  color: color-mix(in srgb, var(--hz-on-surface-variant) 75%, transparent);
}
.agenda-cr-loc-address:focus {
  outline: none;
  border-color: #ff5300;
  box-shadow: 0 0 0 1px #ff5300;
}
.agenda-cr-loc-address.is-invalid {
  border-color: #d95d2c;
  box-shadow: 0 0 0 1px #d95d2c;
}
.agenda-cr-loc-error {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 0 0;
  font-size: 13px;
  font-weight: 500;
  color: #d95d2c;
}
.agenda-cr-loc-error .material-symbols-outlined {
  font-size: 18px;
}
.agenda-cr-loc-note-wrap {
  margin-top: 12px;
}
.agenda-cr-loc-add-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 10px;
  padding: 0;
  border: none;
  background: transparent;
  color: #ff5300;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-cr-loc-add-link:disabled {
  opacity: 0.55;
  cursor: default;
}
.agenda-cr-loc-add-link .material-symbols-outlined {
  font-size: 18px;
}
.agenda-cr-loc-multi {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--hz-surface-container-low);
}
.agenda-cr-loc-multi p {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-loc-multi .agenda-cr-loc-add-link {
  margin-top: 8px;
}
.agenda-cr-loc-more {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.agenda-cr-loc-more.hidden {
  display: none;
}
.agenda-cr-when-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.agenda-cr-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-field input {
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
  font-size: 13px;
}
.agenda-cr-when-hint {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-host-summary {
  gap: 10px;
}
.agenda-cr-muted {
  margin: 0;
  font-size: 13px;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-teams-hint {
  margin-top: 10px;
}
.agenda-cr-guest-add {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.agenda-cr-guest-input {
  flex: 1;
  min-width: 0;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
  font-size: 13px;
}
.agenda-cr-guest-input:focus {
  outline: none;
  border-color: var(--hz-primary);
}
.agenda-cr-guest-add-btn {
  width: 42px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-primary-container);
  color: var(--hz-on-primary-container);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.agenda-cr-guest-add-btn .material-symbols-outlined {
  font-size: 20px;
}
.agenda-cr-guest-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.agenda-cr-guest-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  padding: 4px 6px 4px 10px;
  border-radius: 999px;
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
  font-size: 12px;
}
.agenda-cr-guest-chip button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--hz-on-surface-variant);
}
.agenda-cr-guest-chip button .material-symbols-outlined {
  font-size: 16px;
}
.agenda-cr-create-error {
  margin: 0 22px 8px;
}
.agenda-cr-footer {
  display: flex;
  gap: 10px;
  margin: 0 -22px;
  padding: 14px 22px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  position: sticky;
  bottom: 0;
}
.agenda-cr-more,
.agenda-cr-create {
  flex: 1;
  min-height: 42px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.agenda-cr-more {
  border: 1px solid var(--hz-on-surface);
  background: transparent;
  color: var(--hz-on-surface);
}
.agenda-cr-more:hover {
  background: var(--hz-surface-container);
}
.agenda-cr-create {
  border: none;
  background: #ff5300;
  color: #fff;
}
.agenda-cr-create:hover {
  background: #0056d6;
}
.agenda-ed-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface-variant);
  cursor: pointer;
}
.agenda-ed-close:hover {
  background: var(--hz-surface-container);
  color: var(--hz-on-surface);
}
.agenda-ed-close .material-symbols-outlined {
  font-size: 22px;
}
.agenda-ed-header {
  padding-right: 36px;
  margin-bottom: 18px;
}
.agenda-ed-title {
  margin: 0 0 8px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hz-on-surface);
}
.agenda-ed-date,
.agenda-ed-time {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
  color: var(--hz-on-surface-variant);
}
.agenda-ed-cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #d95d2c;
  background: transparent;
  color: #d95d2c;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-ed-cancel-btn:hover {
  background: color-mix(in srgb, #d95d2c 10%, transparent);
}
.agenda-ed-cancel-btn .material-symbols-outlined {
  font-size: 18px;
}
.agenda-ed-conflict {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--hz-error) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-error) 35%, transparent);
  color: var(--hz-error);
  font-size: 12px;
  line-height: 1.4;
}
.agenda-ed-conflict .material-symbols-outlined {
  font-size: 18px;
  flex-shrink: 0;
}
.agenda-ed-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--hz-outline-variant);
  margin-bottom: 4px;
}
.agenda-ed-tab {
  position: relative;
  padding: 10px 2px 12px;
  border: none;
  background: transparent;
  color: var(--hz-on-surface-variant);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-ed-tab.is-active {
  color: var(--hz-on-surface);
}
.agenda-ed-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: var(--hz-primary);
}
.agenda-ed-panel.hidden {
  display: none;
}
.agenda-ed-section {
  padding: 18px 0;
  border-bottom: 1px solid var(--hz-outline-variant);
}
.agenda-ed-section:last-child {
  border-bottom: none;
}
.agenda-ed-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}
.agenda-ed-section-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--hz-on-surface);
}
.agenda-ed-section-head .agenda-ed-section-title {
  margin-bottom: 0;
}
.agenda-ed-section-meta {
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}
.agenda-ed-people {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.agenda-ed-person {
  display: flex;
  align-items: center;
  gap: 10px;
}
.agenda-ed-avatar {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.agenda-ed-avatar--purple {
  background: #ede9fe;
  color: #6d28d9;
}
.agenda-ed-avatar--host {
  background: #ffedd5;
  color: #c2410c;
}
.agenda-ed-person-name {
  font-size: 14px;
  color: var(--hz-on-surface);
}
.agenda-ed-you {
  font-size: 12px;
  color: var(--hz-on-surface-variant);
  font-weight: 400;
}
.agenda-ed-muted {
  margin: 0;
  font-size: 13px;
  color: var(--hz-on-surface-variant);
}
.agenda-ed-location-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agenda-ed-location-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.agenda-ed-loc-icon {
  font-size: 20px;
  color: #6d28d9;
}
.agenda-ed-location-label {
  font-size: 14px;
  color: var(--hz-on-surface);
}
.agenda-ed-loc-address {
  margin-top: 8px;
}
.agenda-ed-join-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--hz-on-surface);
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.agenda-ed-join-btn:hover {
  background: var(--hz-surface-container);
}
.agenda-ed-timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 4px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.agenda-ed-timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--hz-outline-variant);
}
.agenda-ed-timeline-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 8px 10px;
  position: relative;
}
.agenda-ed-timeline-icon {
  grid-row: 1 / span 2;
  font-size: 18px;
  color: var(--hz-on-surface-variant);
  z-index: 1;
  background: var(--hz-surface-container-lowest);
}
.agenda-ed-timeline-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.agenda-ed-timeline-body strong {
  font-size: 13px;
  color: var(--hz-on-surface);
}
.agenda-ed-timeline-body span {
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}
.agenda-ed-footer {
  padding: 16px 0 8px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
  border-top: 1px solid var(--hz-outline-variant);
}
.agenda-ed-actions {
  padding-top: 8px;
}
.agenda-ed-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  background: var(--hz-surface-container);
  color: var(--hz-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-ed-edit-btn:hover {
  background: var(--hz-surface-container-high);
}
.agenda-ed-section-lead {
  margin: -8px 0 10px;
}
.agenda-ed-docs-section .agenda-ed-textarea {
  margin-top: 0;
}
.agenda-ed-notes-panel {
  padding-top: 20px;
}
.agenda-ed-notes-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.agenda-ed-notes-head-row .agenda-ed-notes-heading {
  margin: 0;
}
.agenda-ed-notes-head-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.agenda-ed-notes-icon-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #ff5300;
  cursor: pointer;
}
.agenda-ed-notes-icon-btn:hover {
  background: color-mix(in srgb, #ff5300 12%, transparent);
}
.agenda-ed-notes-icon-btn .material-symbols-outlined {
  font-size: 20px;
}
.agenda-ed-notes-saved {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fff4d2;
  border: 1px solid #f0e2c8;
  min-height: 56px;
}
html.dark .agenda-ed-notes-saved {
  background: color-mix(in srgb, #fff4d2 14%, var(--hz-surface-container-low));
  border-color: color-mix(in srgb, #f0e2c8 35%, var(--hz-outline-variant));
}
.agenda-ed-notes-saved-body {
  font-size: 14px;
  line-height: 1.55;
  color: var(--hz-on-surface);
  white-space: pre-wrap;
  word-break: break-word;
}
.agenda-ed-notes-saved-body ul,
.agenda-ed-notes-saved-body ol {
  margin: 0.35em 0;
  padding-left: 1.35em;
}
.agenda-ed-notes-saved-body a {
  color: #ff5300;
  text-decoration: underline;
}
.agenda-ed-notes-heading {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--hz-on-surface);
  letter-spacing: -0.01em;
}
.agenda-ed-notes-desc {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hz-on-surface-variant);
}
.agenda-ed-notes-box {
  padding: 14px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1px solid #f0e2c8;
}
html.dark .agenda-ed-notes-box {
  background: color-mix(in srgb, #fff8e8 12%, var(--hz-surface-container-low));
  border-color: color-mix(in srgb, #f0e2c8 35%, var(--hz-outline-variant));
}
.agenda-ed-notes-editor {
  border-radius: 8px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  overflow: hidden;
}
.agenda-ed-notes-box.is-focused .agenda-ed-notes-editor,
.agenda-ed-notes-box.is-dirty .agenda-ed-notes-editor {
  border-color: #ff5300;
  box-shadow: 0 0 0 1px #ff5300;
}
.agenda-ed-notes-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
}
.agenda-ed-fmt {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: #5f738c;
  cursor: pointer;
}
.agenda-ed-fmt:hover {
  background: var(--hz-surface-container);
  color: var(--hz-on-surface);
}
.agenda-ed-fmt .material-symbols-outlined {
  font-size: 20px;
}
.agenda-ed-fmt-sep {
  width: 1px;
  height: 18px;
  margin: 0 4px;
  background: var(--hz-outline-variant);
}
.agenda-ed-host-notes-input {
  display: block;
  width: 100%;
  min-height: 180px;
  max-height: 360px;
  overflow-y: auto;
  padding: 12px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 14px;
  line-height: 1.55;
  font-family: inherit;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}
.agenda-ed-host-notes-input:empty::before {
  content: attr(data-placeholder);
  color: color-mix(in srgb, var(--hz-on-surface-variant) 70%, transparent);
  pointer-events: none;
}
.agenda-ed-host-notes-input:focus {
  outline: none;
  box-shadow: none;
  border-color: transparent;
}
.agenda-ed-host-notes-input ul,
.agenda-ed-host-notes-input ol {
  margin: 0.35em 0;
  padding-left: 1.35em;
}
.agenda-ed-host-notes-input a {
  color: #ff5300;
  text-decoration: underline;
}
.agenda-ed-notes-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.agenda-ed-notes-discard {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.agenda-ed-notes-discard:hover:not(:disabled) {
  color: var(--hz-error);
}
.agenda-ed-notes-discard:disabled {
  opacity: 0.4;
  cursor: default;
}
.agenda-ed-notes-discard .material-symbols-outlined {
  font-size: 18px;
}
.agenda-ed-notes-save {
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  background: #ff5300;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.agenda-ed-notes-save:hover:not(:disabled) {
  background: #0056d6;
}
.agenda-ed-notes-save:disabled {
  opacity: 0.45;
  cursor: default;
}
.agenda-ed-notes-block {
  padding: 16px 0;
  border-bottom: 1px solid var(--hz-outline-variant);
}
.agenda-ed-notes-block:last-child {
  border-bottom: none;
}
.agenda-ed-notes-hint {
  margin: -6px 0 10px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}
.agenda-ed-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
  min-height: 72px;
}
.agenda-ed-notes-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.agenda-ed-save-btn {
  padding: 7px 12px;
  border-radius: 8px;
  border: none;
  background: color-mix(in srgb, var(--hz-primary) 12%, transparent);
  color: var(--hz-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-ed-save-btn--primary {
  background: var(--hz-primary);
  color: var(--hz-on-primary);
}
.agenda-ed-notes-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--hz-on-surface-variant);
  white-space: pre-wrap;
}
.agenda-ed-atts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.agenda-ed-att {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  text-align: left;
  cursor: pointer;
}
.agenda-ed-att:hover {
  background: var(--hz-surface-container);
}
.agenda-ed-att-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--hz-primary) 14%, transparent);
  color: var(--hz-primary);
}
.agenda-ed-att-icon.is-pdf {
  background: color-mix(in srgb, var(--hz-error) 14%, transparent);
  color: var(--hz-error);
}
.agenda-ed-att-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.agenda-ed-att-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--hz-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.agenda-ed-att-size {
  font-size: 11px;
  color: var(--hz-on-surface-variant);
}
.agenda-ed-att-view {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.agenda-ed-empty {
  padding: 20px 12px;
  text-align: center;
  border-radius: 10px;
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface-variant);
  font-size: 13px;
}

.agenda-meetings-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 4px;
}
.agenda-mh-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.agenda-mh-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hz-on-surface);
}
.agenda-mh-top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.agenda-mh-icon-btn {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--hz-on-surface);
  cursor: pointer;
}
.agenda-mh-icon-btn:hover {
  background: var(--hz-surface-container);
}
.agenda-mh-icon-btn .material-symbols-outlined {
  font-size: 22px;
}
.agenda-mh-add {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 4px;
  padding: 8px 12px;
  border-radius: 8px;
  border: none;
  background: var(--hz-primary);
  color: var(--hz-on-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-mh-add .material-symbols-outlined { font-size: 18px; }
.agenda-mh-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.agenda-mh-cal-wrap,
.agenda-mh-filter-wrap {
  position: relative;
}
.agenda-mh-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.agenda-mh-select:hover,
.agenda-mh-select.is-active {
  background: var(--hz-surface-container);
}
.agenda-mh-select .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.agenda-mh-filter-btn { gap: 4px; }
.agenda-mh-search {
  position: relative;
  flex: 1 1 220px;
  min-width: 180px;
}
.agenda-mh-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--hz-on-surface-variant);
  pointer-events: none;
}
.agenda-mh-search input {
  width: 100%;
  height: 40px;
  padding: 0 36px 0 40px;
  border-radius: 8px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  font-size: 13px;
}
.agenda-mh-search input:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--hz-primary) 45%, var(--hz-outline-variant));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hz-primary) 18%, transparent);
}
.agenda-mh-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--hz-on-surface-variant);
  cursor: pointer;
}
.agenda-mh-search-clear .material-symbols-outlined { font-size: 18px; }
.agenda-mh-scope {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--hz-primary) 10%, var(--hz-surface-container-low));
  gap: 2px;
}
.agenda-mh-scope-btn {
  height: 34px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.agenda-mh-scope-btn.is-active {
  background: var(--hz-surface-container-lowest);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
}
.agenda-mh-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 220px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.12);
}
.agenda-mh-menu.hidden { display: none; }
.agenda-mh-menu-brands {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
}
.agenda-mh-menu-hint {
  margin: 8px 4px 2px;
  font-size: 11px;
  color: var(--hz-on-surface-variant);
  line-height: 1.35;
}
.agenda-mh-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}
.agenda-mh-menu-item:hover,
.agenda-mh-menu-item.is-active {
  background: var(--hz-surface-container);
}
.agenda-mh-menu-item .material-symbols-outlined { font-size: 18px; color: var(--hz-primary); }
.agenda-mh-ranges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.agenda-mh-date.is-active {
  color: var(--hz-primary);
}
.agenda-mh-date.is-active .material-symbols-outlined {
  color: var(--hz-primary);
}
.agenda-mh-date {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  color: var(--hz-on-surface);
  font-size: 14px;
  font-weight: 700;
}
.agenda-mh-date .agenda-mh-date-label,
.agenda-mh-date .material-symbols-outlined {
  pointer-events: none;
}
.agenda-mh-date .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.agenda-mh-date input[type="date"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.agenda-mh-vsep {
  width: 1px;
  height: 22px;
  background: var(--hz-outline-variant);
  flex-shrink: 0;
}
.agenda-mh-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
}
.agenda-mh-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.agenda-mh-pill:hover {
  background: var(--hz-surface-container);
}
.agenda-mh-pill.is-active {
  background: var(--hz-on-surface);
  border-color: var(--hz-on-surface);
  color: var(--hz-surface-bright);
}
html.dark .agenda-mh-pill.is-active {
  background: #e8eefc;
  border-color: #e8eefc;
  color: #130600;
}
.agenda-mh-pill-check { font-size: 16px; }
.agenda-mh-count {
  margin: 0 0 0 auto;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
  white-space: nowrap;
}
@media (max-width: 720px) {
  .agenda-mh-title { font-size: 24px; }
  .agenda-mh-vsep { display: none; }
  .agenda-mh-count {
    width: 100%;
    margin: 0;
  }
  .agenda-mh-scope { width: 100%; }
  .agenda-mh-scope-btn { flex: 1; }
}
.agenda-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 80%, transparent);
  background: var(--hz-surface-container-low);
}

.agenda-view-btn {
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hz-on-surface-variant);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.agenda-view-btn:hover {
  color: var(--hz-on-surface);
}

.agenda-view-btn.is-active {
  background: var(--hz-primary);
  color: var(--hz-on-primary);
}

@keyframes lumme-spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: lumme-spin 0.8s linear infinite;
  display: inline-block;
}

.agenda-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  min-height: 360px;
}

.agenda-week-col {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  overflow: hidden;
}

.agenda-week-col.today {
  outline: 2px solid var(--hz-primary, #ff5300);
  outline-offset: -2px;
}

.agenda-week-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 60%, transparent);
  font-size: 12px;
}

.agenda-week-col-body {
  padding: 8px;
  flex: 1;
  overflow-y: auto;
}

.agenda-week-event {
  transition: transform 0.12s ease;
}

.agenda-week-event:hover {
  transform: translateY(-1px);
}

.agenda-day-timeline {
  display: grid;
  grid-template-columns: 56px 1fr;
  max-height: 640px;
  overflow-y: auto;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
  border-radius: 16px;
  background: var(--hz-surface-bright, var(--hz-surface-container-lowest));
}

.agenda-day-rail {
  border-right: 1px solid color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
}

.agenda-day-rail .agenda-day-hour {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 6px 8px 0;
  font-size: 11px;
  font-weight: 600;
  box-sizing: border-box;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 22%, transparent);
}

.agenda-day-canvas {
  position: relative;
  min-height: 100%;
}

.agenda-now-indicator {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  transform: translateY(-50%);
}
.agenda-now-indicator-time {
  font-size: 10px;
  font-weight: 700;
  color: #f97316;
  min-width: 36px;
  text-align: right;
  padding-left: 4px;
}
.agenda-now-indicator-line {
  position: relative;
  flex: 1;
  height: 2px;
  margin-right: 4px;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 0 0 1px color-mix(in srgb, #f97316 20%, transparent);
}
.agenda-now-indicator-line::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f97316;
}

.agenda-day-gridline {
  position: absolute;
  left: 0;
  right: 0;
  box-sizing: border-box;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 22%, transparent);
  cursor: pointer;
}

.agenda-day-gridline:hover {
  background: color-mix(in srgb, var(--hz-primary) 5%, transparent);
}

.agenda-day-event--span {
  position: absolute;
  z-index: 2;
  border-radius: 12px;
  padding: 8px 10px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
  transition: filter 0.12s ease, transform 0.12s ease;
}

.agenda-day-event--span:hover {
  filter: brightness(0.97);
  transform: translateY(-1px);
  z-index: 3;
}

html.dark .agenda-day-event--span:hover {
  filter: brightness(1.08);
}

.agenda-day-row {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0;
  min-height: 56px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
  cursor: pointer;
}

.agenda-day-row:last-child {
  border-bottom: none;
}

.agenda-day-row:hover {
  background: color-mix(in srgb, var(--hz-primary) 6%, transparent);
}

.agenda-day-hour {
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 600;
  text-align: right;
  border-right: 1px solid color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
}

.agenda-day-slot {
  padding: 8px 10px;
}

.agenda-day-empty {
  display: inline-block;
  padding-top: 6px;
}

@media (max-width: 900px) {
  .agenda-week-grid {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .agenda-week-col {
    min-height: 0;
  }

  .agenda-week-col-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 6px;
  }
}

.calendar-day.has-agenda-conflict {
  border-color: rgb(239 68 68 / 0.45);
  background: rgb(254 226 226 / 0.35);
}

html.dark .calendar-day.has-agenda-conflict {
  background: rgb(127 29 29 / 0.2);
  border-color: rgb(248 113 113 / 0.35);
}

.calendar-day.other-month {
  opacity: 0.4;
}


html.dark .calendar-day {
  border-color: rgba(255, 255, 255, 0.12) !important;
  background: var(--hz-surface-container-low);
}

html.dark .calendar-day.today {
  outline-color: var(--hz-primary, #ff5300);
}

html.dark #page-agenda [class*='border-outline-variant'],
html.dark #page-agenda .border-outline-variant {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.gym-mini-cal .tasks-cal-cell.has-due {
  border-color: color-mix(in srgb, #f97316 45%, var(--hz-outline-variant));
  background: color-mix(in srgb, #f97316 8%, var(--hz-surface-bright, var(--hz-surface-container-low)));
}

.gym-mini-cal .tasks-cal-cell.has-due .tasks-cal-count {
  background: #f97316;
  color: #fff;
}

.gym-mini-cal .tasks-cal-cell.is-selected {
  border-color: #f97316;
  box-shadow: 0 0 0 2px color-mix(in srgb, #f97316 25%, transparent);
}

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

.gym-preset-grid--sidebar {
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .gym-preset-grid:not(.gym-preset-grid--sidebar) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gym-preset-grid:not(.gym-preset-grid--sidebar) {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}


.gym-presets-search {
  position: relative;
  display: block;
}

.gym-presets-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: var(--hz-on-surface-variant);
  pointer-events: none;
}

.gym-presets-search input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gym-presets-search input:focus {
  border-color: color-mix(in srgb, #f97316 45%, var(--hz-outline-variant));
  box-shadow: 0 0 0 3px color-mix(in srgb, #f97316 15%, transparent);
}

.gym-presets-search input::placeholder {
  color: var(--hz-on-surface-variant);
}

.gym-preset-hidden {
  display: none !important;
}

.gym-preset-section-empty {
  display: none;
}

.gym-presets-section + .gym-presets-section {
  margin-top: 16px;
}

.gym-presets-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hz-on-surface-variant);
  margin-bottom: 8px;
}


.gym-presets-root {
  display: none;
}

@media (min-width: 1024px) {
  .gym-presets-root:not(:empty) {
    display: block;
  }

  .gym-presets-rail {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 55;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 64px;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 75%, transparent);
    border-right: none;
    border-radius: 10px 0 0 10px;
    background: var(--hz-surface-container-lowest);
    color: var(--hz-on-surface-variant);
    box-shadow: -3px 0 14px rgba(19, 6, 0, 0.08);
    cursor: pointer;
    transition: right 0.26s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  }

  .gym-presets-rail:hover {
    background: var(--hz-surface-container-high);
    color: var(--hz-on-surface);
    box-shadow: -5px 0 18px rgba(19, 6, 0, 0.12);
  }

  .gym-presets-rail-icon {
    font-size: 22px;
    line-height: 1;
  }

  .gym-presets-root.is-open .gym-presets-rail {
    right: 300px;
    color: #f97316;
    border-color: color-mix(in srgb, #f97316 35%, var(--hz-outline-variant));
  }

  .gym-presets-drawer {
    position: fixed;
    top: calc(56px + env(safe-area-inset-top, 0px));
    right: 0;
    bottom: 0;
    width: 300px;
    z-index: 54;
    display: flex;
    flex-direction: column;
    background: var(--hz-surface-container-lowest);
    border-left: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
    box-shadow: -16px 0 40px rgba(19, 6, 0, 0.12);
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.26s step-end;
  }

  .gym-presets-root.is-open .gym-presets-drawer {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
  }

  .gym-presets-drawer-head {
    padding: 16px 14px 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
    background: color-mix(in srgb, var(--hz-surface-container-low) 35%, var(--hz-surface-container-lowest));
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .gym-presets-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 14px 24px;
  }

  .gym-presets-drawer .gym-preset-card {
    min-height: 96px;
    width: 100%;
  }
}

html.dark .gym-presets-rail,
html.dark .gym-presets-drawer {
  box-shadow: none;
}


.gym-body-map-card {
  overflow: hidden;
}

.gym-body-map-stage {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 4px 0;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hz-surface-container-low) 55%, transparent) 0%,
    transparent 100%
  );
  border-radius: 16px;
}

.gym-body-map-figure {
  flex: 0 1 280px;
  max-width: 320px;
  text-align: center;
}

.gym-body-map-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hz-on-surface-variant);
  margin-bottom: 4px;
}

.gym-body-map-svg {
  width: 100%;
  height: auto;
  max-height: 420px;
  display: block;
}

.gym-body-base path {
  fill: color-mix(in srgb, var(--hz-on-surface) 8%, var(--hz-surface-container-high));
  stroke: color-mix(in srgb, var(--hz-outline-variant) 85%, transparent);
  stroke-width: 1.2;
  pointer-events: none;
}

html.dark .gym-body-base path {
  fill: color-mix(in srgb, var(--hz-on-surface) 6%, var(--hz-surface-container));
  stroke: color-mix(in srgb, var(--hz-outline-variant) 60%, transparent);
}

.gym-body-part {
  fill: color-mix(in srgb, var(--gym-body-accent, #ff5300) 22%, transparent);
  stroke: color-mix(in srgb, var(--gym-body-accent, #ff5300) 72%, transparent);
  stroke-width: 1.4;
  cursor: pointer;
  transition: fill 0.15s ease, stroke 0.15s ease, filter 0.15s ease;
}

.gym-body-part:hover {
  fill: color-mix(in srgb, var(--gym-body-accent, #ff5300) 42%, transparent);
  stroke: var(--gym-body-accent, #ff5300);
  filter: drop-shadow(0 2px 8px color-mix(in srgb, var(--gym-body-accent, #ff5300) 35%, transparent));
}

.gym-body-part:active {
  fill: color-mix(in srgb, var(--gym-body-accent, #ff5300) 52%, transparent);
}

.gym-body-map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
}

.gym-body-legend-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gym-body-accent, #ff5300) 40%, var(--hz-outline-variant));
  background: color-mix(in srgb, var(--gym-body-accent, #ff5300) 10%, var(--hz-surface-container-lowest));
  color: var(--gym-body-accent, #ff5300);
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.gym-body-legend-chip:hover {
  background: color-mix(in srgb, var(--gym-body-accent, #ff5300) 18%, var(--hz-surface-container-lowest));
  transform: translateY(-1px);
}


.gym-ex-gallery {
  display: flex;
  flex-direction: column;
  min-height: min(78vh, 820px);
  max-height: 82vh;
  --gym-gallery-accent: #ff5300;
}

.gym-ex-gallery-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  background: color-mix(in srgb, var(--gym-gallery-accent) 6%, var(--hz-surface-container-lowest));
}

.gym-ex-gallery-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gym-gallery-accent);
  margin-bottom: 2px;
}

.gym-ex-gallery-counter {
  text-align: center;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 14px;
  background: var(--hz-surface-container-low);
  border: 1px solid color-mix(in srgb, var(--gym-gallery-accent) 30%, var(--hz-outline-variant));
}

.gym-ex-gallery-counter [data-gym-selected-count] {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--gym-gallery-accent);
}

.gym-ex-gallery-search {
  display: block;
  margin: 0 20px 12px;
}

.gym-ex-gallery-search input:focus {
  border-color: color-mix(in srgb, var(--gym-gallery-accent) 45%, var(--hz-outline-variant));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gym-gallery-accent) 15%, transparent);
}

.gym-ex-hidden {
  display: none !important;
}

.gym-ex-empty {
  grid-column: 1 / -1;
}

.gym-ex-grid {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 20px;
}

@media (min-width: 640px) {
  .gym-ex-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .gym-ex-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.gym-ex-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 0.12s ease;
}

.gym-ex-card:hover {
  transform: translateY(-2px);
}

.gym-ex-card.is-selected .gym-ex-visual {
  box-shadow: 0 0 0 2px var(--gym-gallery-accent), 0 8px 24px color-mix(in srgb, var(--gym-gallery-accent) 22%, transparent);
}

.gym-ex-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--hz-on-surface);
  line-height: 1.3;
}

.gym-ex-visual {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 40%, transparent);
  aspect-ratio: 4 / 3;
  transition: box-shadow 0.15s ease;
}

html.dark .gym-ex-visual {
  background: #f1e6e1;
}

.gym-ex-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  pointer-events: none;
}

.gym-ex-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #fff;
  pointer-events: none;
}

.gym-ex-illus {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gym-ex-illus-glow {
  position: absolute;
  width: 55%;
  height: 55%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--gym-gallery-accent) 35%, transparent);
  filter: blur(28px);
  opacity: 0.85;
}

.gym-ex-illus-icon {
  position: relative;
  font-size: 72px;
  color: color-mix(in srgb, var(--gym-gallery-accent) 75%, #2a170c);
  font-variation-settings: 'FILL' 0, 'wght' 300;
}

.gym-ex-select {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--hz-on-surface) 25%, #fff);
  background: rgba(255, 255, 255, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(19, 6, 0, 0.12);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.gym-ex-select-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  border: 2px solid color-mix(in srgb, var(--hz-on-surface-variant) 70%, #8a756c);
}

.gym-ex-select-check {
  display: none;
  font-size: 18px;
  color: #fff;
}

.gym-ex-card.is-selected .gym-ex-select {
  background: var(--gym-gallery-accent);
  border-color: var(--gym-gallery-accent);
  transform: scale(1.05);
}

.gym-ex-card.is-selected .gym-ex-select-dot {
  display: none;
}

.gym-ex-card.is-selected .gym-ex-select-check {
  display: block;
}

.gym-ex-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--hz-on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gym-ex-meta {
  font-size: 12px;
  font-weight: 500;
  color: color-mix(in srgb, var(--gym-gallery-accent) 80%, var(--hz-primary));
}

.gym-ex-gallery-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 20px 18px;
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  background: var(--hz-surface-container-lowest);
}

.gym-ex-footer-primary,
.gym-ex-footer-secondary,
.gym-ex-footer-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.gym-ex-footer-primary {
  background: var(--gym-gallery-accent);
  color: #fff;
  margin-left: auto;
}

.gym-ex-footer-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gym-ex-footer-secondary {
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
}

.gym-ex-footer-ghost {
  color: var(--hz-on-surface-variant);
  background: transparent;
}

.gym-ex-footer-ghost:hover {
  color: var(--hz-on-surface);
  background: var(--hz-surface-container-low);
}


.gym-wizard {
  padding: 16px 0 0;
}

.gym-wizard-head {
  margin-bottom: 16px;
  padding: 0 20px;
}

.gym-wizard-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hz-primary);
  margin-bottom: 4px;
}

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

.gym-wizard--muscles {
  display: flex;
  flex-direction: column;
  min-height: min(70vh, 720px);
  max-height: 82vh;
}

.gym-wizard-muscle-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 20px;
  align-content: start;
}

.gym-wizard-muscle-card {
  position: relative;
  cursor: pointer;
}

.gym-wizard-muscle-card-inner {
  width: 100%;
  pointer-events: none;
}

.gym-wizard-muscle-card .gym-ex-select {
  top: 8px;
  right: 8px;
}

.gym-wizard-muscle-card.is-selected .gym-wizard-muscle-card-inner {
  box-shadow: 0 0 0 2px var(--gym-accent, var(--hz-primary)), 0 6px 20px color-mix(in srgb, var(--gym-accent, #ff5300) 18%, transparent);
}

.gym-wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  background: var(--hz-surface-container-lowest);
}

.gym-wizard-footer-counter {
  text-align: center;
  min-width: 72px;
}

.gym-wizard-footer-counter [data-gym-muscle-count] {
  display: block;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--hz-primary);
}

.gym-wizard-continue {
  flex: 1;
  max-width: 280px;
  margin-left: auto;
  padding: 13px 18px;
  border: none;
  border-radius: 12px;
  background: var(--hz-primary);
  color: var(--hz-on-primary, #fff);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.gym-wizard-continue:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.gym-wizard-muscle-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gym-wizard-muscle-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gym-accent, #ff5300) 40%, var(--hz-outline-variant));
  background: color-mix(in srgb, var(--gym-accent, #ff5300) 12%, var(--hz-surface-container-lowest));
  color: var(--gym-accent, #ff5300);
}

.gym-wizard-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.gym-wizard-progress-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--gym-accent, #ff5300) 30%, var(--hz-outline-variant));
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface-variant);
  opacity: 0.65;
}

.gym-wizard-progress-chip.is-current {
  opacity: 1;
  border-color: color-mix(in srgb, var(--gym-accent, #ff5300) 50%, var(--hz-outline-variant));
  background: color-mix(in srgb, var(--gym-accent, #ff5300) 14%, var(--hz-surface-container-lowest));
  color: var(--gym-accent, #ff5300);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gym-accent, #ff5300) 25%, transparent);
}

.gym-wizard-progress-chip.is-done {
  opacity: 1;
  background: color-mix(in srgb, var(--gym-accent, #ff5300) 10%, var(--hz-surface-container-lowest));
  color: var(--gym-accent, #ff5300);
}

@media (min-width: 640px) {
  .gym-wizard-muscle-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

#modal-panel.gym-wizard-panel {
  max-width: 100% !important;
  width: 100% !important;
}

@media (max-width: 1023px) {
  #modal-panel.gym-wizard-panel {
    height: min(92vh, 100dvh) !important;
    max-height: min(92vh, 100dvh) !important;
    border-radius: 16px 16px 0 0 !important;
  }
}


.gym-session-root {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(64px + env(safe-area-inset-bottom, 0px));
  z-index: 52;
  pointer-events: none;
}

.gym-session-root:not(:empty) {
  pointer-events: auto;
}

@media (min-width: 768px) {
  .gym-session-root {
    bottom: 20px;
    left: auto;
    right: 20px;
    width: min(440px, calc(100vw - 40px));
  }
}

.gym-session-sheet {
  background: var(--hz-surface-container-lowest);
  border: 1px solid color-mix(in srgb, var(--gym-session-accent, #ff5300) 35%, var(--hz-outline-variant));
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 32px rgba(19, 6, 0, 0.18);
  overflow: hidden;
}

@media (min-width: 768px) {
  .gym-session-sheet {
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(19, 6, 0, 0.2);
  }
}

.gym-session-sheet-bar {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: color-mix(in srgb, var(--gym-session-accent, #ff5300) 10%, var(--hz-surface-container-lowest));
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--hz-on-surface);
}

.gym-session-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gym-session-accent, #ff5300);
  flex-shrink: 0;
  animation: gym-session-pulse 1.4s ease-in-out infinite;
}

@keyframes gym-session-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.85);
  }
}

.gym-session-icon {
  color: var(--gym-session-accent, #ff5300);
  font-size: 22px;
}

.gym-session-bar-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}

.gym-session-bar-text strong {
  font-size: 14px;
  color: var(--hz-on-surface);
}

.gym-session-chevron {
  color: var(--hz-on-surface-variant);
}

.gym-session-sheet-body {
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}

.gym-session-sheet-inner {
  padding: 14px 14px calc(14px + env(safe-area-inset-bottom, 0px));
}

.gym-session-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.gym-session-cancel {
  font-size: 12px;
  font-weight: 600;
  color: var(--hz-error, #dc2626);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.gym-session-finish {
  width: 100%;
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  background: var(--gym-session-accent, #ff5300);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.gym-session-finish:active {
  opacity: 0.9;
}

body.has-gym-session-active #page-gym {
  padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

body.has-gym-session-active.gym-session-expanded #page-gym {
  padding-bottom: min(58vh, 480px);
}

.gym-exercise-block-head {
  align-items: stretch;
}

.gym-exercise-block-thumb {
  flex: 0 0 64px;
  width: 64px;
  aspect-ratio: 1;
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  border: none;
  flex-shrink: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gym-exercise-block-thumb:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 12px rgba(19, 6, 0, 0.22);
}

.gym-exercise-block-thumb:focus-visible {
  outline: 2px solid var(--gym-session-accent, #ff5300);
  outline-offset: 2px;
}

.gym-exercise-block-thumb .gym-ex-illus-icon--thumb {
  font-size: 28px;
}

.gym-ex-video--thumb,
.gym-ex-image--thumb {
  object-fit: cover;
}

.gym-ex-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(19, 6, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  animation: gym-ex-preview-in 0.2s ease;
}

@keyframes gym-ex-preview-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

body.gym-ex-preview-open {
  overflow: hidden;
}

.gym-ex-preview-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top, 0px));
  right: max(12px, env(safe-area-inset-right, 0px));
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease;
}

.gym-ex-preview-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.gym-ex-preview-dialog {
  width: min(560px, 100%);
  max-height: 100%;
  overflow-y: auto;
}

.gym-ex-preview-visual {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
}

.gym-ex-preview-visual .gym-ex-illus-icon {
  font-size: 96px;
}

.gym-ex-preview-info {
  margin-top: 16px;
  text-align: center;
}

.gym-ex-preview-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.gym-ex-preview-meta {
  margin-top: 6px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
}

.gym-ex-preview-desc {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.82);
  text-align: left;
}


@media (max-width: 1023px) {
  .gym-body-map-stage {
    flex-wrap: nowrap;
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding: 4px 4px 10px;
    scrollbar-width: none;
  }

  .gym-body-map-stage::-webkit-scrollbar {
    display: none;
  }

  .gym-body-map-figure {
    flex: 0 0 min(68vw, 240px);
    max-width: none;
    scroll-snap-align: center;
  }

  .gym-body-map-svg {
    max-height: 260px;
  }

  .gym-body-map-legend {
    gap: 6px;
    margin-top: 12px;
    padding-top: 10px;
  }

  .gym-body-legend-chip {
    font-size: 10px;
    padding: 5px 10px;
  }

  .gym-mobile-presets .gym-preset-card {
    min-height: 104px;
  }

  #modal-panel.gym-ex-gallery-panel {
    max-width: 100% !important;
    width: 100% !important;
    height: min(94vh, 100dvh) !important;
    max-height: min(94vh, 100dvh) !important;
    border-radius: 16px 16px 0 0 !important;
    margin-bottom: 0;
  }

  #modal-panel.gym-ex-gallery-panel .gym-ex-gallery {
    min-height: 0;
    max-height: none;
    height: 100%;
  }

  #modal-panel.gym-ex-gallery-panel #panel-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .gym-ex-gallery-head {
    padding: 14px 16px 10px;
    gap: 12px;
  }

  .gym-ex-gallery-search {
    margin: 0 16px 10px;
  }

  .gym-ex-gallery-hint {
    display: none;
  }

  .gym-ex-grid {
    padding: 12px 16px;
    gap: 16px;
  }

  .gym-ex-gallery-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    gap: 8px;
  }

  .gym-ex-footer-primary {
    margin-left: 0;
    order: -1;
    width: 100%;
    padding: 14px 18px;
  }

  .gym-ex-footer-secondary,
  .gym-ex-footer-ghost {
    width: 100%;
    padding: 12px 16px;
  }

  .gym-ex-select {
    width: 32px;
    height: 32px;
    top: 8px;
    right: 8px;
  }
}

.gym-preset-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-height: 118px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--gym-accent, #f97316) 28%, var(--hz-outline-variant));
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--gym-accent, #f97316) 10%, var(--hz-surface-container-lowest)) 0%,
    var(--hz-surface-container-lowest) 100%
  );
  box-shadow: 0 1px 2px rgba(19, 6, 0, 0.04);
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.gym-preset-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--gym-accent, #f97316) 45%, var(--hz-outline-variant));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--gym-accent, #f97316) 12%, transparent);
}

.gym-preset-card:active {
  transform: scale(0.98);
}

.gym-preset-icon {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 20px;
  color: var(--gym-accent, #f97316);
  background: color-mix(in srgb, var(--gym-accent, #f97316) 14%, transparent);
}

.gym-preset-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--hz-on-surface);
  line-height: 1.2;
}

.gym-preset-meta {
  font-size: 11px;
  color: var(--hz-on-surface-variant);
}

.gym-preset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: auto;
  padding-top: 4px;
}

.gym-preset-tag {
  font-size: 10px;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 999px;
  color: var(--gym-accent, #f97316);
  background: color-mix(in srgb, var(--gym-accent, #f97316) 12%, transparent);
  font-weight: 600;
}

html.dark .gym-preset-card {
  box-shadow: none;
}


.tasks-mini-cal {
  width: 100%;
}

.tasks-cal-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  min-height: 52px;
  padding: 6px 2px 4px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  background: var(--hz-surface-bright, var(--hz-surface-container-low));
  color: var(--hz-on-surface);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.tasks-cal-cell.is-empty {
  border: none;
  background: transparent;
  pointer-events: none;
  min-height: 52px;
}

.tasks-cal-cell:hover:not(.is-empty) {
  background: var(--hz-surface-container-high);
}

.tasks-cal-cell.is-today {
  outline: 2px solid var(--hz-primary, #ff5300);
  outline-offset: -2px;
}

.tasks-cal-cell.is-selected {
  border-color: var(--hz-primary, #ff5300);
  background: color-mix(in srgb, var(--hz-primary, #ff5300) 16%, transparent);
}

.tasks-cal-daynum {
  font-size: 12px;
  font-weight: 650;
  line-height: 1.1;
}

.tasks-cal-cell.is-today .tasks-cal-daynum {
  color: var(--hz-primary, #ff5300);
}

.tasks-cal-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
  background: var(--hz-primary, #ff5300);
  color: var(--hz-on-primary, #fff);
}

.tasks-cal-count.is-blank {
  visibility: hidden;
  background: transparent;
}

.tasks-cal-cell.is-overdue .tasks-cal-count {
  background: var(--hz-error, #ba1a1a);
  color: var(--hz-on-error, #fff);
}


.habit-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.habit-day-chip {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 0;
  min-height: 48px;
  padding: 4px 1px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  background: var(--hz-surface-bright, var(--hz-surface-container-low));
  color: var(--hz-on-surface);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.habit-day-chip-wd {
  font-size: 10px;
  text-transform: uppercase;
  color: var(--hz-on-surface-variant);
  line-height: 1;
}

.habit-day-chip-num {
  font-size: 13px;
  font-weight: 650;
  line-height: 1.1;
}

.habit-day-chip-ok {
  font-size: 14px !important;
  color: var(--hz-secondary, #006e2c);
}

.habit-day-chip.is-today {
  outline: 2px solid var(--hz-primary, #ff5300);
  outline-offset: -2px;
}

.habit-day-chip.is-checked,
.tasks-cal-cell.habit-cal-cell.is-checked {
  background: color-mix(in srgb, var(--hz-secondary, #006e2c) 18%, transparent);
  border-color: color-mix(in srgb, var(--hz-secondary, #006e2c) 55%, transparent);
}

.tasks-cal-cell.habit-cal-cell.is-future {
  opacity: 0.35;
  cursor: not-allowed;
}

html.dark .habit-day-chip {
  background: var(--hz-surface-container-low);
}

html.dark .tasks-cal-cell {
  background: var(--hz-surface-container-low);
  border-color: color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
}

html.dark .tasks-cal-cell:hover:not(.is-empty) {
  background: var(--hz-surface-container-high);
}

html.dark .tasks-cal-cell.is-selected {
  background: color-mix(in srgb, var(--hz-primary, #ff5300) 22%, transparent);
}

@media (max-width: 1023px) {
  .tasks-cal-cell {
    min-height: 44px;
    padding: 4px 1px 3px;
  }
}

.hidden-page {
  display: none !important;
}


.book-modal-backdrop {
  animation: book-modal-fade-in 0.28s ease;
}

.book-modal-glass {
  background: color-mix(in srgb, var(--hz-surface) 82%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.book-modal-panel {
  background: color-mix(in srgb, var(--hz-surface-container-low) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 45%, transparent);
  animation: book-modal-slide-up 0.32s ease;
}

.book-modal-header,
.book-modal-footer {
  border-color: color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
}

.book-modal-input-well {
  background: color-mix(in srgb, var(--hz-surface-container-lowest) 65%, transparent);
  border: 1px solid transparent;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.book-modal-input-well:focus-within {
  border-color: var(--hz-primary);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--hz-primary) 25%, transparent);
}

.book-modal-input-well input,
.book-modal-input-well select,
.book-modal-input-well textarea {
  background: transparent;
  border: none;
  box-shadow: none;
}

.book-modal-cover-overlay {
  background: rgb(0 0 0 / 0.42);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.book-modal-cover-wrap:hover .book-modal-cover-overlay,
.book-modal-cover-wrap:focus-within .book-modal-cover-overlay {
  opacity: 1;
}

.book-modal-zenny {
  background: color-mix(in srgb, var(--hz-surface-bright) 35%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-primary) 22%, transparent);
}

.book-star-btn {
  color: var(--hz-on-surface-variant);
  transition: color 0.12s ease, transform 0.12s ease;
}

.book-star-btn:hover {
  transform: scale(1.08);
}

.book-star-btn.is-filled {
  color: var(--hz-primary);
}

.book-quotes-panel {
  background: color-mix(in srgb, var(--hz-surface-container) 70%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 40%, transparent);
}

.book-quote-item {
  border-left: 3px solid var(--hz-primary);
  padding-left: 0.85rem;
}

.book-quote-item textarea,
.book-quote-item input {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.book-quote-item textarea:focus,
.book-quote-item input:focus {
  outline: none;
  box-shadow: none;
}

.book-audio-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.55rem;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--hz-surface-container) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
}

.book-audio-wrap audio {
  width: 100%;
  height: 2rem;
}

.book-audio-name {
  margin: 0;
  font-size: 10px;
  line-height: 1.3;
  color: var(--hz-on-surface-variant);
}

.book-audio-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.75rem;
  border: 1px dashed color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  background: transparent;
  color: var(--hz-primary);
  font-size: 11px;
  font-weight: 600;
}

.book-audio-upload:hover {
  background: color-mix(in srgb, var(--hz-primary) 8%, transparent);
}

.book-audio-upload:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.book-drive-frame {
  width: 100%;
  min-height: 80px;
  height: 90px;
  border: 0;
  border-radius: 0.75rem;
  background: color-mix(in srgb, var(--hz-surface-container) 90%, transparent);
}

.book-detail-player .book-detail-audio {
  margin-top: 0.25rem;
}

.book-detail-quote {
  border-left: 3px solid var(--hz-primary);
  padding-left: 0.85rem;
  margin: 0;
}

.book-detail-quote p {
  margin: 0;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.45;
}

.book-detail-quote footer {
  margin-top: 0.35rem;
  font-size: 0.7rem;
  color: var(--hz-on-surface-variant);
}


.ab-player-root.is-hidden {
  display: none;
}

.ab-player-root {
  position: relative;
  z-index: 120;
}

body.ab-player-open {
  overflow: hidden;
}

.ab-player-full {
  position: fixed;
  inset: 0;
  z-index: 121;
  background: #f7f7f8;
  color: #12141a;
  display: flex;
  flex-direction: column;
  animation: ab-rise 0.28s ease;
}

html.dark .ab-player-full {
  background: #12141a;
  color: #f3f4f6;
}

@keyframes ab-rise {
  from { transform: translateY(8%); opacity: 0.6; }
  to { transform: translateY(0); opacity: 1; }
}

.ab-player-full-top {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0.85rem;
  padding-top: max(0.75rem, env(safe-area-inset-top));
}

.ab-player-full-top-title {
  flex: 1;
  min-width: 0;
  text-align: center;
}

.ab-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.55;
  font-weight: 600;
}

.ab-top-name {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.ab-icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ab-player-full-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0.5rem 1.25rem 1.5rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ab-cover-wrap {
  width: min(78vw, 320px);
  aspect-ratio: 1;
  border-radius: 1.1rem;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(19, 6, 0, 0.18);
  margin: 0.5rem 0 1.25rem;
  background: #e5e7eb;
}

.ab-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ab-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 48px;
}

.ab-chapter {
  margin: 0 0 1rem;
  font-size: 15px;
  font-weight: 600;
}

.ab-seek-block {
  width: min(100%, 420px);
}

.ab-seek {
  width: 100%;
  accent-color: #ea580c;
  height: 4px;
}

.ab-times {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.45rem;
  font-size: 11px;
  opacity: 0.7;
}

.ab-times [data-ab-remain] {
  flex: 1;
  text-align: center;
}

.ab-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 1.35rem 0 1.1rem;
  color: #22150d;
}

html.dark .ab-controls {
  color: #e5e7eb;
}

.ab-ctrl {
  border: 0;
  background: transparent;
  color: inherit;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ab-ctrl .material-symbols-outlined {
  font-size: 28px;
}

.ab-ctrl-main {
  width: 68px;
  height: 68px;
  background: #22150d;
  color: #fff;
}

html.dark .ab-ctrl-main {
  background: #f8fafc;
  color: #130600;
}

.ab-ctrl-main .material-symbols-outlined {
  font-size: 36px;
  font-variation-settings: 'FILL' 1;
}

.ab-tools {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.ab-tools.has-ebook {
  grid-template-columns: repeat(4, 1fr);
}

.ab-tool .material-symbols-outlined {
  font-size: 22px;
}

.ab-tool.is-disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.ab-tool {
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0.5rem;
  border-radius: 0.75rem;
}

.ab-tool-value {
  font-size: 15px;
  font-weight: 700;
}

.ab-tool-label {
  font-size: 11px;
  opacity: 0.65;
}

.ab-status {
  margin-top: 0.85rem;
  font-size: 12px;
  text-align: center;
  max-width: 28rem;
  color: #0369a1;
}

.ab-status.is-error {
  color: #b45309;
}

.ab-drive-wrap {
  width: min(100%, 420px);
  margin-top: 0.75rem;
}

.ab-drive-frame {
  width: 100%;
  height: 90px;
  border: 0;
  border-radius: 0.75rem;
  background: #e5e7eb;
}

.ab-drive-open {
  display: inline-flex;
  margin-top: 0.5rem;
  font-size: 12px;
  font-weight: 600;
  color: #ff5300;
}

.ab-sheet {
  position: fixed;
  inset: 0;
  z-index: 122;
  background: rgba(19, 6, 0, 0.45);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0.75rem;
}

.ab-sheet-card {
  width: min(100%, 480px);
  max-height: min(82vh, 680px);
  overflow: auto;
  background: #fff;
  color: #111827;
  border-radius: 1rem 1rem 0.75rem 0.75rem;
  padding: 0.9rem;
}

html.dark .ab-sheet-card {
  background: #1f2937;
  color: #f3f4f6;
}

.ab-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.ab-sheet-head h3 {
  margin: 0;
  font-size: 1rem;
}

.ab-sheet-hint {
  font-size: 12px;
  opacity: 0.7;
  margin: 0 0 0.5rem;
}

.ab-sheet-item,
.ab-sheet-add {
  width: 100%;
  border: 0;
  background: color-mix(in srgb, currentColor 6%, transparent);
  color: inherit;
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  text-align: left;
  font-size: 13px;
}

.ab-sheet-add {
  justify-content: center;
  font-weight: 600;
  gap: 0.35rem;
}

.ab-sheet-item-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.ab-sheet-item-row .ab-sheet-item {
  flex: 1;
}

.ab-sheet-paste {
  width: 100%;
  min-height: 7.5rem;
  margin: 0 0 0.55rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.75rem;
  border: 1px solid color-mix(in srgb, currentColor 16%, transparent);
  background: color-mix(in srgb, currentColor 5%, transparent);
  color: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.ab-sheet-actions {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
}

.ab-sheet-actions .ab-sheet-add {
  margin-bottom: 0;
  flex: 1;
}

.ab-sheet-clear {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.75;
  font-size: 13px;
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
}

.ab-sheet-item.is-current {
  background: color-mix(in srgb, #ff5300 16%, transparent);
  font-weight: 600;
}

.ab-player-mini {
  position: fixed;
  right: max(0.75rem, env(safe-area-inset-right));
  bottom: calc(4.25rem + env(safe-area-inset-bottom));
  z-index: 115;
  width: min(92vw, 320px);
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.4rem 0.4rem 0.4rem 0.4rem;
  border-radius: 0.9rem;
  background: color-mix(in srgb, var(--hz-surface-container-lowest, #fff) 92%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant, #e6d9d3) 55%, transparent);
  box-shadow: 0 10px 30px rgba(19, 6, 0, 0.22);
  backdrop-filter: blur(10px);
  animation: ab-mini-in 0.22s ease;
}

@keyframes ab-mini-in {
  from { transform: translateY(12px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

.ab-mini-main {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-align: left;
  padding: 0;
}

.ab-mini-cover {
  width: 42px;
  height: 42px;
  border-radius: 0.45rem;
  object-fit: cover;
  background: #e6d9d3;
  flex-shrink: 0;
}

.ab-mini-cover.is-empty {
  background: linear-gradient(135deg, #4338ca, #7c3aed);
}

.ab-mini-title {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
}

.ab-mini-sub {
  margin: 0;
  font-size: 11px;
  opacity: 0.65;
}

.ab-mini-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ab-mini-btn .material-symbols-outlined {
  font-size: 22px;
}

@media (min-width: 768px) {
  .ab-player-mini {
    bottom: max(1rem, env(safe-area-inset-bottom));
    right: max(1rem, env(safe-area-inset-right));
  }
}

@keyframes book-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes book-modal-slide-up {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.wheel-wrap {
  position: relative;
  width: min(100%, 520px);
  margin: 0 auto;
  aspect-ratio: 1;
}

.wheel-svg {
  width: 100%;
  height: 100%;
  touch-action: none;
  user-select: none;
}

.wheel-segment {
  cursor: pointer;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.wheel-segment:hover {
  filter: brightness(1.08);
  opacity: 0.95;
}

.wheel-segment.active {
  filter: brightness(1.12);
  stroke: #130600;
  stroke-width: 1.5;
}

html.dark .wheel-segment.active {
  stroke: #fce3d8;
}

.wheel-compare-ring {
  fill: none;
  stroke: #c43d00;
  stroke-width: 2.5;
  stroke-dasharray: 6 4;
  opacity: 0.85;
  pointer-events: none;
}

html.dark .wheel-compare-ring {
  stroke: #8aa4ff;
}

.wheel-score-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 80%, transparent);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.wheel-score-chip .font-label-md,
.wheel-score-chip .font-headline-sm,
.wheel-score-chip [data-score-label] {
  color: var(--hz-on-surface);
}

.wheel-score-chip .material-symbols-outlined {
  color: var(--hz-on-surface-variant);
}

.wheel-score-chip:hover,
.wheel-score-chip:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.08);
  outline: none;
}

html.dark .wheel-score-chip:hover,
html.dark .wheel-score-chip:focus-visible {
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.35);
}

.wheel-score-chip.selected {
  border-color: var(--hz-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hz-primary) 28%, transparent);
  background: color-mix(in srgb, var(--hz-primary) 10%, var(--hz-surface-container-low));
}

.wheel-score-chip.needs-plan {
  border-color: color-mix(in srgb, #ef4444 50%, transparent);
  background: color-mix(in srgb, #ef4444 8%, transparent);
}

.wheel-score-chip.needs-just {
  border-color: color-mix(in srgb, #10b981 50%, transparent);
  background: color-mix(in srgb, #10b981 8%, transparent);
}

.wheel-reflect {
  padding: 0 2px 2px 8px;
}

.wheel-reflect.hidden {
  display: none;
}

html.dark .wheel-score-chip {
  background: var(--hz-surface-container);
  border-color: rgba(42, 23, 12, 0.95);
}

.delta-up { color: #006c49; }
.delta-down { color: #ba1a1a; }
.delta-flat { color: #434655; }

html.dark .delta-up { color: #4edea3; }
html.dark .delta-down { color: #ffb4ab; }
html.dark .delta-flat { color: #a8b3c7; }


html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  overscroll-behavior-y: none;
}

@media (hover: none) and (pointer: coarse), (max-width: 767px) {
  html {
    touch-action: manipulation;
  }

  body {
    overflow-x: hidden;
    overscroll-behavior-x: none;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
  }

  
  .custom-scrollbar,
  [class*='overflow-x'],
  .goals-tabs-scroll,
  .agenda-week-scroller {
    touch-action: pan-x pan-y;
  }
}

.touch-target {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-fab {
  background: transparent;
  border: none;
  cursor: pointer;
}


.app-topbar {
  padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--hz-surface-container-lowest) 82%, transparent);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline) 16%, transparent);
}

.app-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 56px;
  padding: 8px 12px;
  max-width: 100%;
}

.app-topbar-lead {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}

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

.app-topbar-logo {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--hz-primary) 18%, transparent);
  flex-shrink: 0;
}

.app-topbar-title {
  margin: 0;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--hz-primary);
}

.app-topbar-sub {
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 550;
  color: var(--hz-on-surface-variant);
}

.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.app-topbar-cluster {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hz-surface-container-low) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-outline) 14%, transparent);
}

.app-topbar-icon {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: transparent;
  background-color: transparent;
  background-image: none;
  color: var(--hz-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  transition: color 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
}

.app-topbar-icon .material-symbols-outlined {
  font-size: 22px;
  background: transparent;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.app-topbar-icon:hover {
  background: transparent;
  color: var(--hz-on-surface);
  opacity: 0.85;
}

.app-topbar-icon:active {
  transform: scale(0.96);
}

.app-topbar-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--hz-error);
  box-shadow: 0 0 0 2px var(--hz-surface-container-lowest);
}

.app-topbar-avatar {
  width: 34px;
  height: 34px;
  margin: 0 3px 0 2px;
  border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--hz-primary) 28%, transparent);
  background: var(--hz-primary-container);
  color: var(--hz-on-primary-container);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.app-topbar-avatar:hover {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--hz-primary) 18%, transparent);
}

.app-topbar-avatar:active {
  transform: scale(0.96);
}

html.dark .app-topbar {
  background: color-mix(in srgb, var(--hz-surface-container-lowest) 78%, transparent);
}

@media (min-width: 640px) {
  .app-topbar-inner {
    min-height: 64px;
    padding: 10px 24px;
  }

  .app-topbar-logo {
    width: 34px;
    height: 34px;
  }

  .app-topbar-title {
    font-size: 15px;
  }

  .app-topbar-avatar {
    width: 36px;
    height: 36px;
  }
}

@media (min-width: 768px) {
  .app-topbar-brand .app-topbar-logo {
    display: none;
  }

  .app-topbar-title {
    display: none;
  }

  .app-topbar-sub {
    font-size: 13px;
    font-weight: 600;
    color: var(--hz-on-surface);
    margin: 0;
  }
}

@media (max-width: 767px) {
  .page-section .font-headline-lg,
  .page-section h2.font-headline-lg {
    font-size: 24px !important;
    line-height: 32px !important;
  }

  .calendar-day {
    min-height: 56px;
    font-size: 12px;
  }

  .calendar-day .text-\[10px\] {
    display: none;
  }

  .wheel-wrap {
    width: min(100%, 360px);
  }

  .wheel-score-chip {
    flex-wrap: wrap;
    gap: 6px;
  }

  .wheel-score-chip input[type='range'] {
    width: 100%;
    order: 10;
  }

  .modal-backdrop .max-w-md {
    max-width: 100%;
  }

  
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

@supports (padding: max(0px)) {
  .mobile-bottom-nav {
    padding-left: max(4px, env(safe-area-inset-left));
    padding-right: max(4px, env(safe-area-inset-right));
  }
}


.media-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.media-card:active {
  transform: scale(0.98);
}

/* —— Metas / watch: cinematic immersive cards (mobile-first) —— */
.no-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

.watch-goal-banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, #ff7433 30%, transparent);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, #0c2340 90%, transparent),
    color-mix(in srgb, #16355d 90%, transparent)
  );
  box-shadow: 0 12px 28px -16px rgba(255, 83, 0, 0.35);
}

.watch-goal-banner-orb {
  position: absolute;
  right: -32px;
  bottom: -32px;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  background: color-mix(in srgb, #ff7433 22%, transparent);
  filter: blur(28px);
  pointer-events: none;
}

.watch-goal-banner-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.watch-goal-banner-lead {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.watch-goal-banner-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  background: linear-gradient(145deg, #fbbf24, #ea580c);
  color: #071629;
  box-shadow: 0 8px 18px -8px rgba(245, 158, 11, 0.55);
}

.watch-goal-banner-icon .material-symbols-outlined {
  font-size: 22px;
  font-variation-settings: 'FILL' 1;
}

.watch-goal-banner-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
}

.watch-goal-banner-title {
  margin: 2px 0 0;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
}

.watch-goal-banner-xp {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #fbbf24 18%, transparent);
  color: #fcd34d;
  border: 1px solid color-mix(in srgb, #fbbf24 30%, transparent);
}

.watch-goal-banner-bar {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  height: 8px;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  padding: 1px;
}

.watch-goal-banner-bar > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff7433, #38bdf8, #fbbf24);
  transition: width 0.5s ease;
}

.watch-goal-banner-foot {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: #b5a197;
}

.books-read-banner-edit {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.books-read-banner-edit-label {
  font-size: 11px;
  font-weight: 600;
  color: #b5a197;
}

.books-read-banner-input,
html.dark .books-read-banner-input,
html.dark #reading-target.books-read-banner-input,
.watch-goal-banner .books-read-banner-input {
  width: 72px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35) !important;
  background: #0b1526 !important;
  background-color: #0b1526 !important;
  color: #e8eef8 !important;
  text-align: center;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  color-scheme: dark;
  box-shadow: none !important;
}

.books-read-banner-input:focus,
html.dark .books-read-banner-input:focus,
html.dark #reading-target.books-read-banner-input:focus {
  border-color: color-mix(in srgb, #ff7433 65%, transparent) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, #ff7433 28%, transparent) !important;
}

.books-read-banner-save {
  border: 0;
  border-radius: 10px;
  padding: 7px 12px;
  background: var(--hz-primary);
  color: var(--hz-on-primary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

html:not(.dark) .books-read-banner-edit-label {
  color: #8a756c;
}

html:not(.dark) .books-read-banner-input,
html:not(.dark) #reading-target.books-read-banner-input,
html:not(.dark) .watch-goal-banner .books-read-banner-input {
  background: #fff !important;
  background-color: #fff !important;
  border-color: #e6d9d3 !important;
  color: #130600 !important;
  color-scheme: light;
}

html:not(.dark) .watch-goal-banner {
  background: linear-gradient(90deg, #ffffff, #eef4ff);
  border-color: color-mix(in srgb, #ff7433 28%, #c3c6d7);
  box-shadow: 0 10px 24px -16px rgba(19, 6, 0, 0.16);
}

html:not(.dark) .watch-goal-banner-kicker {
  color: #b45309;
}

html:not(.dark) .watch-goal-banner-title {
  color: #130600;
}

html:not(.dark) .watch-goal-banner-xp {
  background: color-mix(in srgb, #f59e0b 16%, #fff);
  color: #92400e;
  border-color: color-mix(in srgb, #f59e0b 35%, transparent);
}

html:not(.dark) .watch-goal-banner-bar {
  background: #f1e6e1;
  border-color: #e6d9d3;
}

html:not(.dark) .watch-goal-banner-foot {
  color: #5b4d47;
}

.watch-active-chip {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, #1e3a8a 80%, transparent);
  color: #93c5fd;
  border: 1px solid color-mix(in srgb, #1e40af 40%, transparent);
}

.watch-toolbar-btn {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: color-mix(in srgb, var(--hz-surface, #051424) 72%, transparent);
  color: var(--hz-on-surface-variant, #c3c6d7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.watch-toolbar-btn.is-on {
  border-color: color-mix(in srgb, var(--hz-primary, #ff5300) 55%, transparent);
  background: color-mix(in srgb, var(--hz-primary, #ff5300) 14%, transparent);
  color: var(--hz-primary, #f59b6c);
}

.watch-add-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #ff5300;
  border: 1px solid color-mix(in srgb, #f59b6c 30%, transparent);
  box-shadow: 0 8px 16px -10px rgba(255, 83, 0, 0.55);
}

.metas-seg {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
  width: 100%;
  max-width: 100%;
  padding: 3px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hz-surface-container-low, #e8eef7) 95%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant, #c5cdd8) 50%, transparent);
  box-sizing: border-box;
}

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

.metas-seg--5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metas-hub {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: hidden;
}

.metas-page-sub {
  color: var(--hz-on-surface-variant);
}

.metas-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.metas-toolbar h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--hz-on-surface);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metas-add-btn {
  height: 32px;
  padding: 0 12px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: #ff5300;
  border: 0;
  box-shadow: 0 8px 16px -10px rgba(255, 83, 0, 0.55);
}

.metas-add-btn .material-symbols-outlined {
  font-size: 18px;
}

.metas-item-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .metas-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .metas-item-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.metas-item-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  background: var(--hz-surface-container-lowest);
  box-shadow: 0 8px 20px -16px rgba(19, 6, 0, 0.25);
}

html:not(.dark) .metas-item-card {
  background: #fff;
}

.metas-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 40px 16px;
  text-align: center;
  border-radius: 16px;
  border: 1px dashed color-mix(in srgb, var(--hz-outline-variant) 80%, transparent);
  color: var(--hz-on-surface-variant);
  font-size: 13px;
}

.metas-empty .material-symbols-outlined {
  font-size: 40px;
}

.metas-empty p {
  margin: 0;
}

html:not(.dark) .watch-toolbar-btn {
  border-color: #e6d9d3;
  background: #fff;
  color: #2a170c;
}

html:not(.dark) .watch-toolbar-btn.is-on {
  border-color: color-mix(in srgb, #ff5300 45%, transparent);
  background: color-mix(in srgb, #ff5300 10%, #fff);
  color: #a33200;
}

.books-goal-card.is-courses .books-goal-bar > div {
  background: linear-gradient(90deg, #0d9488, #14b8a6, #2dd4bf);
}

.books-goal-card.is-courses .books-goal-kicker,
html:not(.dark) .books-goal-card.is-courses .books-goal-kicker {
  color: #0f766e;
}

html.dark .books-goal-card.is-courses .books-goal-kicker {
  color: #5eead4;
}

.books-goal-card.is-courses .books-goal-progress-row strong,
html:not(.dark) .books-goal-card.is-courses .books-goal-progress-row strong {
  color: #0f766e;
}

html.dark .books-goal-card.is-courses .books-goal-progress-row strong {
  color: #5eead4;
}

html.dark .metas-seg {
  background: rgba(13, 28, 45, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
}

.metas-seg-btn {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 7px 4px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--hz-on-surface-variant, #8a756c);
  font-weight: 700;
  line-height: 1.15;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

html:not(.dark) .metas-seg-btn:not(.is-active) {
  color: #2a170c;
}

.metas-seg-label {
  font-size: 11px;
  letter-spacing: -0.01em;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metas-seg-count {
  font-size: 10px;
  font-weight: 800;
  opacity: 0.72;
}

html:not(.dark) .metas-seg-btn:not(.is-active) .metas-seg-count {
  opacity: 0.9;
  color: #5b4d47;
}

.metas-seg-btn.is-active {
  background: #fff;
  color: #a33200;
  box-shadow: 0 2px 8px rgba(19, 6, 0, 0.1);
}

html.dark .metas-seg-btn.is-active {
  background: linear-gradient(160deg, #ff7433, #ff5300);
  color: #fff;
  box-shadow: 0 6px 14px -8px rgba(255, 83, 0, 0.7);
}

html.dark .metas-seg-btn.is-active .metas-seg-count {
  opacity: 0.9;
}

.watch-status-pills,
.watch-status-pill,
.watch-status-count,
.watch-status-dot {
  /* legado — mantido vazio para não quebrar caches intermediários */
}

/* Watch / Metas: grid cinema; mobile só trava largura (sem scroll horizontal) */
.watch-cine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.watch-cine-card {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d1c2d;
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.65);
  outline: none;
}

.watch-cine-card:focus-visible {
  border-color: color-mix(in srgb, #ff7433 55%, transparent);
}

.watch-cine-cover.media-cover {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  padding: 0;
  overflow: hidden;
  background: #0b1726;
}

.watch-cine-cover > .media-cover-img,
.watch-cine-cover > .media-cover-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.watch-cine-card:hover .watch-cine-cover > .media-cover-img {
  transform: scale(1.04);
}

.watch-cine-scrim {
  display: block;
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.14) 42%,
    rgba(5, 20, 36, 0.95) 100%
  );
}

.watch-cine-top {
  position: absolute;
  z-index: 2;
  top: 8px;
  left: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  max-width: 100%;
}

.watch-cine-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 2px 7px;
  border-radius: 7px;
  font-size: 9px;
  font-weight: 800;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.watch-cine-type {
  background: color-mix(in srgb, #172554 70%, transparent);
  color: #bfdbfe;
  border-color: color-mix(in srgb, #f59b6c 30%, transparent);
}

.watch-cine-imdb {
  background: color-mix(in srgb, #f59e0b 92%, transparent);
  color: #130600;
  border-color: transparent;
  max-width: none;
}

.watch-cine-rt {
  background: color-mix(in srgb, #ef4444 90%, transparent);
  color: #fff;
  border-color: transparent;
  max-width: none;
}

.watch-cine-body {
  position: absolute;
  z-index: 2;
  left: 8px;
  right: 8px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}

.watch-cine-meta {
  font-size: 9px;
  font-weight: 600;
  color: #e6d9d3;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.watch-cine-title {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.watch-cine-capsule {
  padding: 6px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.58);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  max-width: 100%;
  box-sizing: border-box;
}

.watch-cine-capsule.is-watching {
  border-color: color-mix(in srgb, #38bdf8 30%, transparent);
}

.watch-cine-capsule.is-done {
  border-color: color-mix(in srgb, #34d399 30%, transparent);
}

.watch-cine-capsule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 9px;
  margin-bottom: 4px;
  min-width: 0;
}

.watch-cine-status {
  font-weight: 600;
  color: #b5a197;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.watch-cine-capsule.is-watching .watch-cine-status,
.watch-cine-capsule.is-watching .watch-cine-pct {
  color: #7dd3fc;
}

.watch-cine-capsule.is-done .watch-cine-status,
.watch-cine-capsule.is-done .watch-cine-pct {
  color: #6ee7b7;
}

.watch-cine-pct {
  flex-shrink: 0;
  font-weight: 800;
  color: #e6d9d3;
}

.watch-cine-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: rgba(19, 6, 0, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1px;
  display: flex;
  align-items: center;
  max-width: 100%;
}

.watch-cine-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5300, #38bdf8);
  min-width: 0;
  transition: width 0.25s ease;
}

.watch-cine-capsule.is-done .watch-cine-fill {
  background: linear-gradient(90deg, #059669, #14b8a6, #34d399);
}

.watch-cine-capsule.is-queue .watch-cine-fill {
  background: color-mix(in srgb, #ff5300 30%, transparent);
}

.watch-cine-thumb {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  margin-top: -5px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
  pointer-events: none;
  transform: translateX(-50%);
}

.watch-cine-thumb::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: inherit;
  background: #8a756c;
}

.watch-cine-capsule.is-watching .watch-cine-thumb::after {
  background: #0284c7;
}

.watch-cine-capsule.is-done .watch-cine-thumb::after {
  content: '✓';
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 7px;
  font-weight: 900;
  color: #130600;
  background: transparent;
}

.watch-cine-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.watch-cine-actions {
  display: none;
  align-items: center;
  gap: 4px;
}

.watch-cine-done {
  flex: 1;
  min-width: 0;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(19, 6, 0, 0.55);
  color: #f1e6e1;
  font-size: 10px;
  font-weight: 700;
}

.watch-cine-done.is-on {
  background: color-mix(in srgb, #10b981 28%, transparent);
  border-color: color-mix(in srgb, #34d399 35%, transparent);
  color: #6ee7b7;
}

.watch-cine-icon {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(19, 6, 0, 0.45);
  color: #e6d9d3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.watch-cine-icon .material-symbols-outlined {
  font-size: 15px;
}

.watch-cine-icon.is-danger:hover {
  color: #f87171;
}

.watch-cine-note-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 12px;
  height: 12px;
  padding: 0 3px;
  border-radius: 999px;
  background: #ff5300;
  color: #fff;
  font-size: 8px;
  font-weight: 800;
  line-height: 12px;
  text-align: center;
}

/* —— Mobile only: caber na largura, sem puxar para os lados —— */
@media (max-width: 767px) {
  .page-section:has(#page-goals:not(.hidden-page)),
  #page-goals,
  #page-goals .watch-catalog,
  #page-goals .watch-cine-grid,
  #page-goals .metas-hub,
  #page-goals .books-hub {
    overflow-x: hidden;
    max-width: 100%;
  }

  .metas-page-sub {
    display: none;
  }

  .metas-add-btn span:last-child {
    display: none;
  }

  .metas-add-btn {
    width: 32px;
    padding: 0;
    justify-content: center;
  }

  .metas-seg--5 .metas-seg-label {
    font-size: 10px;
  }

  #page-goals,
  #page-goals * {
    box-sizing: border-box;
  }

  .watch-goal-banner {
    padding: 10px 12px;
    max-width: 100%;
  }

  .watch-goal-banner-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }

  .watch-goal-banner-title {
    font-size: 12px;
  }

  .watch-goal-banner-xp {
    display: none;
  }

  .watch-cine-grid {
    gap: 8px;
  }

  .watch-cine-top,
  .watch-cine-body {
    left: 6px;
    right: 6px;
  }

  .watch-cine-top {
    top: 6px;
  }

  .watch-cine-body {
    bottom: 6px;
    gap: 4px;
  }

  .watch-cine-actions {
    display: none !important;
  }

  .watch-add-btn span:last-child {
    display: none;
  }

  .watch-add-btn {
    width: 32px;
    padding: 0;
    justify-content: center;
  }
}

/* Desktop / tablet: sem mudanças de layout mobile */
@media (min-width: 768px) {
  .watch-cine-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
  }

  .watch-cine-cover.media-cover {
    aspect-ratio: 2 / 3;
  }

  .watch-cine-top {
    top: 10px;
    left: 10px;
    right: 10px;
  }

  .watch-cine-body {
    left: 10px;
    right: 10px;
    bottom: 10px;
    gap: 6px;
  }

  .watch-cine-chip {
    font-size: 10px;
    padding: 3px 8px;
  }

  .watch-cine-title {
    font-size: 13px;
  }

  .watch-cine-capsule {
    padding: 8px;
  }

  .watch-cine-track {
    height: 12px;
  }

  .watch-cine-thumb {
    width: 12px;
    height: 12px;
    margin-top: -6px;
  }

  .watch-cine-actions {
    display: flex;
  }
}

@media (min-width: 1024px) {
  .watch-cine-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1280px) {
  .watch-cine-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}


/* —— Metas / Livros: estante híbrida —— */
.books-hub {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 100%;
  overflow-x: hidden;
}

.books-goal-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant, #2a170c) 70%, transparent);
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--hz-surface-container, #122131) 92%, transparent),
    color-mix(in srgb, var(--hz-surface, #051424) 96%, transparent)
  );
  box-shadow: 0 12px 28px -18px rgba(19, 6, 0, 0.45);
  color: #f1e6e1;
}

/* Light mode: card claro — evita cinza escuro ilegível no navy forçado */
html:not(.dark) .books-goal-card {
  background: linear-gradient(145deg, #ffffff 0%, #eef4ff 100%);
  border-color: color-mix(in srgb, var(--hz-outline-variant, #c3c6d7) 80%, transparent);
  color: var(--hz-on-surface, #130600);
  box-shadow: 0 10px 24px -16px rgba(19, 6, 0, 0.18);
}

.books-goal-orb {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 140px;
  height: 140px;
  border-radius: 999px;
  background: color-mix(in srgb, #ff5300 16%, transparent);
  filter: blur(36px);
  pointer-events: none;
}

html:not(.dark) .books-goal-orb {
  background: color-mix(in srgb, #ff5300 14%, transparent);
}

.books-goal-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.books-goal-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f59b6c;
}

html:not(.dark) .books-goal-kicker {
  color: #a33200;
}

.books-goal-title {
  margin: 4px 0 0;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

html:not(.dark) .books-goal-title {
  color: #130600;
}

.books-goal-of {
  font-size: 12px;
  font-weight: 500;
  color: #b5a197;
}

html:not(.dark) .books-goal-of {
  color: #5b4d47;
}

.books-goal-adjust {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 12px;
  border: 0;
  background: #ff5300;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 8px 16px -10px rgba(255, 83, 0, 0.55);
}

.books-goal-adjust .material-symbols-outlined {
  font-size: 14px;
}

.books-goal-edit {
  position: relative;
  z-index: 1;
  margin-top: 10px;
}

.books-goal-edit-label {
  display: block;
  font-size: 11px;
  color: #b5a197;
  margin-bottom: 4px;
}

html:not(.dark) .books-goal-edit-label {
  color: #5b4d47;
}

.books-goal-edit-row {
  display: flex;
  gap: 8px;
}

.books-goal-input {
  width: 88px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(19, 6, 0, 0.7);
  color: #fff;
  text-align: center;
  padding: 8px;
}

html:not(.dark) .books-goal-input {
  background: #fff;
  color: #130600;
  border-color: #e6d9d3;
}

.books-goal-save {
  padding: 8px 14px;
  border-radius: 10px;
  border: 0;
  background: #ff7433;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.books-goal-progress {
  position: relative;
  z-index: 1;
  margin-top: 14px;
}

.books-goal-progress-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #b5a197;
  margin-bottom: 6px;
}

html:not(.dark) .books-goal-progress-row {
  color: #5b4d47;
}

.books-goal-progress-row strong {
  color: #f59b6c;
}

html:not(.dark) .books-goal-progress-row strong {
  color: #a33200;
}

.books-goal-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.9);
  border: 1px solid rgba(51, 65, 85, 0.5);
  padding: 2px;
  overflow: hidden;
}

html:not(.dark) .books-goal-bar {
  background: #f1e6e1;
  border-color: #e6d9d3;
}

.books-goal-bar > div {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff5300, #ff7433, #22d3ee);
}

.books-goal-insights {
  position: relative;
  z-index: 1;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(51, 65, 85, 0.55);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
  font-size: 11px;
  color: #b5a197;
}

html:not(.dark) .books-goal-insights {
  border-top-color: #f1e6e1;
  color: #5b4d47;
}

.books-goal-insights strong {
  display: block;
  color: #f1e6e1;
  font-size: 12px;
  margin-bottom: 2px;
}

html:not(.dark) .books-goal-insights strong {
  color: #130600;
}

.books-goal-insights span {
  font-size: 9px;
  color: #b5a197;
}

html:not(.dark) .books-goal-insights span {
  color: #8a756c;
}

.books-shelf-tabs {
  display: none;
}

.books-hub--desktop .books-shelf-section,
.books-hub--desktop .book-now-playing,
.books-hub--desktop .books-streak-strip {
  display: none;
}

html.dark .books-shelf-tabs {
  background: rgba(13, 28, 45, 0.9);
  border-color: rgba(255, 255, 255, 0.08);
}

.books-shelf-tab {
  min-width: 0;
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--hz-on-surface-variant, #8a756c);
  font-size: 10px;
  font-weight: 700;
}

html:not(.dark) .books-shelf-tab:not(.is-active) {
  color: #2a170c;
}

.books-shelf-tab .material-symbols-outlined {
  font-size: 20px;
}

.books-shelf-tab.is-active {
  background: #fff;
  color: #a33200;
  box-shadow: 0 2px 8px rgba(19, 6, 0, 0.1);
}

html.dark .books-shelf-tab.is-active {
  background: linear-gradient(160deg, #ff7433, #ff5300);
  color: #fff;
}

.books-mine-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.books-add-btn {
  flex-shrink: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 12px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ff5300;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.books-add-btn .material-symbols-outlined {
  font-size: 18px;
}

.book-now-playing {
  margin-bottom: 4px;
}

.book-now-playing-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.book-now-playing-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0891b2;
}

html.dark .book-now-playing-live {
  color: #22d3ee;
}

.book-now-playing-ping {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #0891b2;
  box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.55);
  animation: books-ping 1.4s ease-out infinite;
}

html.dark .book-now-playing-ping {
  background: #22d3ee;
  box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55);
  animation-name: books-ping-dark;
}

@keyframes books-ping {
  0% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(8, 145, 178, 0); }
  100% { box-shadow: 0 0 0 0 rgba(8, 145, 178, 0); }
}

@keyframes books-ping-dark {
  0% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34, 211, 238, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 211, 238, 0); }
}

.book-now-playing-tag {
  font-size: 10px;
  color: #5b4d47;
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  padding: 2px 8px;
  border-radius: 8px;
}

html.dark .book-now-playing-tag {
  color: #b5a197;
  background: color-mix(in srgb, var(--hz-surface-container) 80%, transparent);
  border-color: color-mix(in srgb, var(--hz-outline-variant) 40%, transparent);
}

.book-now-playing-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, #0e7490 22%, #e6d9d3);
  background: linear-gradient(90deg, #f0f9ff, #eef2ff);
  color: #130600;
  cursor: pointer;
}

html.dark .book-now-playing-card {
  border-color: color-mix(in srgb, #0e7490 35%, transparent);
  background: linear-gradient(90deg, #0b1220, #111827);
  color: #f1e6e1;
}

.book-now-playing-cover.media-cover {
  width: 72px;
  height: 72px;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.book-now-playing-cover-icon {
  position: absolute;
  right: 4px;
  bottom: 4px;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #22d3ee;
  display: grid;
  place-items: center;
}

.book-now-playing-cover-icon .material-symbols-outlined {
  font-size: 14px;
}

.book-now-playing-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #130600;
}

html.dark .book-now-playing-title {
  color: #fff;
}

.book-now-playing-author {
  margin: 2px 0 0;
  font-size: 11px;
  color: #5b4d47;
}

html.dark .book-now-playing-author {
  color: #b5a197;
}

.book-now-playing-track {
  margin-top: 8px;
  height: 6px;
  border-radius: 999px;
  background: #f1e6e1;
  overflow: hidden;
}

html.dark .book-now-playing-track {
  background: #22150d;
}

.book-now-playing-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #ff7433);
}

.book-now-playing-times {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  color: #8a756c;
  margin-top: 4px;
}

html.dark .book-now-playing-times {
  color: #b5a197;
}

.book-now-playing-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.book-now-playing-play {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 0;
  background: #06b6d4;
  color: #130600;
  display: grid;
  place-items: center;
}

.book-now-playing-play .material-symbols-outlined {
  font-size: 18px;
  font-variation-settings: 'FILL' 1;
}

.books-shelf-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.books-shelf-heading h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--hz-on-surface);
}

.books-shelf-heading span {
  font-size: 11px;
  color: var(--hz-on-surface-variant);
  font-variant-numeric: tabular-nums;
}

.books-shelf-stage {
  position: relative;
  padding-top: 8px;
}

.books-shelf-glow {
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 48px;
  background: color-mix(in srgb, #ff7433 12%, transparent);
  filter: blur(24px);
  pointer-events: none;
}

.books-shelf-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 10px;
  align-items: end;
  max-width: 100%;
}

@media (min-width: 640px) {
  .books-shelf-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .books-shelf-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.book-shelf-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  outline: none;
}

.book-shelf-cover.media-cover {
  position: relative;
  width: 100%;
  max-width: 160px;
  aspect-ratio: 2 / 3;
  border-radius: 4px 10px 10px 4px;
  overflow: hidden;
  box-shadow:
    -4px 6px 14px rgba(0, 0, 0, 0.35),
    1px 0 3px rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease;
  background: #130600;
}

.book-shelf-card:hover .book-shelf-cover,
.book-shelf-card:focus-visible .book-shelf-cover {
  transform: translateY(-6px);
}

.book-shelf-status {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 2;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  color: #fff;
  background: #ff5300;
}

.book-shelf-status.is-done {
  background: #059669;
}

.book-shelf-status.is-queue {
  background: rgba(19, 6, 0, 0.75);
}

.book-shelf-rating {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 9px;
  color: #fbbf24;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.book-shelf-media {
  position: absolute;
  right: 6px;
  bottom: 28px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.7);
  color: #67e8f9;
  display: grid;
  place-items: center;
}

.book-shelf-media .material-symbols-outlined {
  font-size: 14px;
}

.book-shelf-footer {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 6px;
  background: rgba(19, 6, 0, 0.88);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
}

.book-shelf-footer-done {
  width: 100%;
  text-align: center;
  color: #6ee7b7;
}

.book-shelf-pct {
  color: #34d399;
  font-weight: 800;
}

.book-shelf-title {
  margin: 8px 0 0;
  font-size: 12px;
  font-weight: 700;
  color: var(--hz-on-surface);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-shelf-meta,
.book-shelf-pos {
  margin: 2px 0 0;
  font-size: 10px;
  color: var(--hz-on-surface-variant);
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-shelf-progress {
  display: none;
}

.book-shelf-actions {
  display: none;
  width: 100%;
  max-width: 160px;
  margin-top: 6px;
  gap: 4px;
  justify-content: center;
}

@media (min-width: 768px) {
  .book-shelf-actions {
    display: flex;
  }
}

.book-shelf-btn {
  flex: 1;
  min-width: 0;
  height: 28px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
  background: color-mix(in srgb, var(--hz-surface-container) 80%, transparent);
  color: var(--hz-on-surface);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.book-shelf-btn .material-symbols-outlined {
  font-size: 14px;
}

.book-shelf-btn.is-on {
  background: color-mix(in srgb, #10b981 25%, transparent);
  color: #059669;
}

.book-shelf-btn.is-danger:hover {
  color: #ef4444;
}

.books-wood-shelf {
  margin-top: 6px;
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(180deg, #22150d 0%, #130600 75%, #090d16 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 3px solid #04070e;
  box-shadow: 0 8px 16px -2px rgba(0, 0, 0, 0.35);
  position: relative;
}

.books-wood-shelf::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 155, 108, 0.45), transparent);
}

.books-wood-shadow {
  height: 10px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.35), transparent);
}

.books-shelf-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 28px 12px;
  color: var(--hz-on-surface-variant);
  border: 1px dashed color-mix(in srgb, var(--hz-outline-variant) 60%, transparent);
  border-radius: 16px;
}

.books-shelf-empty .material-symbols-outlined {
  font-size: 36px;
}

.books-streak-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
  background: color-mix(in srgb, var(--hz-surface-container-low) 90%, transparent);
}

.books-streak-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, #ff5300 16%, transparent);
  color: #ff7433;
  border: 1px solid color-mix(in srgb, #ff5300 30%, transparent);
}

.books-streak-icon .material-symbols-outlined {
  font-size: 18px;
}

.books-streak-copy {
  flex: 1;
  min-width: 0;
}

.books-streak-copy strong {
  display: block;
  font-size: 12px;
  color: var(--hz-on-surface);
}

.books-streak-copy span {
  font-size: 11px;
  color: var(--hz-on-surface-variant);
}

.books-streak-fire {
  font-size: 13px;
  font-weight: 800;
  color: #f59e0b;
}

@media (max-width: 767px) {
  .books-add-btn-label {
    display: none;
  }

  .books-add-btn {
    width: 40px;
    padding: 0;
    justify-content: center;
  }

  .books-hub,
  .books-shelf-grid,
  .books-shelf-tabs {
    overflow-x: hidden;
    max-width: 100%;
  }
}

.media-done {
  opacity: 0.92;
}

.media-cover {
  aspect-ratio: 2 / 3;
  background: #e5eeff;
  overflow: hidden;
}

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

.media-cover.is-platform-banner {
  background: #051933;
}

.media-cover.is-platform-banner .media-cover-img {
  object-fit: contain;
  padding: 10%;
}

.media-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
  font-weight: 700;
}

.media-cover-fallback-hidden {
  display: none;
}

.media-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(19, 6, 0, 0.75);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  backdrop-filter: blur(4px);
  max-width: calc(100% - 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-badge-status {
  top: auto;
  bottom: 8px;
  left: 8px;
}

.media-ratings-stack {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}
.media-ratings-stack .imdb-badge,
.media-ratings-stack .rt-badge {
  position: static;
}
.rt-badge {
  position: absolute;
  top: 34px;
  right: 8px;
  background: rgba(250, 50, 50, 0.92);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}
.watch-detail-hero-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.watch-detail-hero-rating.is-rt {
  background: rgba(250, 50, 50, 0.92);
  color: #fff;
}
.imdb-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(245, 158, 11, 0.92);
  color: #111;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.trip-flag {
  position: absolute;
  top: 42px;
  right: 10px;
  width: 40px;
  height: 28px;
  object-fit: cover;
  border-radius: 4px;
  z-index: 3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: #fff;
}

.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.trip-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #e5eeff;
  overflow: hidden;
}

.dash-next-trip {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-next-trip-label {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--hz-on-surface);
}

.dash-next-trip-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dash-next-trip-card:hover {
  transform: translateY(-1px);
}

.dash-next-trip-cover {
  aspect-ratio: 16 / 10;
}

.dash-next-trip-cover .trip-cover-overlay {
  padding: 10px;
}

.dash-next-trip-cover .font-headline-sm {
  font-size: 1.05rem;
  line-height: 1.25;
}

.dash-next-trip-cover--empty {
  background: color-mix(in srgb, var(--hz-primary, #ff5300) 10%, var(--hz-surface-container-low));
  aspect-ratio: 16 / 9;
}

html.dark .dash-next-trip-card,
html.dark .dash-next-trip-card.border,
html.dark .dash-next-trip-card[class*='border-outline'] {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

html.dark .dash-next-trip-cover--empty {
  background: color-mix(in srgb, var(--hz-primary, #ff5300) 14%, var(--hz-surface-container));
}

.trip-cover .media-cover-img,
.trip-cover .media-cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trip-cover-overlay {
  position: absolute;
  inset: 0;
  padding: 12px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to top, rgba(19, 6, 0, 0.85) 0%, rgba(19, 6, 0, 0.15) 55%, transparent 100%);
  pointer-events: none;
}

.trip-badges-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
  z-index: 2;
}

.trip-cover-overlay .media-badge,
.trip-detail-cover .media-badge {
  position: static;
  max-width: none;
  pointer-events: none;
}

.trip-badges-row .media-badge-status {
  margin-left: auto;
}

.trip-card .media-badge-status {
  left: auto;
  right: auto;
  bottom: auto;
  top: auto;
  z-index: 3;
}

.trip-detail-cover {
  aspect-ratio: 16 / 9;
  background: #e5eeff;
}

.trip-detail-cover .media-cover-img,
.trip-detail-cover .media-cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trip-doc-row a {
  text-decoration: none;
}


.trip-itin-module .itin-next-card {
  isolation: isolate;
}

.trip-itin-module .itin-timeline > div:last-child {
  border-left-color: transparent;
}

.trip-itin-module .itin-stop-card h5 {
  font-size: 15px;
  line-height: 1.35;
}


body.trip-workspace-open .page-section {
  display: none;
}

body.cortex-overview-open main.app-main {
  background:
    radial-gradient(90% 80% at 50% 110%, rgba(140, 192, 255, 0.28) 0%, rgba(221, 235, 255, 0.35) 40%, transparent 75%),
    linear-gradient(160deg, #f2f4f7 0%, #f2f4f7 55%, #e3eefc 100%);
}

body.cortex-overview-open.dark main.app-main,
html.dark body.cortex-overview-open main.app-main {
  background: var(--hz-surface, #130600);
}


body.project-workspace-open .app-topbar { display: none !important; }

body.project-workspace-open .mobile-bottom-nav { display: none !important; }

body.project-workspace-open main {
  padding-bottom: 0 !important;
  background: var(--hz-surface-container-lowest);
}

body.project-workspace-open .page-section {
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh;
  min-height: 100dvh;
  animation: none !important;
}

body.project-workspace-open #page-projects {
  min-height: 100vh;
  min-height: 100dvh;
}

body.project-workspace-open .ptask-workspace {
  min-height: 100vh;
  min-height: 100dvh;
  height: 100vh;
  height: 100dvh;
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  background: var(--hz-surface-container-lowest);
}

body.project-workspace-open .ptask-sidebar {
  background: var(--hz-surface-container-low);
  border-left: 1px solid var(--hz-outline-variant);
  border-right: none;
}

body.project-workspace-open .ptask-main {
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
  min-width: 0;
}

body.project-workspace-open .ptask-toolbar {
  flex-shrink: 0;
  margin: 0;
  padding: 10px 16px;
  min-height: 56px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  background: var(--hz-surface-container-lowest);
}

body.project-workspace-open .ptask-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 16px 20px;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 900px) {
  body.project-workspace-open .ptask-workspace,
  body.project-workspace-open .ptask-workspace.is-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: minmax(0, 1fr);
  }

  body.project-workspace-open .ptask-toolbar {
    padding: calc(10px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 10px max(12px, env(safe-area-inset-left, 0px));
    min-height: 0;
  }

  body.project-workspace-open .ptask-sidebar {
    border-left: 1px solid var(--hz-outline-variant);
    border-right: none;
    border-bottom: none;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  }

  body.project-workspace-open .ptask-body {
    padding: 12px;
  }
}

#trip-workspace-root:empty {
  display: none;
}

.trip-workspace {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4.5rem);
  background: var(--hz-background, #fbf6f3);
  color: var(--hz-on-surface, #130600);
}

.trip-ws-topbar {
  flex-shrink: 0;
  height: 56px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--hz-surface, #fbf6f3);
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant, #c3c6d7) 70%, transparent);
  z-index: 2;
}

.trip-ws-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.trip-ws-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}

@media (min-width: 768px) {
  .trip-ws-inner {
    padding: 32px 32px 56px;
  }
}

.trip-ws-card,
.trip-ws-bento {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

.trip-ws-side {
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
}

@media (min-width: 1024px) {
  .trip-ws-side {
    border-top: none;
    border-left: 1px solid color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
  }
}

.trip-ws-check {
  border-left: 3px solid transparent;
}

.trip-ws-check.is-done {
  border-left-color: var(--hz-primary);
}

.trip-ws-next {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--hz-primary) 88%, #130600) 0%,
    var(--hz-primary-container) 55%,
    color-mix(in srgb, var(--hz-primary-container) 70%, #1e3a8a) 100%
  );
  color: var(--hz-on-primary-container);
}

.trip-ws-itin .trip-itin-module {
  border-top: none;
  background: var(--hz-surface-container-lowest, #fff);
  border: none;
  border-radius: 1rem;
  padding: 20px;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

.trip-ws-itin .itin-timeline {
  max-height: none;
}

.trip-ws-itin .border-dashed {
  border-style: solid;
  border-color: color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}

html.dark .trip-ws-topbar {
  border-bottom-color: color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  box-shadow: none;
}

html.dark .trip-ws-card,
html.dark .trip-ws-bento,
html.dark .trip-ws-itin .trip-itin-module {
  box-shadow: 0 8px 24px -8px rgb(0 0 0 / 0.55);
}

html.dark .trip-ws-side {
  border-color: color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
}

html.dark .trip-workspace [class*='border-outline'],
html.dark .trip-workspace .border,
html.dark .trip-workspace .border-t,
html.dark .trip-workspace .border-b,
html.dark .trip-workspace .border-l,
html.dark .trip-workspace .border-dashed {
  border-color: color-mix(in srgb, var(--hz-outline-variant) 65%, transparent) !important;
}

html.dark .trip-ws-check:not(.is-done) {
  background: var(--hz-surface-container);
}

html.dark .trip-ws-next {
  background: linear-gradient(
    145deg,
    #1a3a8f 0%,
    var(--hz-primary-container) 50%,
    #1e40af 100%
  );
}

.trip-weather-day .material-symbols-outlined {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

html.dark .trip-weather-day {
  background: var(--hz-surface-container-high);
}


body.trip-itin-open .page-section {
  display: none;
}

body.trip-itin-open #trip-workspace-root {
  display: none;
}

#trip-itin-root:empty {
  display: none;
}

.trip-itin-screen {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 4.5rem);
  background: var(--hz-background, #fbf6f3);
  color: var(--hz-on-surface, #130600);
}


.friends-popover-backdrop {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: transparent;
}

.friends-popover {
  position: fixed;
  z-index: 111;
  display: flex;
  flex-direction: column;
  background: var(--hz-surface-container-lowest, #fff);
  color: var(--hz-on-surface);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px -12px rgba(19, 6, 0, 0.35), 0 8px 16px -8px rgba(19, 6, 0, 0.2);
  animation: friends-pop-in 0.16s ease-out;
}

@keyframes friends-pop-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.friends-popover-arrow {
  position: absolute;
  top: -7px;
  width: 14px;
  height: 14px;
  background: var(--hz-surface-container-lowest, #fff);
  border-left: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
  transform: rotate(45deg);
  z-index: 2;
}

.friends-popover--above .friends-popover-arrow {
  top: auto;
  bottom: -7px;
  border-left: none;
  border-top: none;
  border-right: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
}

.friends-popover-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 40%, transparent);
  background: var(--hz-surface-container-lowest, #fff);
}

.friends-popover-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  min-height: 0;
}

#btn-friends.is-open,
#btn-friends[aria-expanded='true'] {
  background: color-mix(in srgb, var(--hz-primary) 16%, transparent);
  color: var(--hz-primary);
}

.friends-glass {
  background: color-mix(in srgb, var(--hz-surface-container) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 45%, transparent);
}

html.dark .friends-glass {
  background: rgba(19, 6, 0, 0.55);
  border-color: rgba(255, 255, 255, 0.12);
}

.friends-zenny {
  background: var(--hz-surface-container-high, #222a3d);
}

html.dark .friends-popover {
  background: var(--hz-surface-container-lowest, #1b0b03);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 20px 48px -10px rgba(0, 0, 0, 0.65);
}

html.dark .friends-popover-arrow {
  background: var(--hz-surface-container-lowest, #1b0b03);
  border-color: rgba(255, 255, 255, 0.14);
}

html.dark .friends-popover-head {
  background: var(--hz-surface-container-lowest, #1b0b03);
  border-color: rgba(255, 255, 255, 0.12);
}

html.dark .friends-popover [class*='border-outline'],
html.dark .friends-popover .border,
html.dark .friends-popover .border-b {
  border-color: rgba(255, 255, 255, 0.12) !important;
}

.trip-itin-topbar {
  flex-shrink: 0;
  min-height: 56px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--hz-surface, #fbf6f3);
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 45%, transparent);
  z-index: 2;
}

.trip-itin-split {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

.trip-itin-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--hz-surface-container-lowest, #fff);
  z-index: 10;
  min-height: 0;
}

@media (min-width: 768px) {
  .trip-itin-panel {
    width: 420px;
    max-width: 42vw;
    border-right: 1px solid color-mix(in srgb, var(--hz-outline-variant) 45%, transparent);
  }
}

@media (min-width: 1024px) {
  .trip-itin-panel {
    width: 450px;
  }
}

.trip-itin-map {
  flex: 1;
  position: relative;
  background: #e6d9d3;
  min-width: 0;
}

.trip-itin-map-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 1;
}

.trip-lodging-marker {
  background: transparent;
  border: none;
}

.trip-lodging-pin {
  width: 40px;
  height: 52px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  filter: drop-shadow(0 6px 12px rgba(19, 6, 0, 0.35));
  pointer-events: none;
}

.trip-lodging-pin-svg {
  display: block;
  overflow: visible;
}

.trip-lodging-pin-body {
  fill: var(--hz-primary, #ff5300);
  stroke: #fff;
  stroke-width: 2.5;
}

.trip-lodging-pin-house {
  fill: #fff;
}

html.dark .trip-lodging-pin-body {
  stroke: #1b0b03;
}

.trip-stop-marker {
  background: transparent;
  border: none;
}

.trip-stop-pin {
  width: 28px;
  height: 36px;
  position: relative;
  filter: drop-shadow(0 4px 8px rgba(19, 6, 0, 0.35));
}

.trip-stop-pin::before {
  content: '';
  position: absolute;
  inset: 0 0 6px 0;
  background: var(--hz-primary, #ff5300);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  border: 2px solid #fff;
  box-sizing: border-box;
}

.trip-stop-pin.is-next::before {
  background: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.35);
}

.trip-stop-pin.is-done::before {
  background: #22c55e;
}

.trip-stop-num {
  position: absolute;
  left: 0;
  right: 0;
  top: 5px;
  z-index: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  pointer-events: none;
}

html.dark .trip-stop-pin::before {
  border-color: #1b0b03;
}

.itin-day-acc.is-open .itin-day-chevron {
  transform: rotate(180deg);
}

.itin-day-chevron {
  transition: transform 0.2s ease;
}

.itin-day-acc-head:focus-visible {
  outline: 2px solid var(--hz-primary, #ff5300);
  outline-offset: -2px;
}

.itin-stop-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--hz-surface-container-high, #22150d);
  flex-shrink: 0;
}

.itin-stop-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.itin-stop-thumb-fallback {
  display: none;
  position: absolute;
  inset: 0;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--hz-on-surface-variant, #b5a197);
}

.itin-stop-thumb--pending {
  opacity: 0.85;
}

.itin-stop-thumb.is-fallback .itin-stop-thumb-img {
  opacity: 1;
}

.trip-itin-map-stats {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  justify-content: center;
  z-index: 20;
  pointer-events: none;
}

.trip-itin-glass {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 28px;
  border-radius: 1rem;
  background: color-mix(in srgb, var(--hz-surface-container-lowest) 78%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid color-mix(in srgb, #fff 35%, transparent);
  box-shadow: 0 12px 32px -8px rgb(0 0 0 / 0.25);
}

.trip-itin-map-pin {
  position: absolute;
  top: 32%;
  left: 42%;
  z-index: 15;
  pointer-events: none;
}

.trip-itin-map-pin-label {
  background: var(--hz-primary);
  color: var(--hz-on-primary);
  font-weight: 700;
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 6px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.25);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.trip-itin-map-pin-dot {
  width: 32px;
  height: 32px;
  margin: 0 auto;
  border-radius: 999px;
  background: var(--hz-primary);
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: trip-itin-pulse 1.6s ease-in-out infinite;
}

.trip-itin-map-pin-core {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #fff;
}

@keyframes trip-itin-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.trip-itin-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background: var(--hz-primary);
  color: var(--hz-on-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px -6px color-mix(in srgb, var(--hz-primary) 55%, transparent);
  z-index: 96;
}

html.dark .trip-itin-topbar {
  border-bottom-color: color-mix(in srgb, var(--hz-outline-variant) 60%, transparent);
}

html.dark .trip-itin-panel {
  border-right-color: color-mix(in srgb, var(--hz-outline-variant) 60%, transparent);
}

html.dark .trip-itin-glass {
  background: color-mix(in srgb, var(--hz-surface-container) 82%, transparent);
  border-color: color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
}

html.dark .trip-itin-map {
  background: #1a2436;
}

html.dark .trip-itin-screen [class*='border-outline'],
html.dark .trip-itin-screen .border,
html.dark .trip-itin-screen .border-b,
html.dark .trip-itin-screen .border-t {
  border-color: color-mix(in srgb, var(--hz-outline-variant) 65%, transparent) !important;
}


.quest-hero {
  isolation: isolate;
  background-color: var(--hz-primary);
  background-image:
    repeating-linear-gradient(
      -60deg,
      rgba(255, 255, 255, 0.05) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.12) 3px 4px,
      transparent 4px 6px
    ),
    repeating-linear-gradient(
      30deg,
      rgba(255, 255, 255, 0.035) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.1) 3px 4px,
      transparent 4px 6px
    );
  background-size: 7px 7px, 7px 7px;
  box-shadow:
    0 10px 28px -8px color-mix(in srgb, var(--hz-primary) 45%, transparent),
    0 4px 10px -4px color-mix(in srgb, var(--hz-primary) 25%, transparent),
    inset 0 1px 0 rgb(255 255 255 / 0.12);
}

html.dark .quest-hero {
  background-color: var(--hz-primary);
  background-image:
    repeating-linear-gradient(
      -60deg,
      rgba(255, 255, 255, 0.045) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.18) 3px 4px,
      transparent 4px 6px
    ),
    repeating-linear-gradient(
      30deg,
      rgba(255, 255, 255, 0.03) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.14) 3px 4px,
      transparent 4px 6px
    );
  background-size: 7px 7px, 7px 7px;
  box-shadow:
    0 10px 28px -8px rgb(0 0 0 / 0.45),
    0 4px 10px -4px color-mix(in srgb, var(--hz-primary) 35%, transparent),
    inset 0 1px 0 rgb(255 255 255 / 0.1);
}

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

.quest-hero--dash {
  margin-bottom: 0;
}


.hz-blue-texture {
  isolation: isolate;
  background-color: var(--hz-primary) !important;
  background-image:
    repeating-linear-gradient(
      -60deg,
      rgba(255, 255, 255, 0.05) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.12) 3px 4px,
      transparent 4px 6px
    ),
    repeating-linear-gradient(
      30deg,
      rgba(255, 255, 255, 0.035) 0 1px,
      transparent 1px 3px,
      rgba(0, 0, 0, 0.1) 3px 4px,
      transparent 4px 6px
    );
  background-size: 7px 7px, 7px 7px;
}

.quest-level-badge {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  flex-shrink: 0;
}

.quest-stat-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 10px 12px;
}

.quest-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.quest-day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quest-day-picker--compact {
  gap: 4px;
}

.quest-day-dot {
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  background: var(--hz-surface-container);
  color: var(--hz-on-surface-variant);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.12s ease;
}

.quest-day-dot:hover {
  border-color: var(--hz-primary);
  color: var(--hz-primary);
}

.quest-day-dot.is-on {
  background: var(--hz-primary);
  border-color: var(--hz-primary);
  color: var(--hz-on-primary);
}

.quest-day-dot:active {
  transform: scale(0.94);
}

.quest-day-dot--static {
  width: 22px;
  height: 22px;
  font-size: 9px;
  cursor: default;
  pointer-events: none;
  border-color: transparent;
  background: transparent;
  color: var(--hz-on-surface-variant);
  opacity: 0.35;
}

.quest-day-dot--static.is-on {
  background: color-mix(in srgb, var(--hz-primary) 18%, transparent);
  color: var(--hz-primary);
  opacity: 1;
}

.quest-day-dot--static.is-off {
  opacity: 0.28;
  background: transparent;
  color: var(--hz-on-surface-variant);
}

.quest-day-dot--static.is-done {
  background: color-mix(in srgb, #10b981 28%, transparent);
  border-color: color-mix(in srgb, #10b981 45%, transparent);
  color: #059669;
  opacity: 1;
}

.quest-day-dot--static.is-missed {
  background: color-mix(in srgb, #ef4444 24%, transparent);
  border-color: color-mix(in srgb, #ef4444 40%, transparent);
  color: #dc2626;
  opacity: 1;
}

.quest-day-dot--static.is-pending {
  background: color-mix(in srgb, var(--hz-primary) 18%, transparent);
  border-color: color-mix(in srgb, var(--hz-primary) 35%, transparent);
  color: var(--hz-primary);
  opacity: 1;
}

.quest-day-dot--static.is-upcoming {
  background: color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
  border-color: transparent;
  color: var(--hz-on-surface-variant);
  opacity: 0.75;
}

html.dark .quest-day-dot:not(.is-on):not(.quest-day-dot--static) {
  border-color: rgba(42, 23, 12, 0.95);
  background: var(--hz-surface-container);
}

html.dark .quest-day-dot--static.is-off {
  background: transparent;
  border-color: transparent;
  opacity: 0.3;
}

html.dark .quest-day-dot--static.is-done {
  background: color-mix(in srgb, #34d399 28%, transparent);
  border-color: color-mix(in srgb, #34d399 40%, transparent);
  color: #6ee7b7;
}

html.dark .quest-day-dot--static.is-missed {
  background: color-mix(in srgb, #f87171 22%, transparent);
  border-color: color-mix(in srgb, #f87171 35%, transparent);
  color: #fca5a5;
}

html.dark .quest-day-dot--static.is-pending {
  background: color-mix(in srgb, var(--hz-primary) 22%, transparent);
  border-color: color-mix(in srgb, var(--hz-primary) 40%, transparent);
  color: var(--hz-primary);
}

html.dark .quest-day-dot--static.is-upcoming {
  background: color-mix(in srgb, var(--hz-surface-container-high) 80%, transparent);
  color: var(--hz-on-surface-variant);
  opacity: 0.7;
}

.quest-card-done {
  box-shadow: 0 0 0 2px rgba(0, 108, 73, 0.25);
}

.quest-card {
  transition: transform 0.15s ease;
}

.quest-card:active {
  transform: scale(0.98);
}

.rank-row {
  transition: background 0.15s ease;
}

.rank-me {
  box-shadow: 0 0 0 1px rgba(255, 83, 0, 0.35);
}


body.tour-open {
  overflow: hidden;
}

.tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(19, 6, 0, 0.62);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  padding: 20px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
  padding-left: max(20px, env(safe-area-inset-left));
}

.tour-overlay--right {
  justify-content: flex-end;
  padding-left: 20px;
  padding-right: max(20px, env(safe-area-inset-right));
}

.tour-corner {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 16px;
  max-width: min(560px, 100%);
  pointer-events: auto;
}

.tour-corner--right {
  max-width: min(580px, 100%);
}


body.tour-spotlight .sidebar {
  z-index: 210;
}

body.tour-spotlight .sidebar .nav-link:not(.tour-nav-spotlight) {
  opacity: 0.4;
  pointer-events: none;
}

.nav-link.tour-nav-spotlight {
  background: #eff4ff !important;
  color: #c43d00 !important;
  box-shadow: 0 0 0 2px #ff5300, 0 0 0 6px rgba(255, 83, 0, 0.35);
  animation: tour-nav-pulse 1.6s ease-in-out infinite;
}

.nav-link.tour-nav-spotlight .material-symbols-outlined {
  color: #ff5300;
  font-variation-settings: 'FILL' 1;
}

@keyframes tour-nav-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px #ff5300, 0 0 0 6px rgba(255, 83, 0, 0.3);
  }
  50% {
    box-shadow: 0 0 0 2px #ff5300, 0 0 0 10px rgba(255, 83, 0, 0.18);
  }
}

.tour-pose {
  width: min(38vw, 180px);
  height: auto;
  flex-shrink: 0;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.45));
  animation: tour-pose-in 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  user-select: none;
  pointer-events: none;
}

.tour-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 8px;
  color: #fce3d8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.tour-guide-label {
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #f9c4ae;
  margin: 0;
}

.tour-title {
  font-size: 22px;
  font-weight: 600;
  line-height: 28px;
  letter-spacing: -0.01em;
  color: #ffffff;
  margin: 0;
}

.tour-body {
  font-size: 15px;
  font-weight: 400;
  line-height: 22px;
  color: #c3c6d7;
  margin: 0 0 4px;
}

.tour-dots {
  display: flex;
  gap: 6px;
  margin: 4px 0;
}

.tour-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(180, 197, 255, 0.35);
  transition: width 0.2s ease, background 0.2s ease;
}

.tour-dot.is-active {
  width: 20px;
  background: #ff5300;
}

.tour-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.tour-btn {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  cursor: pointer;
  border: none;
  transition: background 0.15s ease, transform 0.1s ease;
}

.tour-btn:active {
  transform: scale(0.98);
}

.tour-btn-primary {
  background: #ff5300;
  color: #ffffff;
}

.tour-btn-primary:hover {
  background: #c43d00;
}

.tour-btn-ghost {
  background: transparent;
  color: #c3c6d7;
  border: 1px solid rgba(195, 198, 215, 0.45);
}

.tour-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

@keyframes tour-pose-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes tour-corner-in {
  from {
    opacity: 0;
    transform: translate(-12px, 16px);
  }
  to {
    opacity: 1;
    transform: translate(0, 0);
  }
}

.animate-tour-in {
  animation: tour-corner-in 0.45s ease-out;
}

@media (max-width: 639px) {
  .tour-corner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .tour-corner--right {
    align-items: flex-end;
    text-align: right;
  }

  .tour-corner--right .tour-actions {
    justify-content: flex-end;
  }

  .tour-corner--right .tour-dots {
    justify-content: flex-end;
  }

  .tour-pose {
    width: min(42vw, 150px);
    align-self: flex-start;
  }

  .tour-corner--right .tour-pose {
    align-self: flex-end;
  }

  .tour-title {
    font-size: 20px;
    line-height: 26px;
  }

  .tour-body {
    font-size: 14px;
    line-height: 20px;
  }

  .tour-actions {
    width: 100%;
  }

  .tour-btn {
    flex: 1;
    min-width: 0;
  }
}

@media (min-width: 640px) {
  .tour-overlay {
    padding: 32px;
    padding-bottom: max(32px, env(safe-area-inset-bottom));
    padding-left: max(32px, env(safe-area-inset-left));
  }

  .tour-overlay--right {
    padding-right: max(32px, env(safe-area-inset-right));
  }

  .tour-corner {
    gap: 20px;
    max-width: 620px;
  }

  .tour-pose {
    width: 220px;
  }

  .tour-title {
    font-size: 24px;
    line-height: 32px;
  }

  .tour-body {
    font-size: 16px;
    line-height: 24px;
  }
}


.cal-brand-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--hz-surface-container-low) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--hz-outline) 18%, transparent);
}

.cal-brand-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: color-mix(in srgb, var(--hz-on-surface-variant) 72%, transparent);
  cursor: pointer;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.cal-brand-btn:hover {
  color: var(--hz-on-surface);
  background: var(--hz-surface-bright);
  border-color: color-mix(in srgb, var(--hz-outline) 22%, transparent);
}

.cal-brand-btn:active {
  transform: scale(0.96);
}

.cal-brand-svg {
  width: 20px;
  height: 20px;
  display: block;
}

.cal-brand-img {
  width: 22px;
  height: 22px;
  display: block;
  object-fit: contain;
  border-radius: 4px;
  pointer-events: none;
}

.cal-brand-btn--google .cal-brand-img,
.cal-brand-btn--outlook .cal-brand-img {
  width: 24px;
  height: 24px;
}

.cal-brand-dot {
  position: absolute;
  right: 7px;
  bottom: 7px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: transparent;
  box-shadow: 0 0 0 1.5px var(--hz-surface-container-low);
  opacity: 0;
  transition: opacity 0.18s ease, background 0.18s ease;
}

.cal-brand-btn.is-connected .cal-brand-dot {
  opacity: 1;
  background: #1f8a5b;
}

.cal-brand-btn--google.is-connected,
.cal-brand-btn--outlook.is-connected {
  color: inherit;
}

.cal-brand-btn--gear {
  color: color-mix(in srgb, var(--hz-on-surface-variant) 55%, transparent);
}

.cal-brand-btn--gear:hover {
  color: var(--hz-on-surface-variant);
}

html.dark .cal-brand-row {
  background: color-mix(in srgb, var(--hz-surface-container-high) 55%, transparent);
}


.task-timeline-sep {
  height: 1px;
  width: 100%;
  background: color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
}

.task-timeline-rail {
  background: color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}

.task-timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: var(--hz-outline-variant);
  box-shadow: 0 0 0 4px var(--hz-surface-container-lowest);
}

.task-timeline-dot--active {
  background: var(--hz-primary);
}

.task-timeline-comment {
  background: var(--hz-surface-container-low);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 40%, transparent);
}

.task-timeline-footer {
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
}

.task-timeline-input {
  background: var(--hz-surface-container);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  color: var(--hz-on-surface);
}

.task-timeline-input:focus {
  border-color: var(--hz-primary);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hz-primary) 25%, transparent);
}


html.dark .task-timeline-modal,
html.dark #modal-panel.task-timeline-modal {
  border: 0 !important;
  outline: none !important;
  box-shadow: 0 20px 48px -12px rgb(0 0 0 / 0.7);
}

html.dark .task-timeline-sep {
  display: none;
}

html.dark .task-timeline-footer {
  border-top: 0 !important;
  box-shadow: none;
  background: var(--hz-surface-container-lowest);
}

html.dark .task-timeline-rail {
  background: rgba(42, 23, 12, 0.9);
}

html.dark .task-timeline-dot {
  background: #3a4d66;
  box-shadow: 0 0 0 4px var(--hz-surface-container-lowest);
}

html.dark .task-timeline-dot--active {
  background: var(--hz-primary);
}

html.dark .task-timeline-comment {
  background: var(--hz-surface-container);
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}

html.dark .task-timeline-input {
  background: var(--hz-surface-container);
  border: 1px solid rgba(255, 116, 51, 0.55);
}

html.dark .task-timeline-input:focus {
  border-color: var(--hz-primary);
}


html.dark #modal-panel {
  border-color: transparent !important;
}

html.dark #modal-panel.border,
html.dark #modal-panel[class*='border-outline'] {
  border: 0 !important;
}

html.dark #modal-panel [class*='border-outline'],
html.dark #modal-panel .border-b,
html.dark #modal-panel .border-t,
html.dark #modal-panel .border,
html.dark #modal-panel .border-b-outline-variant,
html.dark #modal-panel .border-t-outline-variant {
  border-color: rgba(42, 23, 12, 0.75) !important;
}

html.dark #modal-panel .ring-4,
html.dark #modal-panel [class*='ring-surface'],
html.dark #modal-panel [class*='ring-white'] {
  --tw-ring-color: var(--hz-surface-container-lowest) !important;
  --tw-ring-shadow: 0 0 0 4px var(--hz-surface-container-lowest) !important;
}



.course-nb-panel #panel-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.course-nb {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(160px, 210px) minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  background: #e8edf4;
}

html.dark .course-nb {
  background: #130600;
}

.course-nb-sections,
.course-nb-pages {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid rgba(19, 6, 0, 0.08);
  background: #f4f7fb;
}

html.dark .course-nb-sections,
html.dark .course-nb-pages {
  background: #111827;
  border-right-color: rgba(255, 255, 255, 0.15);
}

.course-nb-col-label {
  padding: 12px 14px 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #8a756c;
}

.course-nb-sections-list,
.course-nb-pages-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px 8px;
}

.course-nb-section {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 10px 10px 10px 14px;
  margin-bottom: 4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.course-nb-section:hover {
  background: rgba(19, 6, 0, 0.05);
}

.course-nb-section.is-active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(19, 6, 0, 0.06);
}

html.dark .course-nb-section.is-active {
  background: #22150d;
}

.course-nb-section-tab {
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  border-radius: 0 4px 4px 0;
  background: var(--nb-tab, #ff7433);
}

.course-nb-section-title {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.course-nb-section-count {
  font-size: 11px;
  color: #b5a197;
}

.course-nb-add-sec,
.course-nb-add-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 8px;
  padding: 10px 12px;
  border: 1px dashed rgba(255, 116, 51, 0.45);
  border-radius: 12px;
  background: rgba(255, 116, 51, 0.06);
  color: #ff5300;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.course-nb-add-sec:hover,
.course-nb-add-page:hover {
  background: rgba(255, 116, 51, 0.12);
}

.course-nb-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 8px 8px;
  padding: 0 10px;
  border: 1px solid rgba(19, 6, 0, 0.12);
  border-radius: 10px;
  background: #fff;
}

html.dark .course-nb-search-wrap {
  background: #130600;
  border-color: rgba(255, 255, 255, 0.2);
}

.course-nb-search-icon {
  font-size: 18px;
  color: #b5a197;
  flex-shrink: 0;
}

.course-nb-search {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent !important;
  background-color: transparent !important;
  color: #130600;
  -webkit-text-fill-color: #130600;
  font-size: 13px;
  padding: 9px 0;
  outline: none;
  color-scheme: light;
}

html.dark .course-nb-search {
  color: #f1e6e1 !important;
  -webkit-text-fill-color: #f1e6e1;
  color-scheme: dark;
}

.course-nb-search::placeholder {
  color: #b5a197;
  -webkit-text-fill-color: #b5a197;
  opacity: 1;
}

.course-nb-pages-empty {
  margin: 12px 10px;
  font-size: 12px;
  color: #b5a197;
  text-align: center;
}

.course-nb-page-row {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin-bottom: 4px;
  border-radius: 10px;
}

.course-nb-page-row.is-active {
  background: #fff;
  box-shadow: 0 1px 2px rgba(19, 6, 0, 0.06);
}

html.dark .course-nb-page-row.is-active {
  background: #22150d;
}

.course-nb-page-row:hover {
  background: rgba(19, 6, 0, 0.05);
}

html.dark .course-nb-page-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.course-nb-page {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  flex: 1;
  min-width: 0;
  text-align: left;
  padding: 10px 8px 10px 12px;
  margin: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.course-nb-page.is-active {
  background: transparent;
  box-shadow: none;
}

.course-nb-page-del {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  flex-shrink: 0;
  margin: 4px 4px 4px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #b5a197;
  cursor: pointer;
  opacity: 0.55;
}

.course-nb-page-row:hover .course-nb-page-del,
.course-nb-page-row.is-active .course-nb-page-del {
  opacity: 1;
}

.course-nb-page-del:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.1);
}

.course-nb-page-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.course-nb-page-date {
  font-size: 11px;
  color: #b5a197;
}

.course-nb-pages-meta {
  padding: 8px 12px 12px;
  font-size: 11px;
  color: #b5a197;
}

.course-nb-canvas {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #eef2f7;
}

html.dark .course-nb-canvas {
  background: #0b1220;
}

.course-nb-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(19, 6, 0, 0.08);
  background: #f8fafc;
}

html.dark .course-nb-toolbar {
  background: #111827;
  border-bottom-color: rgba(255, 255, 255, 0.15);
}

.course-nb-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #2a170c;
  cursor: pointer;
}

html.dark .course-nb-toolbar button {
  color: #e6d9d3;
}

.course-nb-toolbar button:hover {
  background: rgba(19, 6, 0, 0.06);
}

.course-nb-toolbar-sep {
  width: 1px;
  height: 22px;
  margin: 0 4px;
  background: rgba(19, 6, 0, 0.12);
}

.course-nb-font,
.course-nb-size {
  height: 32px;
  border: 1px solid rgba(19, 6, 0, 0.12);
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  padding: 0 6px;
  color: inherit;
}

html.dark .course-nb-font,
html.dark .course-nb-size {
  background: #22150d;
  border-color: rgba(255, 255, 255, 0.2);
}

.course-nb-color {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.course-nb-sheet {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 12px 24px;
}

.course-nb-sheet-inner {
  max-width: 760px;
  margin: 0 auto;
  min-height: 100%;
  padding: 28px 32px 48px;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(19, 6, 0, 0.08), 0 8px 24px rgba(19, 6, 0, 0.04);
}

html.dark .course-nb-sheet-inner {
  background: #22150d;
  box-shadow: none;
}

.course-nb-page-heading {
  width: 100%;
  border: 0;
  background: transparent !important;
  background-color: transparent !important;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: #130600;
  -webkit-text-fill-color: #130600;
  caret-color: #130600;
  padding: 0;
  margin: 0 0 6px;
  outline: none;
  box-shadow: none !important;
  color-scheme: light;
}

html.dark .course-nb-page-heading {
  background: transparent !important;
  background-color: transparent !important;
  color: #f1f5f9 !important;
  -webkit-text-fill-color: #f1f5f9;
  caret-color: #f1f5f9;
  color-scheme: dark;
}

.course-nb-page-heading::placeholder {
  color: #b5a197;
  -webkit-text-fill-color: #b5a197;
  opacity: 1;
}

html.dark .course-nb-page-heading::placeholder {
  color: #8a756c;
  -webkit-text-fill-color: #8a756c;
}

.course-nb-page-when {
  margin: 0 0 18px;
  font-size: 13px;
  color: #8a756c;
}

html.dark .course-nb-page-when {
  color: #b5a197;
}

.course-nb-editor {
  min-height: 280px;
  outline: none;
  font-size: 15px;
  line-height: 1.65;
  color: #130600;
}

html.dark .course-nb-editor {
  color: #f1e6e1;
}

.course-nb-editor p {
  margin: 0 0 0.65em;
}

.course-nb-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.course-nb-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 14px;
}

.course-nb-table th,
.course-nb-table td {
  border: 1px solid rgba(19, 6, 0, 0.18);
  padding: 8px 10px;
  vertical-align: top;
  min-width: 80px;
}

.course-nb-table th {
  background: rgba(255, 116, 51, 0.08);
  font-weight: 700;
  text-align: left;
}

.course-nb-todo {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}

.course-nb-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  border-top: 1px solid rgba(19, 6, 0, 0.08);
  background: #f8fafc;
}

html.dark .course-nb-footer {
  background: #111827;
  border-top-color: rgba(255, 255, 255, 0.15);
}

.course-nb-status {
  font-size: 12px;
  color: #8a756c;
  min-height: 1em;
}

.course-nb-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-nb-ghost {
  border: 0;
  background: transparent;
  color: #8a756c;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}

.course-nb-ghost:hover {
  background: rgba(19, 6, 0, 0.05);
  color: #2a170c;
}

.course-nb-ghost.danger:hover {
  color: #dc2626;
  background: rgba(220, 38, 38, 0.08);
}

@media (max-width: 840px) {
  .course-nb {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto minmax(0, 1fr);
    overflow: auto;
  }

  .course-nb-sections,
  .course-nb-pages {
    border-right: 0;
    border-bottom: 1px solid rgba(19, 6, 0, 0.08);
  }

  .course-nb-sections-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .course-nb-section {
    flex: 0 0 auto;
    max-width: 160px;
    margin-bottom: 0;
  }

  .course-nb-pages-list {
    display: flex;
    gap: 6px;
    overflow-x: auto;
  }

  .course-nb-page-row {
    flex: 0 0 auto;
    width: 168px;
  }

  .course-nb-sheet-inner {
    padding: 20px 16px 32px;
  }

  .course-nb-page-heading {
    font-size: 22px;
  }
}


#toast-root {
  position: fixed;
  z-index: 110;
  left: 50%;
  bottom: max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(420px, calc(100vw - 24px));
}

#toast-root {
  position: fixed;
  z-index: 110;
  left: 50%;
  bottom: max(88px, calc(72px + env(safe-area-inset-bottom, 0px)));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: min(420px, calc(100vw - 24px));
}

@media (min-width: 768px) {
  #toast-root {
    bottom: 28px;
  }
}

.lumme-toast {
  pointer-events: none;
  padding: 10px 16px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--hz-inverse-surface, #213145) 94%, transparent);
  color: var(--hz-inverse-on-surface, #fce3d8);
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  text-align: center;
  max-width: 100%;
}

.lumme-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}


#pomodoro-root {
  position: fixed;
  z-index: 90;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: max(84px, calc(68px + env(safe-area-inset-bottom, 0px)));
  left: auto;
  pointer-events: none;
}

@media (min-width: 768px) {
  #pomodoro-root {
    bottom: 24px;
    right: 24px;
  }
}

.pomodoro-widget {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant, #c3c6d7) 80%, transparent);
  background: color-mix(in srgb, var(--hz-surface-container-lowest, #fff) 92%, transparent);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.12);
  max-width: min(340px, calc(100vw - 24px));
}

.pomodoro-widget.is-work {
  border-color: color-mix(in srgb, var(--hz-primary, #c43d00) 35%, transparent);
}

.pomodoro-widget.is-break {
  border-color: color-mix(in srgb, var(--hz-secondary, #006c49) 40%, transparent);
}

.pomodoro-widget-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 1px;
  flex: 1;
}

.pomodoro-widget-phase {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hz-on-surface-variant, #434655);
}

.pomodoro-widget.is-work .pomodoro-widget-phase {
  color: var(--hz-primary, #c43d00);
}

.pomodoro-widget.is-break .pomodoro-widget-phase {
  color: var(--hz-secondary, #006c49);
}

.pomodoro-widget-time {
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--hz-on-surface, #130600);
}

.pomodoro-widget-title {
  font-size: 12px;
  color: var(--hz-on-surface-variant, #434655);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 160px;
}

.pomodoro-widget-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.pomodoro-widget-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hz-on-surface-variant, #434655);
  transition: background 0.15s ease, color 0.15s ease;
}

.pomodoro-widget-btn:hover {
  background: var(--hz-surface-container-low, #eff4ff);
  color: var(--hz-on-surface, #130600);
}

.pomodoro-widget-btn .material-symbols-outlined {
  font-size: 20px;
}


body.pomodoro-focus-open {
  overflow: hidden;
}

#pomodoro-root:has(.pomo-focus-overlay) {
  inset: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 95;
  pointer-events: auto;
  display: flex;
}

.pomo-focus-overlay {
  flex: 1;
  min-height: 100dvh;
  height: 100dvh;
  width: 100%;
  background: var(--hz-background, #fbf6f3);
  color: var(--hz-on-background, #130600);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

html.dark .pomo-focus-overlay {
  background: var(--hz-background, #051424);
}

.pomo-focus-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  padding-top: max(12px, env(safe-area-inset-top));
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 50%, transparent);
  flex-shrink: 0;
  z-index: 2;
  background: color-mix(in srgb, var(--hz-surface, #fbf6f3) 92%, transparent);
  backdrop-filter: blur(10px);
}

.pomo-focus-kicker {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--hz-primary);
}

.pomo-focus-heading {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--hz-on-surface);
}

.pomo-focus-top-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.pomo-focus-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hz-on-surface-variant);
}

.pomo-focus-icon-btn:hover {
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
}

.pomo-focus-canvas {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 16px max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-content: stretch;
  overflow: auto;
}

@media (min-width: 900px) {
  .pomo-focus-canvas {
    grid-template-columns: minmax(240px, 1fr) minmax(420px, 1.35fr) minmax(240px, 1fr);
    grid-template-rows: minmax(0, 1fr) auto;
    padding: 20px 28px max(20px, env(safe-area-inset-bottom));
    gap: 18px;
    overflow: hidden;
  }
  .pomo-focus-center {
    grid-column: 2;
    grid-row: 1;
    min-height: 0;
  }
  .pomo-focus-wisdom {
    grid-column: 1;
    grid-row: 1;
    min-height: 0;
  }
  .pomo-focus-meta {
    grid-column: 3;
    grid-row: 1;
    min-height: 0;
  }
  .pomo-focus-timeline {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}

@media (min-width: 1280px) {
  .pomo-focus-canvas {
    padding: 24px 40px max(24px, env(safe-area-inset-bottom));
    gap: 22px;
  }
}

.pomo-focus-side {
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  background: var(--hz-surface-container-lowest);
  padding: 18px 18px 20px;
  box-shadow: 0 10px 28px rgb(0 0 0 / 0.08);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: auto;
}

.pomo-focus-side-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--hz-on-surface);
  flex-shrink: 0;
}

.pomo-focus-side-head h3 {
  font-size: 16px;
  font-weight: 650;
}

.pomo-focus-side-head .material-symbols-outlined {
  color: var(--hz-tertiary, #784b00);
}

.pomo-focus-quote {
  font-size: clamp(15px, 1.35vw, 18px);
  line-height: 1.6;
  color: var(--hz-on-surface-variant);
  font-style: italic;
  flex: 1;
}

.pomo-focus-quote-author {
  margin-top: 16px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
  color: var(--hz-outline);
  flex-shrink: 0;
}

.pomo-focus-now-title {
  font-size: clamp(15px, 1.2vw, 17px);
  font-weight: 650;
  color: var(--hz-on-surface);
  line-height: 1.35;
}

.pomo-focus-now-sub {
  margin-top: 6px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}

.pomo-focus-center {
  border-radius: 20px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 40%, transparent);
  background: var(--hz-surface-container-high);
  padding: clamp(16px, 2.2vh, 28px) clamp(14px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 36px rgb(0 0 0 / 0.12);
  min-height: 0;
  overflow: auto;
}

.pomo-focus-modes {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hz-surface-container-lowest) 80%, #000 8%);
  margin-bottom: 28px;
}

.pomo-focus-mode {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-on-surface-variant);
}

.pomo-focus-mode.is-active {
  background: var(--hz-primary-container, #ff5300);
  color: var(--hz-on-primary-container, #fff7f3);
}

.pomo-liquid-container {
  position: relative;
  width: min(340px, 58vmin, 78vw);
  height: min(340px, 58vmin, 78vw);
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid color-mix(in srgb, var(--hz-surface-container-lowest) 90%, #000);
  background: var(--hz-surface-container-high);
  box-shadow: inset 0 4px 24px rgb(0 0 0 / 0.35);
  margin-bottom: clamp(14px, 2vh, 24px);
  flex-shrink: 0;
}

@media (min-width: 768px) {
  .pomo-liquid-container {
    width: min(380px, 52vmin);
    height: min(380px, 52vmin);
  }
}

@media (min-width: 1200px) {
  .pomo-liquid-container {
    width: min(420px, 48vmin);
    height: min(420px, 48vmin);
  }
}

.pomo-liquid {
  position: absolute;
  bottom: 0;
  left: -10%;
  width: 120%;
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hz-primary-container, #ff5300) 88%, #fff) 0%,
    var(--hz-primary-container, #ff5300) 35%,
    color-mix(in srgb, var(--hz-secondary, #006c49) 55%, var(--hz-primary-container, #ff5300)) 100%
  );
  transition: height 0.9s linear;
  z-index: 0;
  border-radius: 40% 42% 0 0 / 18% 20% 0 0;
  box-shadow: inset 0 8px 18px rgb(255 255 255 / 0.18);
}

.pomo-liquid-container.is-break .pomo-liquid {
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--hz-secondary, #006c49) 75%, #fff) 0%,
    var(--hz-secondary, #006c49) 40%,
    var(--hz-secondary-container, #6cf8bb) 100%
  );
}


.pomo-liquid-wave,
.pomo-liquid-wave-2 {
  position: absolute;
  left: -25%;
  width: 150%;
  height: 28px;
  top: -14px;
  border-radius: 45%;
  pointer-events: none;
}

.pomo-liquid-wave {
  background: color-mix(in srgb, var(--hz-primary-container, #ff5300) 70%, #fff 30%);
  opacity: 0.55;
  animation: pomo-liquid-bob 4.5s ease-in-out infinite;
}

.pomo-liquid-wave-2 {
  background: color-mix(in srgb, #fff 35%, var(--hz-primary-container, #ff5300));
  opacity: 0.35;
  top: -10px;
  animation: pomo-liquid-bob 6.5s ease-in-out infinite reverse;
}

.pomo-liquid-container.is-break .pomo-liquid-wave {
  background: color-mix(in srgb, var(--hz-secondary, #006c49) 65%, #fff 35%);
}

.pomo-liquid-container.is-break .pomo-liquid-wave-2 {
  background: color-mix(in srgb, #fff 40%, var(--hz-secondary-container, #6cf8bb));
}

@keyframes pomo-liquid-bob {
  0%,
  100% {
    transform: translateX(-4%) scaleY(1);
  }
  50% {
    transform: translateX(4%) scaleY(1.15);
  }
}

.pomo-liquid-face {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-shadow: 0 2px 12px rgb(0 0 0 / 0.35);
}

.pomo-liquid-time {
  font-size: clamp(52px, 9vmin, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--hz-on-surface);
}

.pomo-liquid-status {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--hz-primary);
}

.pomo-focus-controls {
  display: flex;
  align-items: center;
  gap: 18px;
}

.pomo-focus-ctrl {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--hz-on-surface-variant);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 60%, transparent);
  background: color-mix(in srgb, var(--hz-surface-container-lowest) 70%, transparent);
}

.pomo-focus-ctrl:hover {
  color: var(--hz-on-surface);
  background: var(--hz-surface-container-lowest);
}

.pomo-focus-ctrl-main {
  width: 64px;
  height: 64px;
  border: 0;
  background: var(--hz-primary-container, #ff5300);
  color: var(--hz-on-primary-container, #fff7f3);
  box-shadow: 0 0 20px color-mix(in srgb, var(--hz-primary-container, #ff5300) 35%, transparent);
}

.pomo-focus-ctrl-main:hover {
  background: color-mix(in srgb, var(--hz-primary-container, #ff5300) 90%, #fff);
  color: var(--hz-on-primary-container, #fff7f3);
}

.pomo-focus-ctrl-main .material-symbols-outlined {
  font-size: 32px;
}

.pomo-focus-phase-label {
  margin-top: 14px;
  font-size: 12px;
  font-weight: 650;
  color: var(--hz-on-surface-variant);
}

.pomo-focus-timeline {
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  background: var(--hz-surface-container-lowest);
  padding: 14px 18px 16px;
  flex-shrink: 0;
}

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

.pomo-focus-timeline-head h3 {
  font-size: 15px;
  font-weight: 650;
  color: var(--hz-on-surface);
}

.pomo-focus-timeline-head span {
  font-size: 11px;
  color: var(--hz-on-surface-variant);
}

.pomo-focus-timeline-track {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 28px;
}

.pomo-tl-bar {
  flex: 1;
  height: 10px;
  border-radius: 999px;
  background: var(--hz-surface-container-highest);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 35%, transparent);
}

.pomo-tl-bar.is-done {
  background: var(--hz-primary-container, #ff5300);
  border-color: transparent;
}

.pomo-tl-bar.is-current {
  background: color-mix(in srgb, var(--hz-primary-container, #ff5300) 45%, var(--hz-surface-container-highest));
  animation: pomo-tl-pulse 1.6s ease-in-out infinite alternate;
}

.pomo-tl-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--hz-surface-container-highest);
  border: 2px solid var(--hz-outline-variant);
}

.pomo-tl-dot.is-done {
  border-color: var(--hz-primary-container, #ff5300);
}

.pomo-tl-dot.is-long {
  width: 16px;
  height: 16px;
}

@keyframes pomo-tl-pulse {
  from { opacity: 0.7; }
  to { opacity: 1; }
}

button.pomodoro-widget-main {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

.pomo-duration {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.pomo-duration-btn {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 60%, transparent);
  color: var(--hz-on-surface-variant);
  background: color-mix(in srgb, var(--hz-surface-container-lowest) 75%, transparent);
}

.pomo-duration-btn:hover:not(:disabled) {
  color: var(--hz-on-surface);
  background: var(--hz-surface-container-lowest);
}

.pomo-duration-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pomo-duration-value {
  min-width: 96px;
  text-align: center;
}

.pomo-duration-num {
  display: block;
  font-size: 18px;
  font-weight: 750;
  color: var(--hz-on-surface);
  line-height: 1.1;
}

.pomo-duration-hint {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-on-surface-variant);
}

.pomo-progress {
  width: min(320px, 85%);
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
}

.pomo-progress-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--hz-surface-container-lowest) 70%, #000 12%);
  overflow: hidden;
}

.pomo-progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--hz-primary-container, #ff5300), var(--hz-secondary, #006c49));
  transition: width 0.9s linear;
}

.pomo-progress-label {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--hz-on-surface-variant);
  min-width: 2.5rem;
  text-align: right;
}

.pomo-start-cta {
  margin-top: 10px;
  padding: 10px 28px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--hz-primary-container, #ff5300);
  color: var(--hz-on-primary-container, #fff7f3);
  box-shadow: 0 0 18px color-mix(in srgb, var(--hz-primary-container, #ff5300) 30%, transparent);
}

.pomo-start-cta:hover {
  filter: brightness(1.05);
}

.pomo-focus-ctrl-main.is-start {
  box-shadow: 0 0 28px color-mix(in srgb, var(--hz-primary-container, #ff5300) 55%, transparent);
}

.pomo-ambient {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 45%, transparent);
}

.pomo-ambient-hint {
  font-size: 12px;
  line-height: 1.4;
  color: var(--hz-on-surface-variant);
  margin: 0 0 10px;
}

.pomo-ambient-presets {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.pomo-ambient-preset {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
  background: color-mix(in srgb, var(--hz-surface-container-low) 70%, transparent);
  color: var(--hz-on-surface-variant);
  font-size: 11px;
  font-weight: 650;
}

.pomo-ambient-preset .material-symbols-outlined {
  font-size: 18px;
}

.pomo-ambient-preset:hover {
  color: var(--hz-on-surface);
  background: var(--hz-surface-container);
}

.pomo-ambient-preset.is-active {
  border-color: color-mix(in srgb, var(--hz-primary) 45%, transparent);
  background: color-mix(in srgb, var(--hz-primary) 12%, transparent);
  color: var(--hz-primary);
}

.pomo-ambient-vol {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-on-surface-variant);
}

.pomo-ambient-vol input[type="range"] {
  width: 100%;
  accent-color: var(--hz-primary, #c43d00);
}


.hide-scrollbar::-webkit-scrollbar {
  display: none;
}
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.watch-detail-panel #panel-body {
  height: 100%;
  min-height: 0;
}

.watch-detail-shell,
.watch-detail {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.watch-detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(to bottom, color-mix(in srgb, var(--hz-surface) 92%, transparent), transparent);
}

@media (min-width: 768px) {
  .watch-detail-topbar {
    display: none;
  }
}

.watch-detail-topbar-title {
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--hz-on-surface);
}

.watch-detail-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, #000 40%, transparent);
  color: var(--hz-on-surface);
  backdrop-filter: blur(8px);
}

.watch-detail-layout {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 768px) {
  .watch-detail-layout {
    flex-direction: row;
    gap: 24px;
    padding: 20px 24px 28px;
  }
}

.watch-detail-left,
.watch-detail-right {
  overflow-y: auto;
  padding: 0 16px 28px;
}

@media (min-width: 768px) {
  .watch-detail-left {
    width: 360px;
    flex-shrink: 0;
    padding: 0 4px 8px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .watch-detail-right {
    flex: 1;
    padding: 0 4px 8px 0;
    display: flex;
    flex-direction: column;
    gap: 28px;
  }
}

.watch-detail-back-desktop {
  display: none;
  align-items: center;
  gap: 6px;
  width: fit-content;
  color: var(--hz-primary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (min-width: 768px) {
  .watch-detail-back-desktop {
    display: inline-flex;
  }
}

.watch-detail-hero {
  position: relative;
  margin: -52px -16px 16px;
  min-height: 58vh;
  display: flex;
  align-items: flex-end;
}
.watch-detail-hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hz-surface-container) center / cover no-repeat;
}
.watch-detail-hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--hz-surface) 8%, color-mix(in srgb, var(--hz-surface) 55%, transparent) 45%, transparent 80%);
}
.watch-detail-hero-content {
  position: relative;
  z-index: 1;
  padding: 16px 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}
.watch-detail-hero-rating {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--hz-primary);
  font-size: 12px;
  font-weight: 600;
}
.watch-detail-title {
  font-size: clamp(24px, 5vw, 30px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--hz-on-surface);
}
.watch-detail-synopsis-short {
  font-size: 14px;
  line-height: 1.45;
  color: var(--hz-on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.watch-detail-quickbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--hz-outline-variant);
  font-size: 11px;
  color: var(--hz-on-surface-variant);
}
.watch-detail-quickbar span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.watch-detail-poster {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 2 / 3;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
}
.watch-detail-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.watch-detail-poster-empty {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--hz-on-surface-variant);
}
.watch-detail-status-chip {
  position: absolute;
  top: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 9999px;
  background: color-mix(in srgb, var(--hz-surface-container-high) 85%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--hz-outline-variant);
  font-size: 11px;
  font-weight: 500;
  color: var(--hz-on-surface);
}
.watch-detail-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: var(--hz-primary);
}

.watch-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.watch-detail-stat {
  background: var(--hz-surface-container-low);
  border: 1px solid var(--hz-outline-variant);
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.watch-detail-stat strong {
  font-size: 20px;
  font-weight: 600;
  color: var(--hz-on-surface);
}
.watch-detail-stat span:last-child {
  font-size: 11px;
  color: var(--hz-on-surface-variant);
}

.watch-detail-progress-card,
.watch-detail-insight {
  background: var(--hz-surface-container-low);
  border: 1px solid var(--hz-outline-variant);
  border-radius: 12px;
  padding: 14px;
}
.watch-detail-progress-track {
  margin-top: 10px;
  height: 6px;
  border-radius: 9999px;
  background: var(--hz-surface-container-high);
  overflow: hidden;
}
.watch-detail-progress-fill {
  height: 100%;
  border-radius: 9999px;
  background: var(--hz-primary);
}
.watch-detail-primary-btn,
.watch-detail-secondary-btn,
.watch-detail-fab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.watch-detail-primary-btn {
  width: 100%;
  padding: 10px 12px;
  background: var(--hz-primary);
  color: var(--hz-on-primary);
}
.watch-detail-primary-btn.is-soft {
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
}
.watch-detail-secondary-btn {
  padding: 9px 10px;
  background: var(--hz-surface-container);
  color: var(--hz-on-surface);
  border: 1px solid var(--hz-outline-variant);
}
.watch-detail-insight {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.watch-detail-insight-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--hz-primary) 12%, transparent);
  color: var(--hz-primary);
  flex-shrink: 0;
}

.watch-detail-header {
  flex-direction: column;
  gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--hz-outline-variant);
}
.watch-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.watch-detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface-variant);
  font-size: 12px;
  font-weight: 600;
}
.watch-detail-dot {
  width: 4px;
  height: 4px;
  border-radius: 9999px;
  background: var(--hz-outline-variant);
}
.watch-detail-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--hz-on-surface);
  margin-bottom: 10px;
}
.watch-detail-synopsis {
  font-size: 15px;
  line-height: 1.55;
  color: var(--hz-on-surface-variant);
  padding: 14px;
  border-radius: 12px;
  background: var(--hz-surface-container-lowest);
  border: 1px solid var(--hz-outline-variant);
}
.watch-detail-cast {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scroll-behavior: smooth;
  flex: 1;
  min-width: 0;
}

.watch-detail-where-region {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--hz-on-surface-variant);
}
.watch-detail-where-group + .watch-detail-where-group {
  margin-top: 12px;
}
.watch-detail-where-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--hz-on-surface-variant);
  margin-bottom: 8px;
}
.watch-detail-where-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.watch-detail-where-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 12px;
  background: var(--hz-surface-container);
  border: 1px solid var(--hz-outline-variant);
  color: var(--hz-on-surface);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
a.watch-detail-where-chip:hover {
  background: var(--hz-surface-container-high);
  border-color: color-mix(in srgb, var(--hz-primary) 35%, var(--hz-outline-variant));
}
.watch-detail-where-chip.is-static {
  cursor: default;
}
.watch-detail-where-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: var(--hz-surface-container-lowest);
  flex-shrink: 0;
}
.watch-detail-where-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.watch-detail-where-logo .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.watch-detail-where-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.watch-detail-where-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--hz-primary);
  text-decoration: none;
}
.watch-detail-where-more:hover {
  text-decoration: underline;
}

.watch-detail-cast-wrap {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}
.watch-detail-cast-arrow {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 9999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--hz-surface-container);
  border: 1px solid var(--hz-outline-variant);
  color: var(--hz-primary);
  box-shadow: 0 2px 8px color-mix(in srgb, #000 8%, transparent);
}
.watch-detail-cast-arrow:hover {
  background: color-mix(in srgb, var(--hz-primary) 12%, var(--hz-surface-container));
}
@media (max-width: 640px) {
  .watch-detail-cast-arrow {
    width: 32px;
    height: 32px;
  }
}
.watch-detail-cast-item {
  min-width: 88px;
  max-width: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.watch-detail-cast-avatar {
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  overflow: hidden;
  background: var(--hz-surface-container-high);
  border: 2px solid var(--hz-outline-variant);
  display: grid;
  place-items: center;
  color: var(--hz-on-surface-variant);
}
.watch-detail-cast-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.watch-detail-cast-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--hz-on-surface);
  line-height: 1.2;
}
.watch-detail-cast-role {
  font-size: 11px;
  color: var(--hz-on-surface-variant);
  line-height: 1.2;
}

.watch-detail-season-select {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.watch-detail-season-select select {
  appearance: none;
  padding: 6px 28px 6px 10px;
  border-radius: 10px;
  border: none;
  background: color-mix(in srgb, var(--hz-primary) 12%, transparent);
  color: var(--hz-primary);
  font-size: 12px;
  font-weight: 600;
}
.watch-detail-season-select .material-symbols-outlined {
  position: absolute;
  right: 6px;
  pointer-events: none;
  color: var(--hz-primary);
}

.watch-detail-ep-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.watch-detail-ep {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  background: var(--hz-surface-container-low);
  border: 1px solid var(--hz-outline-variant);
}
@media (min-width: 768px) {
  .watch-detail-ep {
    flex-direction: row;
    align-items: center;
  }
}
.watch-detail-ep.is-upnext {
  border-left: 4px solid var(--hz-primary);
  background: var(--hz-surface-container);
}
.watch-detail-ep-badge {
  position: absolute;
  top: -10px;
  left: 14px;
  background: var(--hz-primary);
  color: var(--hz-on-primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 6px;
}
.watch-detail-ep-thumb {
  position: relative;
  width: 100%;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--hz-surface-container-lowest);
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .watch-detail-ep-thumb {
    width: 128px;
  }
}
.watch-detail-ep-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.watch-detail-ep-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  background: color-mix(in srgb, #000 35%, transparent);
  font-size: 28px;
}
.watch-detail-ep-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.watch-detail-ep-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--hz-on-surface);
}
.watch-detail-ep-summary {
  font-size: 13px;
  line-height: 1.4;
  color: var(--hz-on-surface-variant);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.watch-detail-ep-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--hz-on-surface-variant);
}
.watch-detail-ep-rating {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--hz-surface-container-highest);
  font-size: 11px;
  color: var(--hz-on-surface);
  flex-shrink: 0;
}
.watch-detail-ep-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.watch-detail-ep-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-highest);
  color: var(--hz-on-surface-variant);
}
.watch-detail-ep-btn.is-done {
  background: color-mix(in srgb, var(--hz-secondary) 22%, transparent);
  color: var(--hz-on-secondary-container, var(--hz-on-surface));
  border-color: transparent;
}

.watch-detail-fab {
  position: sticky;
  bottom: 16px;
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 8px;
  pointer-events: none;
  z-index: 15;
}
.watch-detail-fab-btn {
  pointer-events: auto;
  height: 52px;
  padding: 0 20px;
  border-radius: 9999px;
  background: var(--hz-primary);
  color: var(--hz-on-primary);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--hz-primary) 35%, transparent);
}

.watch-detail-menu {
  position: absolute;
  top: 56px;
  right: 12px;
  z-index: 30;
  min-width: 200px;
  background: var(--hz-surface-container-lowest);
  border: 1px solid var(--hz-outline-variant);
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}
.watch-detail-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--hz-on-surface);
}
.watch-detail-menu button:hover {
  background: var(--hz-surface-container-low);
}
.watch-detail-menu button.is-danger {
  color: var(--hz-error);
}

.material-symbols-outlined.filled {
  font-variation-settings: 'FILL' 1;
}

.media-card[data-watch-open] {
  cursor: pointer;
}
.media-card[data-watch-open]:hover {
  box-shadow: 0 8px 24px color-mix(in srgb, var(--hz-primary) 12%, transparent);
}

.proj-page { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.proj-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.proj-toolbar-left, .proj-toolbar-right, .proj-subbar-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.proj-btn-create {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--hz-primary); color: var(--hz-on-primary);
  font-size: 13px; font-weight: 600; padding: 8px 14px; border-radius: 999px;
  border: none; cursor: pointer;
}
.proj-btn-create:hover { filter: brightness(1.05); }
.proj-icon-btn {
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--hz-surface-container-high); color: var(--hz-on-surface);
  border: 1px solid transparent; cursor: pointer;
}
.proj-icon-btn:hover, .proj-icon-btn.is-active {
  border-color: var(--hz-primary); color: var(--hz-primary);
}
.proj-search {
  display: flex; align-items: center; gap: 6px;
  background: var(--hz-surface-container-high);
  border-radius: 999px; padding: 6px 12px; min-width: 160px;
}
.proj-search .material-symbols-outlined { font-size: 18px; color: var(--hz-on-surface-variant); }
.proj-search input {
  background: transparent; border: none; outline: none;
  color: var(--hz-on-surface); font-size: 13px; width: 140px;
}
.proj-subbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 0 0 10px; margin-bottom: 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
}
.proj-sub-control {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--hz-on-surface-variant); cursor: pointer;
}
.proj-sub-control .material-symbols-outlined { font-size: 18px; }
.proj-sub-control select {
  background: transparent; border: none; color: var(--hz-on-surface);
  font-size: 13px; font-weight: 500; cursor: pointer; max-width: 160px;
}
.proj-archived-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--hz-on-surface-variant); background: none; border: none; cursor: pointer;
}
.proj-archived-link.is-active, .proj-archived-link:hover { color: var(--hz-primary); }
.proj-filter-panel {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--hz-surface-container-low); border: 1px solid var(--hz-outline-variant);
  border-radius: 12px; padding: 14px;
}
.proj-filter-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
}
.proj-filter-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--hz-on-surface-variant); margin-bottom: 8px; }
.proj-filter-opt {
  display: block; width: 100%; text-align: left;
  background: none; border: none; padding: 6px 0;
  font-size: 13px; color: var(--hz-on-surface); cursor: pointer;
}
.proj-filter-opt:hover { color: var(--hz-primary); }
.proj-filter-opt.is-on { color: var(--hz-primary); font-weight: 600; }
.proj-filter-clear { justify-self: start; align-self: start; font-size: 12px; color: var(--hz-primary); background: none; border: none; cursor: pointer; margin-top: 0; }
.proj-group-head {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; color: var(--hz-on-surface); cursor: pointer;
  font-size: 14px; font-weight: 600; padding: 0; margin: 0;
}
.proj-group-head.is-static { cursor: default; }
.proj-group-head--inline {
  max-width: 100%;
  min-width: 0;
}
.proj-group-head--inline .proj-group-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-group-head .material-symbols-outlined {
  font-size: 20px;
  color: var(--hz-on-surface-variant);
  flex-shrink: 0;
}
.proj-group-title { color: var(--hz-on-surface); }
.proj-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--hz-surface-container-high); color: var(--hz-on-surface-variant);
  font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.proj-table { overflow-x: auto; border-radius: 0; min-width: 0; }
.proj-table-head, .proj-table-row {
  display: grid;
  gap: 0;
  align-items: center;
  min-width: 780px;
  padding: 8px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}
.proj-table-head {
  color: var(--hz-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  padding-top: 4px;
  padding-bottom: 8px;
  border-bottom-color: transparent;
}
.proj-table-row:hover { background: color-mix(in srgb, var(--hz-surface-container-high) 55%, transparent); }
.proj-table-row.is-alt {
  background: color-mix(in srgb, var(--hz-surface-container-low) 70%, transparent);
}
.proj-table-row.is-alt:hover {
  background: color-mix(in srgb, var(--hz-surface-container-high) 55%, transparent);
}
.proj-table-row.has-tasks-due-today {
  background: color-mix(in srgb, #fbbf24 22%, var(--hz-surface-container-low));
}
.proj-table-row.has-tasks-due-today.is-alt {
  background: color-mix(in srgb, #fbbf24 28%, var(--hz-surface-container-low));
}
.proj-table-row.has-tasks-due-today:hover,
.proj-table-row.has-tasks-due-today.is-alt:hover {
  background: color-mix(in srgb, #fbbf24 34%, var(--hz-surface-container-high));
}
.proj-table-row.is-overdue {
  background: color-mix(in srgb, #ef4444 18%, var(--hz-surface-container-low));
}
.proj-table-row.is-overdue.is-alt {
  background: color-mix(in srgb, #ef4444 24%, var(--hz-surface-container-low));
}
.proj-table-row.is-overdue:hover,
.proj-table-row.is-overdue.is-alt:hover {
  background: color-mix(in srgb, #ef4444 32%, var(--hz-surface-container-high));
}
.proj-col-name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  padding: 6px 4px;
}
.proj-table-head .proj-col-name { overflow: visible; }
.proj-name-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  width: 100%;
}
.proj-name-cell .proj-name-btn {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}
.proj-name-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.proj-task-badges {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.proj-name-meta .ptask-subcount {
  flex-shrink: 0;
  margin-left: 0;
  margin-top: 0;
}
.ptask-subcount--overdue .material-symbols-outlined {
  color: #ef4444;
}
.ptask-subcount--today .material-symbols-outlined {
  color: #f59e0b;
}

.proj-tree-name {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
  padding-left: calc(var(--proj-depth, 0) * 18px);
}
.proj-tree-toggle {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--hz-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.proj-tree-toggle:hover {
  background: color-mix(in srgb, var(--hz-surface-container-high) 80%, transparent);
  color: var(--hz-on-surface);
}
.proj-tree-toggle .material-symbols-outlined { font-size: 18px; }
.proj-tree-spacer {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}
.proj-tree-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface-variant);
  font-size: 11px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.proj-table-row.is-subproject .proj-name-btn { font-weight: 500; }
.ptask-parent-link {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 8px;
  padding: 8px 10px;
  border: none;
  border-radius: 8px;
  background: color-mix(in srgb, var(--hz-surface-container-high) 70%, transparent);
  color: var(--hz-on-surface-variant);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
}
.ptask-parent-link:hover { color: var(--hz-on-surface); }
.ptask-parent-link .material-symbols-outlined { font-size: 16px; }
.ptask-parent-link span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ptask-side-empty {
  margin: 0 0 4px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}
.ptask-side-add { color: var(--hz-primary) !important; }
.proj-name-btn {
  background: none; border: none; color: var(--hz-on-surface); font-size: 14px; font-weight: 600;
  text-align: left; cursor: pointer; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  min-width: 0; max-width: 100%;
}
.proj-name-btn:hover { color: var(--hz-primary); }
.proj-row-more {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}
.proj-col {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  padding: 4px 12px;
  border-left: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  align-self: stretch;
  display: flex;
  align-items: center;
  color: var(--hz-on-surface);
}
.proj-table-head .proj-col { overflow: visible; }
.proj-col .proj-chip,
.proj-col .proj-person,
.proj-col .proj-date {
  max-width: 100%;
  overflow: hidden;
}
.proj-col .proj-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.proj-col-head {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.proj-col-head-btn {
  display: inline-flex;
  align-items: center;
  gap: 0;
  max-width: 100%;
  border: none;
  background: transparent;
  color: var(--hz-on-surface-variant);
  font: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 2px 4px;
  margin: 0;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.2;
}
.proj-col-head:hover .proj-col-head-btn,
.proj-col-head-btn[aria-expanded="true"] {
  background: color-mix(in srgb, var(--hz-surface-container-high) 80%, transparent);
  color: var(--hz-on-surface);
}
.proj-col-head-btn.is-sorted { color: var(--hz-on-surface); }
.proj-col-head-btn > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.proj-col-head-caret {
  font-size: 16px !important;
  flex-shrink: 0;
  width: 0;
  margin-left: 0;
  opacity: 0;
  overflow: hidden;
  color: var(--hz-on-surface-variant);
  pointer-events: none;
}
.proj-col-head:hover .proj-col-head-caret,
.proj-col-head-btn[aria-expanded="true"] .proj-col-head-caret {
  width: 16px;
  margin-left: 2px;
  opacity: 1;
}
.proj-col-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 40;
  min-width: 210px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  background: var(--hz-surface-container-low);
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.proj-col-menu.hidden { display: none; }
.proj-col-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.proj-col-menu button:hover,
.proj-col-menu button.is-active {
  background: color-mix(in srgb, var(--hz-surface-container-high) 90%, transparent);
}
.proj-col-menu button .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.proj-col-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
}
.proj-col--type { padding-right: 8px; }
.proj-col--startDate { padding-left: 4px; }
.proj-col-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
}
.proj-chip { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.proj-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.proj-prio-icon { font-size: 18px !important; }
.proj-date { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.proj-date .material-symbols-outlined { font-size: 16px; color: var(--hz-on-surface-variant); }
.proj-person { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.proj-avatar {
  width: 22px; height: 22px; border-radius: 999px;
  background: #16a34a; color: #fff; font-size: 11px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.proj-person-label { font-size: 13px; }
.proj-muted { color: var(--hz-on-surface-variant); }
.proj-overdue { color: #f87171; font-weight: 600; }
.proj-chip-warn { color: #fbbf24; }
.proj-chip-warn .material-symbols-outlined { font-size: 16px; }
.proj-add-row {
  display: block; width: 100%; text-align: left;
  padding: 12px 8px; background: none; border: none;
  color: var(--hz-on-surface-variant); font-size: 13px; cursor: pointer;
}
.proj-add-row:hover { color: var(--hz-primary); }
.proj-empty { padding: 16px 8px; font-size: 13px; color: var(--hz-on-surface-variant); }
.proj-create-modal {
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  overflow: hidden;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
.proj-create-modal form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.proj-create-modal form > div:last-child {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}
.proj-create-grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
@media (min-width: 640px) {
  .proj-create-grid { grid-template-columns: 1.3fr 0.9fr; }
}
.proj-create-main,
.proj-create-side {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.proj-create-side {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  position: relative;
  z-index: 1;
  padding-bottom: 12px;
}
.proj-create-name {
  width: 100%; background: transparent; border: none; border-bottom: 2px solid var(--hz-primary);
  color: var(--hz-on-surface); font-size: 18px; font-weight: 500; padding: 8px 0; outline: none;
}
.proj-task-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.proj-task-name,
.proj-task-desc {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 85%, transparent);
  border-radius: 8px;
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.proj-task-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  padding: 12px 14px;
}
.proj-task-name::placeholder {
  color: color-mix(in srgb, #f9a8d4 55%, var(--hz-on-surface-variant));
  font-weight: 400;
}
.proj-task-name:focus {
  border-color: color-mix(in srgb, #f9a8d4 65%, var(--hz-outline-variant));
  background: var(--hz-surface-container-high);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #f9a8d4 25%, transparent);
}
.proj-task-desc {
  min-height: 148px;
  resize: vertical;
  font-size: 14px;
  line-height: 1.55;
  padding: 12px 14px;
}
.proj-task-desc::placeholder { color: var(--hz-on-surface-variant); }
.proj-task-desc:focus {
  border-color: color-mix(in srgb, var(--hz-outline) 35%, var(--hz-outline-variant));
  background: var(--hz-surface-container-high);
}
.proj-task-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.proj-task-repeat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 8px;
}
.proj-task-repeat:hover {
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
}
.proj-task-repeat .material-symbols-outlined { font-size: 18px; }
.proj-task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.proj-task-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.proj-task-action:hover {
  border-color: color-mix(in srgb, var(--hz-primary) 45%, var(--hz-outline-variant));
  color: var(--hz-on-surface);
}
.proj-task-action .material-symbols-outlined { font-size: 18px; }
.proj-task-project,
.proj-person-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--hz-on-surface);
  padding: 4px 0;
  background: transparent;
  border: none;
  border-radius: 0;
  min-height: 28px;
}
.proj-task-project .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.proj-meta-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  font-size: 13px;
  color: var(--hz-on-surface);
  position: relative;
  z-index: 1;
  margin: 0;
  min-height: 0;
  overflow: visible;
}
.proj-meta-row.is-open {
  z-index: 120;
}
.proj-status-field {
  position: relative;
}
.proj-meta-icon {
  display: none;
}
.proj-meta-label {
  color: var(--hz-on-surface-variant);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  display: block;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  position: static;
  order: 0;
}
.proj-meta-select {
  background: var(--hz-surface-container-low); border: 1px solid var(--hz-outline-variant);
  border-radius: 8px; color: var(--hz-on-surface); font-size: 13px; padding: 6px 8px; width: 100%;
}
.proj-status-picker { position: relative; width: 100%; z-index: 1; }
.proj-meta-row.is-open .proj-status-picker { z-index: 121; }
.proj-status-trigger {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: transparent; border: none;
  border-radius: 8px; color: var(--hz-on-surface); font-size: 14px; font-weight: 500;
  padding: 4px 4px 4px 0; cursor: pointer; text-align: left;
  position: relative;
  z-index: 1;
  min-height: 28px;
}
.proj-status-trigger:hover {
  background: color-mix(in srgb, var(--hz-surface-container-high) 55%, transparent);
}
.proj-status-trigger-text { flex: 1; min-width: 0; }
.proj-status-chevron { font-size: 18px; color: var(--hz-on-surface-variant); margin-left: auto; }
.proj-status-menu {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 90;
  background: var(--hz-surface-container-lowest); border: 1px solid var(--hz-outline-variant);
  border-radius: 12px; padding: 6px; box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
html.dark .proj-status-menu {
  background: color-mix(in srgb, var(--hz-surface-container-low) 88%, var(--hz-surface-container-lowest));
  border-color: color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}
html.dark .proj-status-option.is-selected {
  background: color-mix(in srgb, var(--hz-primary) 30%, var(--hz-surface-container-high));
}
.proj-status-menu.hidden,
.proj-cal-popover.hidden,
.proj-picker-menu.hidden {
  display: none !important;
}
.proj-picker-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 95;
  background: var(--hz-surface-container-lowest);
  border: 1px solid var(--hz-outline-variant);
  border-radius: 12px;
  padding: 8px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  max-height: min(360px, 58vh);
  overflow-y: auto;
}
html.dark .proj-picker-menu {
  background: color-mix(in srgb, var(--hz-surface-container-low) 88%, var(--hz-surface-container-lowest));
  border-color: color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}
.proj-picker-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px 10px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 65%, transparent);
  margin-bottom: 6px;
}
.proj-picker-search .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
  flex-shrink: 0;
}
.proj-picker-search input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--hz-on-surface);
  font-size: 13px;
  padding: 6px 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.proj-picker-search input::placeholder { color: var(--hz-on-surface-variant); }
.proj-picker-section { padding: 2px 0; }
.proj-picker-section + .proj-picker-section {
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}
.proj-picker-section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--hz-on-surface-variant);
  padding: 4px 8px 6px;
}
.proj-picker-org {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 500;
  padding: 8px;
  border-radius: 8px;
  text-align: left;
  cursor: default;
}
.proj-picker-org-avatar,
.proj-picker-letter {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--hz-surface-container-highest);
  color: var(--hz-on-surface);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.proj-picker-letter {
  border-radius: 6px;
  background: color-mix(in srgb, var(--hz-primary) 24%, var(--hz-surface-container-highest));
}
.proj-picker-option {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 500;
  padding: 9px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}
.proj-picker-option:hover { background: var(--hz-surface-container-high); }
.proj-picker-option.is-selected {
  background: color-mix(in srgb, var(--hz-primary) 24%, var(--hz-surface-container-high));
}
html.dark .proj-picker-option.is-selected {
  background: color-mix(in srgb, var(--hz-primary) 30%, var(--hz-surface-container-high));
}
.proj-picker-empty {
  font-size: 12px;
  color: var(--hz-on-surface-variant);
  padding: 6px 10px 8px;
}
.proj-create-side input[type="hidden"] {
  display: none !important;
  position: absolute;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.proj-status-option {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--hz-on-surface); font-size: 13px; padding: 10px 10px; cursor: pointer; text-align: left;
}
.proj-status-option:hover { background: var(--hz-surface-container-high); }
.proj-status-option.is-selected { background: color-mix(in srgb, var(--hz-primary) 28%, transparent); }
.proj-status-menu-sep { height: 1px; background: var(--hz-outline-variant); margin: 4px 6px; }
.proj-status-edit { color: var(--hz-on-surface-variant); }
.proj-status-edit .material-symbols-outlined { font-size: 18px; }
.proj-status-icon { font-size: 18px !important; flex-shrink: 0; }
.ptask-status-icon {
  font-size: 18px !important;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.proj-status-icon--novo { color: #f9a8d4; }
.proj-status-icon--andamento { color: #f9a8d4; }
.proj-status-icon--espera {
  color: #f59b6c;
  background: color-mix(in srgb, #f59b6c 18%, transparent);
  border-radius: 4px; padding: 1px;
}
.proj-status-icon--concluido { color: #22c55e; }
.proj-type-swatch {
  width: 14px; height: 14px; border-radius: 4px; flex-shrink: 0; display: inline-block;
}
.proj-prio-spacer { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; }
.proj-status-trigger-text.is-muted { color: var(--hz-on-surface-variant); font-weight: 400; }
.proj-cal-popover {
  position: absolute; left: 0; right: auto; top: calc(100% + 6px); z-index: 90;
  background: var(--hz-surface-container-lowest); border: 1px solid var(--hz-outline-variant);
  border-radius: 14px; padding: 10px; box-shadow: 0 16px 40px rgba(0,0,0,.45);
  width: min(280px, 78vw);
}
.proj-cal-popover.is-drop-up {
  top: auto;
  bottom: calc(100% + 6px);
}
#proj-cal-layer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  pointer-events: none;
}
#proj-cal-layer[aria-hidden='true'] {
  visibility: hidden;
}
.proj-cal-popover.is-floating {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  top: auto;
  left: auto;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  pointer-events: auto;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.55);
  z-index: 20;
}
.proj-cal-popover.is-floating.hidden {
  display: none !important;
}
.proj-status-menu.is-floating,
.proj-picker-menu.is-floating {
  position: fixed !important;
  right: auto !important;
  bottom: auto !important;
  display: block !important;
  pointer-events: auto;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.55);
  z-index: 1;
  overflow-y: auto;
}
.proj-status-menu.is-floating.hidden,
.proj-picker-menu.is-floating.hidden {
  display: none !important;
}
.proj-status-menu.is-drop-up,
.proj-picker-menu.is-drop-up {
  top: auto;
  bottom: calc(100% + 6px);
}
.proj-create-modal.has-picker-open,
.proj-create-modal.has-picker-open .proj-create-grid {
  overflow: visible;
}
.proj-cal-scroll {
  max-height: 280px; overflow-y: auto; padding-right: 2px;
  scrollbar-width: thin;
}
.proj-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
  margin-bottom: 6px; position: sticky; top: 0; background: var(--hz-surface-container-lowest); z-index: 1;
  padding-bottom: 4px;
}
.proj-cal-weekdays span {
  text-align: center; font-size: 11px; color: var(--hz-on-surface-variant); font-weight: 500;
}
.proj-cal-month { margin-bottom: 14px; }
.proj-cal-month-title {
  font-size: 13px; font-weight: 600; color: var(--hz-on-surface); margin: 8px 4px 8px;
}
.proj-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.proj-cal-day {
  aspect-ratio: 1; border: none; background: transparent; border-radius: 999px;
  color: var(--hz-on-surface); font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.proj-cal-day.is-empty { pointer-events: none; }
.proj-cal-day:hover:not(.is-empty) { background: var(--hz-surface-container-high); }
.proj-cal-day.is-today { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hz-primary) 55%, transparent); }
.proj-cal-day.is-selected {
  background: var(--hz-primary); color: var(--hz-on-primary); font-weight: 600;
}
.proj-cal-reset {
  width: 100%; margin-top: 8px; padding: 10px 12px; border: none; border-radius: 999px;
  background: var(--hz-surface-container-high); color: var(--hz-on-surface-variant);
  font-size: 13px; font-weight: 500; cursor: pointer;
}
.proj-cal-reset:hover { color: var(--hz-on-surface); }
.proj-cal-actions {
  display: flex; flex-direction: column; gap: 2px;
  margin-top: 8px; padding-top: 8px;
  border-top: 1px solid var(--hz-outline-variant);
}
.proj-cal-action {
  width: 100%; display: flex; align-items: center; gap: 10px;
  background: transparent; border: none; border-radius: 8px;
  color: var(--hz-on-surface); font-size: 13px; padding: 10px 8px; cursor: pointer; text-align: left;
}
.proj-cal-action:hover { background: var(--hz-surface-container-high); }
.proj-cal-action .material-symbols-outlined { font-size: 18px; color: var(--hz-on-surface-variant); }
.proj-cal-time-input {
  width: 100%; margin: 0 0 4px; padding: 8px 10px;
  border-radius: 8px; border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low); color: var(--hz-on-surface); font-size: 13px;
}
.proj-cal-day.is-today:not(.is-selected) {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--hz-on-surface) 55%, transparent);
  background: transparent;
}
.proj-cols-grid { display: grid; grid-template-columns: 1fr; }
@media (min-width: 640px) {
  .proj-cols-grid { grid-template-columns: 1fr 1fr; }
}
.proj-cols-list {
  background: var(--hz-surface-container-low); border: 1px solid var(--hz-outline-variant);
  border-radius: 12px; padding: 6px; min-height: 180px;
}
.proj-col-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 10px 8px; border-radius: 8px; border: none; background: transparent;
  color: var(--hz-on-surface); font-size: 13px; cursor: pointer; text-align: left;
}
.proj-col-item:hover { background: var(--hz-surface-container-high); }
.proj-col-item.is-fixed { cursor: default; opacity: .9; }
.proj-col-item .material-symbols-outlined { font-size: 18px; color: var(--hz-on-surface-variant); }
.proj-drag { cursor: grab; }
@media (max-width: 900px) {
  .proj-table-head .proj-col:nth-child(n+5),
  .proj-table-row .proj-col:nth-child(n+5) { display: none; }
  .proj-table-head, .proj-table-row {
    grid-template-columns: minmax(160px, 1.8fr) repeat(3, minmax(90px, 1fr)) 44px;
    min-width: 620px;
    gap: 0;
  }
}


.ptask-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 0;
  min-height: calc(100vh - 140px);
  margin: -4px -4px 0;
  border: 1px solid var(--hz-outline-variant);
  border-radius: 16px;
  overflow: hidden;
  background: var(--hz-surface-container-lowest);
  position: relative;
}
.ptask-workspace.is-collapsed { grid-template-columns: minmax(0, 1fr); }
.ptask-tools-rail { display: none; }
.ptask-sidebar {
  display: flex; flex-direction: column; gap: 2px;
  padding: 12px 10px; border-left: 1px solid var(--hz-outline-variant);
  border-right: none;
  background: var(--hz-surface-container-low);
}
.ptask-workspace.is-collapsed .ptask-sidebar { display: none; }
.ptask-back {
  display: flex; align-items: center; gap: 8px;
  width: 100%; margin-bottom: 10px; padding: 8px;
  border: none; border-radius: 10px; background: transparent;
  color: var(--hz-on-surface); cursor: pointer; text-align: left; font-size: 13px; font-weight: 600;
}
.ptask-back:hover { background: var(--hz-surface-container-high); }
.ptask-side-section {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--hz-on-surface-variant); padding: 10px 8px 6px;
}
.ptask-side-section--toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.ptask-side-section--toggle:hover { color: var(--hz-on-surface); }
.ptask-side-section--toggle .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
}
.ptask-side-subprojects.is-collapsed { display: none; }
.ptask-side-link, .ptask-side-hide {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 10px; border: none; border-radius: 10px;
  background: transparent; color: var(--hz-on-surface-variant); cursor: pointer; text-align: left; font-size: 13px;
}
.ptask-side-link:hover, .ptask-side-hide:hover { background: var(--hz-surface-container-high); color: var(--hz-on-surface); }
.ptask-side-link.is-active { background: var(--hz-surface-container-high); color: var(--hz-on-surface); font-weight: 600; }
.ptask-side-link .material-symbols-outlined, .ptask-side-hide .material-symbols-outlined { font-size: 20px; }
.ptask-side-hide { margin-top: auto; }
.ptask-main { padding: 14px 16px 20px; overflow: auto; min-width: 0; }
.ptask-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.ptask-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.ptask-view-toggle {
  display: inline-flex; background: var(--hz-surface-container-high); border-radius: 10px; padding: 3px;
}
.ptask-view-toggle button {
  border: none; background: transparent; color: var(--hz-on-surface-variant);
  font-size: 13px; font-weight: 500; padding: 7px 12px; border-radius: 8px; cursor: pointer;
}
.ptask-view-toggle button.is-active {
  background: var(--hz-surface-container-lowest); color: var(--hz-on-surface); box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.ptask-table { overflow-x: auto; }
.ptask-table--reorder .ptask-head,
.ptask-table--reorder .ptask-row {
  grid-template-columns: 28px minmax(280px, 2.6fr) minmax(128px, 0.95fr) minmax(136px, 0.95fr) minmax(92px, 0.65fr) minmax(92px, 0.65fr) 44px;
}
.ptask-col-drag {
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 0 2px;
}
.ptask-head, .ptask-row {
  display: grid;
  grid-template-columns: minmax(280px, 2.6fr) minmax(128px, 0.95fr) minmax(136px, 0.95fr) minmax(92px, 0.65fr) minmax(92px, 0.65fr) 44px;
  gap: 0;
  align-items: center;
  min-width: 780px;
  padding: 8px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}
.ptask-head {
  color: var(--hz-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  border-bottom-color: transparent;
  padding-top: 4px;
  padding-bottom: 8px;
}
.ptask-row:hover { background: color-mix(in srgb, var(--hz-surface-container-high) 55%, transparent); }
.ptask-row:nth-child(even) {
  background: color-mix(in srgb, var(--hz-surface-container-low) 70%, transparent);
}
.ptask-row:nth-child(even):hover {
  background: color-mix(in srgb, var(--hz-surface-container-high) 55%, transparent);
}
.ptask-row.is-due-today {
  background: color-mix(in srgb, #fbbf24 24%, var(--hz-surface-container-low)) !important;
}
.ptask-row.is-due-today:hover {
  background: color-mix(in srgb, #fbbf24 34%, var(--hz-surface-container-high)) !important;
}
.ptask-row.has-tasks-due-today {
  background: color-mix(in srgb, #fbbf24 22%, var(--hz-surface-container-low)) !important;
}
.ptask-row.has-tasks-due-today:hover {
  background: color-mix(in srgb, #fbbf24 34%, var(--hz-surface-container-high)) !important;
}
.ptask-row.is-overdue {
  background: color-mix(in srgb, #ef4444 20%, var(--hz-surface-container-low)) !important;
}
.ptask-row.is-overdue:hover {
  background: color-mix(in srgb, #ef4444 30%, var(--hz-surface-container-high)) !important;
}
.proj-date.is-today {
  color: #b45309;
  font-weight: 600;
}
.proj-date.is-overdue {
  color: #dc2626;
  font-weight: 600;
}
.ptask-col-name,
.ptask-col {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  padding: 4px 12px;
}
.ptask-col {
  border-left: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  align-self: stretch;
  display: flex;
  align-items: center;
}
.ptask-col-name {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding-left: 4px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.ptask-col-name .proj-name-btn {
  flex: 1 1 auto;
  width: auto;
  max-width: 100%;
  min-width: 0;
  white-space: normal;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.35;
}
.ptask-subcount {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-top: 2px;
  margin-left: 2px;
  color: var(--hz-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  line-height: 1;
}
.ptask-subcount .material-symbols-outlined {
  font-size: 16px;
  color: var(--hz-on-surface-variant);
}
.ptask-col .proj-chip,
.ptask-col .proj-person,
.ptask-col .proj-date {
  max-width: 100%;
  overflow: hidden;
}
.ptask-col .proj-chip span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ptask-head-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hz-on-surface);
  font-size: 14px;
  font-weight: 600;
}
.ptask-head-group .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.ptask-col-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 4px 6px;
}
.ptask-kanban {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}
.ptask-kanban-col {
  background: var(--hz-surface-container-low); border: 1px solid var(--hz-outline-variant);
  border-radius: 12px; padding: 10px; min-height: 220px;
}
.ptask-kanban-head {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; margin-bottom: 10px;
}
.ptask-kanban-list { display: flex; flex-direction: column; gap: 8px; }
.ptask-kanban-card {
  width: 100%; text-align: left; padding: 12px; border-radius: 10px; cursor: pointer;
  background: var(--hz-surface-container-lowest); border: 1px solid var(--hz-outline-variant);
}
.ptask-kanban-card:hover { border-color: var(--hz-primary); }
.ptask-placeholder { padding: 40px 12px; }

.ptask-members-table { overflow-x: auto; }
.ptask-members-table-head { padding: 4px 4px 8px; }
.ptask-members-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 600;
}
.ptask-members-group .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.ptask-members-cols,
.ptask-members-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) minmax(180px, 1.4fr) minmax(160px, 1fr) minmax(110px, 0.8fr);
  gap: 0;
  align-items: center;
  min-width: 720px;
  padding: 8px 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 55%, transparent);
}
.ptask-members-cols {
  color: var(--hz-on-surface-variant);
  font-size: 12px;
  font-weight: 500;
  border-bottom-color: transparent;
  padding-top: 4px;
  padding-bottom: 8px;
}
.ptask-members-col {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  padding: 4px 12px;
  border-left: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  align-self: stretch;
  display: flex;
  align-items: center;
}
.ptask-members-col--user { border-left: none; padding-left: 4px; }
.ptask-members-row:hover {
  background: color-mix(in srgb, var(--hz-surface-container-high) 55%, transparent);
}
.ptask-members-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 4px 12px 4px 4px;
}
.ptask-members-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--hz-on-surface);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ptask-member-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--hz-on-surface);
  font-size: 13px;
}
.ptask-member-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ptask-body--settings { padding-top: 4px; }
.ptask-settings { max-width: 920px; }
.ptask-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.ptask-settings-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--hz-on-surface);
  letter-spacing: -0.02em;
}
.ptask-settings-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 75%, transparent);
  margin-bottom: 22px;
}
.ptask-settings-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--hz-on-surface-variant);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 14px;
  margin-bottom: -1px;
  cursor: pointer;
}
.ptask-settings-tab:hover { color: var(--hz-on-surface); }
.ptask-settings-tab.is-active {
  color: var(--hz-primary);
  border-bottom-color: var(--hz-primary);
}
.ptask-settings-panel { display: flex; flex-direction: column; gap: 28px; }
.ptask-settings-section { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.ptask-settings-section-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--hz-on-surface);
}
.ptask-settings-copy {
  margin: 0;
  font-size: 14px;
  color: var(--hz-on-surface);
}
.ptask-settings-hint {
  margin: 0;
  font-size: 13px;
  color: var(--hz-on-surface-variant);
}
.ptask-settings-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ptask-settings-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 85%, transparent);
  background: color-mix(in srgb, var(--hz-surface-container-low) 80%, transparent);
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}
.ptask-settings-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 80%, transparent);
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ptask-settings-edit-btn:hover {
  background: var(--hz-surface-container-highest, var(--hz-surface-container-high));
  border-color: var(--hz-outline-variant);
}
.ptask-settings-edit-btn.is-primary {
  background: var(--hz-primary);
  border-color: var(--hz-primary);
  color: var(--hz-on-primary, #0b1220);
  font-weight: 600;
}
.ptask-settings-edit-btn.is-primary:hover {
  filter: brightness(1.05);
}

.ptask-details { display: flex; flex-direction: column; gap: 28px; }
.ptask-details-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 640px;
}
.ptask-details-form-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--hz-on-surface-variant);
}
.ptask-details-input,
.ptask-details-textarea {
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 85%, transparent);
  border-radius: 10px;
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
  font-size: 14px;
  line-height: 1.45;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.ptask-details-input:focus,
.ptask-details-textarea:focus {
  border-color: color-mix(in srgb, var(--hz-primary) 45%, var(--hz-outline-variant));
  background: var(--hz-surface-container-high);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hz-primary) 18%, transparent);
}
.ptask-details-textarea {
  min-height: 108px;
  resize: vertical;
}
.ptask-details-textarea::placeholder { color: var(--hz-on-surface-variant); }
.ptask-details-actions { margin-top: 4px; }
.ptask-details-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.ptask-details-section-head .ptask-settings-section-title { margin: 0; }
.ptask-details-link-btn {
  border: none;
  background: transparent;
  color: var(--hz-primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 0;
}
.ptask-details-link-btn:hover { text-decoration: underline; }
.ptask-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  width: 100%;
}
@media (max-width: 720px) {
  .ptask-details-grid { grid-template-columns: 1fr; }
}
.ptask-details-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.ptask-details-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--hz-on-surface-variant);
}
.ptask-details-value {
  font-size: 14px;
  color: var(--hz-on-surface);
  min-width: 0;
}
.ptask-details-link {
  border: none;
  background: transparent;
  color: var(--hz-primary);
  font-size: 14px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
  text-align: left;
}
.ptask-details-link:hover { text-decoration: underline; }


body.project-workspace-open .ptask-workspace--detail .ptask-main--detail {
  overflow: hidden !important;
}


.ptask-main--detail {
  padding: 0 !important;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}
.ptask-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.ptask-detail-main {
  overflow-y: auto;
  padding: 20px 24px 28px;
  -webkit-overflow-scrolling: touch;
}
.ptask-detail-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ptask-detail-lead {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.ptask-detail-back {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.ptask-detail-back:hover {
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
}
.ptask-detail-back .material-symbols-outlined {
  font-size: 22px;
}
.ptask-detail-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  min-width: 0;
  color: var(--hz-on-surface);
}
.ptask-detail-top-actions { display: flex; gap: 4px; }
.ptask-detail-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--hz-on-surface);
  margin: 0 0 18px;
}
.ptask-detail-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 24px;
  margin-bottom: 18px;
}
@media (min-width: 1100px) {
  .ptask-detail-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.ptask-detail-meta-label {
  display: block;
  font-size: 11px;
  color: var(--hz-on-surface-variant);
  margin-bottom: 4px;
}
.ptask-detail-meta-value { font-size: 13px; }
.ptask-detail-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}
.ptask-detail-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ptask-detail-action:hover {
  border-color: color-mix(in srgb, var(--hz-primary) 40%, var(--hz-outline-variant));
  color: var(--hz-on-surface);
}
.ptask-detail-action .material-symbols-outlined { font-size: 18px; }
.ptask-detail-action-short { display: none; }
.ptask-detail-section {
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  padding-top: 18px;
  margin-top: 6px;
}
.ptask-detail-section-title,
.ptask-detail-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--hz-on-surface);
  margin: 0 0 10px;
}
.ptask-detail-section-head {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  text-align: left;
}
.ptask-detail-section-head .material-symbols-outlined { font-size: 18px; color: var(--hz-on-surface-variant); }
.ptask-detail-chevron {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--hz-surface-container-high);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px !important;
}
.ptask-detail-desc {
  font-size: 14px;
  line-height: 1.55;
  color: var(--hz-on-surface);
  margin: 0;
  white-space: pre-wrap;
}
.ptask-detail-desc .proj-muted {
  color: var(--hz-on-surface-variant);
  font-size: 14px;
}
.ptask-desc-panel { margin-top: 8px; }
.ptask-desc-panel.is-collapsed { display: none; }
.ptask-subtasks-section .ptask-detail-section-head { margin-bottom: 0; }
.ptask-subtasks-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}
.ptask-subtasks-head .ptask-detail-section-head {
  flex: 1;
  min-width: 0;
  width: auto;
  margin-bottom: 0;
}
.ptask-subtasks-head .ptask-detail-section-head .ptask-detail-chevron { display: none; }
.ptask-detail-chevron-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 0;
  cursor: pointer;
  margin-left: 0;
  position: relative;
  z-index: 2;
}
.ptask-detail-chevron-btn .ptask-detail-chevron { margin-left: 0; }
.ptask-subtask-filter {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.ptask-subtask-filter[hidden] { display: none; }
.ptask-subtask-panel.is-pending-only .ptask-subtask-row.is-done { display: none; }
.ptask-subtask-empty[hidden] { display: none; }
.ptask-subtask-filter-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}
.ptask-subtask-filter-btn:hover {
  color: var(--hz-on-surface);
  background: color-mix(in srgb, var(--hz-surface-container-high) 80%, transparent);
}
.ptask-subtask-filter-btn.is-on {
  color: var(--hz-primary);
  background: color-mix(in srgb, var(--hz-primary) 12%, var(--hz-surface));
}
.ptask-subtask-filter-btn[aria-expanded="true"] {
  color: var(--hz-on-surface);
  background: color-mix(in srgb, var(--hz-surface-container-high) 80%, transparent);
}
.ptask-subtask-filter-btn .material-symbols-outlined { font-size: 18px; }
.ptask-subtask-filter-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 30;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  box-shadow: 0 14px 32px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ptask-subtask-filter-pop.hidden { display: none; }
.ptask-subtask-filter-pop button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ptask-subtask-filter-pop button:hover {
  background: var(--hz-surface-container-high);
}
.ptask-subtask-filter-pop button.is-selected {
  color: var(--hz-primary);
  font-weight: 600;
  background: color-mix(in srgb, var(--hz-primary) 10%, transparent);
}
.ptask-subtask-empty {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--hz-on-surface-variant);
}
.ptask-subtask-panel { margin-top: 10px; }
.ptask-subtask-panel.is-collapsed { display: none; }
.ptask-subtask-compose,
.ptask-subtask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 4px 8px 4px 4px;
  border-radius: 10px;
}
.ptask-subtask-row {
  background: transparent;
}
.ptask-subtask-compose {
  padding: 6px 10px 6px 8px;
  background: color-mix(in srgb, var(--hz-surface-container-high) 88%, var(--hz-surface-container-lowest));
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 65%, transparent);
}
html.dark .ptask-subtask-compose {
  background: color-mix(in srgb, var(--hz-surface-container-high) 72%, var(--hz-surface-container-low));
  border-color: color-mix(in srgb, var(--hz-outline-variant) 42%, transparent);
}
.ptask-subtask-row + .ptask-subtask-row,
.ptask-subtask-row + .ptask-subtask-compose,
.ptask-subtask-compose + .ptask-subtask-row {
  margin-top: 6px;
}
.ptask-subtask-check {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}
.ptask-subtask-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.ptask-subtask-check-box {
  position: relative;
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid color-mix(in srgb, var(--hz-outline-variant) 90%, transparent);
  background: transparent;
  display: block;
  flex-shrink: 0;
  transition: background 0.15s, border-color 0.15s;
}
html.dark .ptask-subtask-check-box {
  border-color: color-mix(in srgb, var(--hz-outline-variant) 75%, transparent);
  background: color-mix(in srgb, var(--hz-surface-container-low) 65%, transparent);
}
.ptask-subtask-check input:checked + .ptask-subtask-check-box {
  background: var(--hz-primary);
  border-color: var(--hz-primary);
}
.ptask-subtask-check input:checked + .ptask-subtask-check-box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid var(--hz-on-primary);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.ptask-subtask-name {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--hz-on-surface);
  font-size: 14px;
  line-height: 1.4;
  padding: 6px 0;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.ptask-subtask-name:focus,
.ptask-subtask-time:focus {
  border: none !important;
  box-shadow: none !important;
  outline: none;
}
.ptask-subtask-name::placeholder { color: var(--hz-on-surface-variant); }
.ptask-subtask-time {
  width: 52px;
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  text-align: right;
  padding: 6px 0;
  outline: none;
  flex-shrink: 0;
  appearance: none;
  -webkit-appearance: none;
}
.ptask-subtask-time::placeholder { color: var(--hz-on-surface-variant); opacity: 0.85; }
.ptask-subtask-compose input[type="text"] {
  background-color: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
  --tw-ring-shadow: 0 0 #0000 !important;
  --tw-ring-offset-shadow: 0 0 #0000 !important;
}
html.dark .ptask-subtask-compose input[type="text"] {
  color: var(--hz-on-surface);
}
html.dark .ptask-subtask-compose input[type="text"]::placeholder {
  color: var(--hz-on-surface-variant);
}
.ptask-subtask-date {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--hz-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
}
.ptask-subtask-date:hover {
  background: color-mix(in srgb, var(--hz-surface-container-highest) 70%, transparent);
  color: var(--hz-on-surface);
}
.ptask-subtask-date .material-symbols-outlined { font-size: 18px; }
.ptask-subtask-compose .proj-avatar,
.ptask-subtask-row .proj-avatar {
  width: 24px;
  height: 24px;
  font-size: 12px;
}
.ptask-subtask-save {
  border: none;
  border-radius: 8px;
  background: color-mix(in srgb, var(--hz-surface-container-highest) 75%, var(--hz-surface-container-high));
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}
.ptask-subtask-save:not(:disabled):hover {
  background: color-mix(in srgb, var(--hz-primary) 18%, var(--hz-surface-container-high));
  color: var(--hz-on-surface);
}
.ptask-subtask-save:disabled {
  opacity: 0.55;
  cursor: default;
}
html.dark .ptask-subtask-save:disabled {
  background: color-mix(in srgb, var(--hz-surface-container-highest) 55%, var(--hz-surface-container-high));
  color: color-mix(in srgb, var(--hz-on-surface-variant) 72%, transparent);
  opacity: 1;
}
.ptask-subtask-save:not(:disabled) {
  background: color-mix(in srgb, var(--hz-primary) 22%, var(--hz-surface-container-high));
  color: var(--hz-on-surface);
}

.ptask-subtask-add-link {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 2px;
  border: none;
  background: transparent;
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}
.ptask-subtask-add-link:hover { color: var(--hz-on-surface); }
.ptask-subtask-menu {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}
.ptask-subtask-more {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-primary, #f59b6c);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  opacity: 0.85;
}
.ptask-subtask-row:hover .ptask-subtask-more,
.ptask-subtask-more[aria-expanded="true"] {
  opacity: 1;
  background: color-mix(in srgb, var(--hz-surface-container-high) 80%, transparent);
}
.ptask-subtask-more .material-symbols-outlined { font-size: 20px; }
.ptask-subtask-menu-pop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 20;
  min-width: 190px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  box-shadow: 0 14px 32px rgba(0,0,0,.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ptask-subtask-menu-pop.hidden { display: none; }
.ptask-subtask-menu-pop button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ptask-subtask-menu-pop button:hover {
  background: var(--hz-surface-container-high);
}
.ptask-subtask-menu-pop button .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.ptask-subtask-menu-pop button.is-danger,
.ptask-subtask-menu-pop button.is-danger .material-symbols-outlined {
  color: #f87171;
}
.ptask-subtask-compose.is-editing {
  flex-wrap: wrap;
}
.ptask-subtask-edit-cancel {
  border: none;
  background: transparent;
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}
.ptask-subtask-edit-cancel:hover {
  color: var(--hz-on-surface);
  background: color-mix(in srgb, var(--hz-surface-container-high) 70%, transparent);
}
.ptask-subtask-row-name {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: var(--hz-on-surface);
  line-height: 1.4;
}
.ptask-subtask-row.is-done .ptask-subtask-row-name {
  color: var(--hz-on-surface-variant);
  text-decoration: line-through;
}
.ptask-subtask-row-time {
  width: 52px;
  text-align: right;
  font-size: 13px;
  color: var(--hz-on-surface-variant);
  flex-shrink: 0;
}
.ptask-subtask-row-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 28px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
  flex-shrink: 0;
}
.ptask-subtask-row-date.is-empty { visibility: hidden; }
.ptask-subtask-row-date .material-symbols-outlined { font-size: 16px; }
.ptask-schedule-panel.is-collapsed { display: none; }
.ptask-schedule-table { margin-top: 8px; }
.ptask-schedule-head,
.ptask-schedule-row {
  display: grid;
  grid-template-columns: 1fr 80px 120px minmax(160px, 1.2fr);
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  font-size: 12px;
}
.ptask-schedule-head {
  color: var(--hz-on-surface-variant);
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
}
.ptask-schedule-row { font-size: 13px; color: var(--hz-on-surface); }
.ptask-schedule-timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ptask-timer-play {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 999px;
  background: var(--hz-primary);
  color: var(--hz-on-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ptask-timer-play .material-symbols-outlined { font-size: 18px; }
.ptask-timer-value { font-variant-numeric: tabular-nums; font-size: 13px; }
.ptask-timer-flag {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 8px;
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ptask-schedule-add {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  border: none;
  background: transparent;
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  cursor: pointer;
  padding: 6px 0;
}
.ptask-schedule-add:hover { color: var(--hz-primary); }
.ptask-detail-feed {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  min-height: 0;
}
.ptask-feed-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  flex-shrink: 0;
}
.ptask-feed-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--hz-surface-container-high);
  font-size: 12px;
  font-weight: 500;
  color: var(--hz-on-surface);
}
.ptask-feed-pill .material-symbols-outlined { font-size: 16px; }
.ptask-feed-followers { font-size: 12px; color: var(--hz-on-surface-variant); }
.ptask-feed-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}
.ptask-feed-date {
  display: inline-block;
  margin: 0 auto 16px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface-variant);
  font-size: 11px;
  text-align: center;
  width: fit-content;
  position: relative;
  left: 50%;
  transform: translateX(-50%);
}
.ptask-feed-item { margin-bottom: 14px; }
.ptask-feed-item--system {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.ptask-feed-system {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  color: var(--hz-on-surface-variant);
  line-height: 1.45;
}
.ptask-feed-actor {
  color: var(--hz-on-surface);
  font-weight: 600;
}
.ptask-feed-action {
  color: var(--hz-on-surface);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.ptask-feed-target {
  color: var(--hz-on-surface);
  font-weight: 500;
}
.ptask-feed-time {
  font-size: 11px;
  color: var(--hz-on-surface-variant);
  margin-top: 0;
  flex-shrink: 0;
  white-space: nowrap;
}
.ptask-feed-item--comment .ptask-feed-time { margin-top: 4px; }
.ptask-feed-bubble {
  background: var(--hz-surface-container-high);
  border-radius: 12px;
  padding: 10px 12px;
  max-width: 90%;
}
.ptask-feed-user { font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.ptask-feed-text { font-size: 13px; line-height: 1.4; }
.ptask-feed-compose {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  flex-shrink: 0;
}
.ptask-feed-compose input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--hz-outline-variant);
  border-radius: 999px;
  background: var(--hz-surface-container-lowest);
  color: var(--hz-on-surface);
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
}
.ptask-feed-compose input:focus {
  border-color: color-mix(in srgb, var(--hz-primary) 45%, var(--hz-outline-variant));
}
.ptask-feed-attach,
.ptask-feed-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--hz-on-surface-variant);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.ptask-feed-send {
  background: var(--hz-primary);
  color: var(--hz-on-primary);
}
.ptask-row { cursor: pointer; }
.ptask-row--draggable { cursor: grab; }
.ptask-row--draggable.is-dragging { cursor: grabbing; opacity: 0.55; }
.ptask-row.is-drop-target {
  background: color-mix(in srgb, var(--hz-primary) 12%, var(--hz-surface-container-high)) !important;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--hz-primary) 35%, transparent);
}
.ptask-drag {
  color: var(--hz-on-surface-variant);
  cursor: grab;
  font-size: 20px;
  line-height: 1;
  opacity: 0.72;
}
.ptask-row--draggable:hover .ptask-drag,
.ptask-row.is-dragging .ptask-drag {
  opacity: 1;
}
.ptask-row:not(.ptask-row--draggable) .ptask-drag {
  opacity: 0.28;
  cursor: default;
}
@media (max-width: 900px) {
  .ptask-detail {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) minmax(200px, 38vh);
  }
  .ptask-detail-main {
    padding: calc(12px + env(safe-area-inset-top, 0px)) 16px 18px;
    min-height: 0;
  }
  .ptask-detail-top {
    align-items: flex-start;
    margin-bottom: 10px;
  }
  .ptask-detail-crumb {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
    font-size: 12px;
    line-height: 1.35;
    padding-top: 4px;
  }
  .ptask-detail-title {
    font-size: 24px;
    margin: 0 0 14px;
  }
  .ptask-detail-meta {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 16px;
  }
  .ptask-detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 18px;
  }
  .ptask-detail-action {
    justify-content: center;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 8px;
    font-size: 12px;
    white-space: nowrap;
  }
  .ptask-detail-action-full { display: none; }
  .ptask-detail-action-short { display: inline; }
  .ptask-detail-action[data-ptask-soon="timer"] {
    grid-column: 1 / -1;
  }
  .ptask-detail-actions > .proj-icon-btn {
    display: none;
  }
  .ptask-detail-action .material-symbols-outlined {
    font-size: 17px;
  }
  .ptask-att-drive-badge {
    display: none;
  }
  .ptask-detail-section-head {
    gap: 6px;
    min-width: 0;
  }
  .ptask-detail-feed {
    border-left: none;
    border-top: 1px solid var(--hz-outline-variant);
    max-height: none;
    min-height: 0;
  }
  .ptask-feed-compose {
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  }
  .ptask-feed-system,
  .ptask-feed-target {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

@media (max-width: 900px) {
  /* Workspace mobile layout vive em projects-page.css (drawer). */
}


.proj-ctx-menu {
  position: fixed;
  z-index: 400;
  min-width: 220px;
  padding: 6px;
  border-radius: 12px;
  background: var(--hz-surface-container-lowest);
  border: 1px solid var(--hz-outline-variant);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.proj-ctx-menu button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.proj-ctx-menu button:hover { background: var(--hz-surface-container-high); }
.proj-ctx-menu button .material-symbols-outlined {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.proj-ctx-menu button.is-danger,
.proj-ctx-menu button.is-danger .material-symbols-outlined { color: #f87171; }
.proj-ctx-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--hz-outline-variant);
}
.ptask-ctx-menu { min-width: 240px; }
.ptask-ctx-item { position: relative; }
.ptask-ctx-main {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ptask-ctx-item:hover > .ptask-ctx-main,
.ptask-ctx-item.is-open > .ptask-ctx-main {
  background: var(--hz-surface-container-high);
}
.ptask-ctx-main .proj-type-swatch { flex-shrink: 0; }
.ptask-ctx-main .material-symbols-outlined:first-child {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
}
.ptask-ctx-chevron {
  margin-left: auto !important;
  font-size: 18px !important;
  color: var(--hz-on-surface-variant) !important;
}
.ptask-ctx-sub {
  display: none;
  position: absolute;
  left: calc(100% - 4px);
  top: 0;
  z-index: 5;
  min-width: 180px;
  max-height: 280px;
  overflow: auto;
  padding: 6px;
  border-radius: 12px;
  background: var(--hz-surface-container-lowest);
  border: 1px solid var(--hz-outline-variant);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.ptask-ctx-item.is-open > .ptask-ctx-sub,
.ptask-ctx-item:hover > .ptask-ctx-sub { display: block; }
.ptask-ctx-sub button {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.ptask-ctx-sub button:hover,
.ptask-ctx-sub button.is-selected { background: var(--hz-surface-container-high); }
.ptask-ctx-empty {
  padding: 10px 12px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}

.proj-name-btn.is-favorite::before {
  content: 'star';
  font-family: 'Material Symbols Outlined';
  font-size: 14px;
  color: #fbbf24;
  margin-right: 4px;
  vertical-align: middle;
}


.ptype-modal {
  position: relative;
  z-index: 2;
  width: min(440px, 100%);
  max-height: min(86vh, 720px);
  display: flex;
  flex-direction: column;
  background: var(--hz-surface-container-lowest, #1c1c1e);
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 80%, transparent);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
  overflow: hidden;
}
.ptype-modal.is-dimmed { opacity: 0.35; pointer-events: none; }
.ptype-modal--stack {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.ptype-modal--create {
  z-index: 4;
  width: min(420px, calc(100% - 24px));
  max-height: none;
  overflow: visible;
}
.ptype-modal--create .ptype-modal-body {
  overflow: visible;
  flex: 0 0 auto;
}
.modal-backdrop:has([data-ptype-layer]) {
  overflow-y: auto;
  overscroll-behavior: contain;
}
.ptype-modal-head {
  padding: 18px 20px 8px;
}
.ptype-modal-head h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--hz-on-surface);
}
.ptype-modal-head--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ptype-modal-body {
  padding: 8px 12px 12px;
  overflow: auto;
  min-height: 0;
  flex: 1;
}
.ptype-modal-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  padding: 12px 16px 16px;
}
.ptype-modal-foot--spread { justify-content: space-between; }
.ptype-list { display: flex; flex-direction: column; }
.ptype-row {
  position: relative;
  display: grid;
  grid-template-columns: 28px 18px 1fr 36px;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-radius: 8px;
  color: var(--hz-on-surface);
}
.ptype-row:hover,
.ptype-row.is-open { background: color-mix(in srgb, var(--hz-surface-container-high) 70%, transparent); }
.ptype-row.is-dragging { opacity: 0.55; }
.ptype-drag {
  font-size: 20px;
  color: var(--hz-on-surface-variant);
  cursor: grab;
  justify-self: center;
}
.ptype-row-label { font-size: 14px; font-weight: 500; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ptype-row-more {
  width: 32px; height: 32px; border: none; border-radius: 8px; background: transparent;
  color: var(--hz-on-surface-variant); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  opacity: 0;
}
.ptype-row:hover .ptype-row-more,
.ptype-row.is-open .ptype-row-more { opacity: 1; }
.ptype-row-more:hover { background: var(--hz-surface-container-highest, var(--hz-surface-container-high)); color: var(--hz-on-surface); }
.ptype-row-menu {
  position: absolute;
  right: 8px;
  top: calc(100% - 4px);
  z-index: 5;
  min-width: 140px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.ptype-row-menu button {
  text-align: left;
  border: none;
  background: transparent;
  color: var(--hz-on-surface);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.ptype-row-menu button:hover { background: var(--hz-surface-container-high); }
.ptype-row-menu button.is-danger { color: #f87171; }
.ptype-add-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 8px 8px 0;
  padding: 8px 4px;
  border: none;
  background: none;
  color: var(--hz-on-surface-variant);
  font-size: 13px;
  cursor: pointer;
}
.ptype-add-link:hover { color: var(--hz-on-surface); }
.ptype-add-link .material-symbols-outlined { font-size: 18px; }
.ptype-btn-text {
  border: none; background: none; color: var(--hz-on-surface-variant);
  font-size: 14px; font-weight: 500; padding: 10px 12px; cursor: pointer; border-radius: 8px;
}
.ptype-btn-text:hover { color: var(--hz-on-surface); background: color-mix(in srgb, var(--hz-surface-container-high) 60%, transparent); }
.ptype-btn-save {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 70%, transparent);
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.ptype-btn-save:disabled {
  opacity: 0.45;
  cursor: default;
  color: var(--hz-on-surface-variant);
}
.ptype-btn-save:not(:disabled):hover { filter: brightness(1.06); }
.ptype-btn-create-new {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--hz-outline-variant) 75%, transparent);
  background: var(--hz-surface-container-high);
  color: var(--hz-on-surface);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.ptype-btn-create-new .material-symbols-outlined { font-size: 18px; }
.ptype-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 4px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: transparent;
  color: var(--hz-on-surface-variant);
}
.ptype-search input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  color: var(--hz-on-surface);
  font-size: 14px;
}
.ptype-available-label {
  padding: 0 8px 8px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}
.ptype-add-list { display: flex; flex-direction: column; }
.ptype-add-row {
  display: grid;
  grid-template-columns: 18px 1fr 22px;
  align-items: center;
  gap: 12px;
  padding: 12px 8px;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
}
.ptype-add-row:hover { background: color-mix(in srgb, var(--hz-surface-container-high) 65%, transparent); }
.ptype-add-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.ptype-check {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  border: 1.5px solid var(--hz-outline-variant);
  justify-self: end;
}
.ptype-add-row input:checked + .ptype-check {
  background: var(--hz-primary);
  border-color: var(--hz-primary);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--hz-surface-container-lowest) 90%, transparent);
}
.ptype-empty {
  padding: 16px 8px;
  font-size: 13px;
  color: var(--hz-on-surface-variant);
}
.ptype-create-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px 16px;
}
.ptype-color-wrap { position: relative; flex-shrink: 0; }
.ptype-color-trigger {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-high);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ptype-color-pop {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 6;
  display: grid;
  grid-template-columns: repeat(5, 28px);
  gap: 8px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-lowest);
  box-shadow: 0 12px 28px rgba(0,0,0,.45);
}
.ptype-color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
}
.ptype-color-swatch.is-selected {
  border-color: #fff;
  box-shadow: 0 0 0 2px var(--hz-primary);
}
.ptype-name-input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--hz-outline-variant);
  background-color: var(--hz-surface-container-high, #2c2c2e) !important;
  color: var(--hz-on-surface) !important;
  font-size: 14px;
  outline: none;
  box-shadow: none !important;
  --tw-ring-shadow: 0 0 #0000 !important;
  --tw-ring-offset-shadow: 0 0 #0000 !important;
}
.ptype-name-input:focus {
  border-color: var(--hz-primary);
}
.ptype-name-input::placeholder {
  color: color-mix(in srgb, var(--hz-on-surface-variant) 80%, transparent);
  opacity: 1;
}
.ptype-name-input:-webkit-autofill,
.ptype-name-input:-webkit-autofill:hover,
.ptype-name-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px var(--hz-surface-container-high, #2c2c2e) inset !important;
  -webkit-text-fill-color: var(--hz-on-surface) !important;
  caret-color: var(--hz-on-surface);
}


.ptask-create-menu {
  position: fixed;
  z-index: 420;
  min-width: 280px;
  padding: 6px;
  border-radius: 12px;
  background: var(--hz-surface-container-lowest);
  border: 1px solid var(--hz-outline-variant);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
}
.ptask-create-menu button {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--hz-on-surface);
  text-align: left;
  cursor: pointer;
}
.ptask-create-menu button:hover {
  background: var(--hz-surface-container-high);
}
.ptask-create-menu button .material-symbols-outlined {
  font-size: 22px;
  color: var(--hz-primary);
  margin-top: 2px;
}
.ptask-create-menu button strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
}
.ptask-create-menu button small {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--hz-on-surface-variant);
  line-height: 1.35;
}
.ptask-structure-empty {
  max-width: 560px;
  margin: 48px auto;
  text-align: center;
  padding: 0 16px;
}
.ptask-structure-empty h3 {
  font-size: 18px;
  font-weight: 650;
  color: var(--hz-on-surface);
  margin: 0 0 8px;
}
.ptask-structure-empty p {
  font-size: 14px;
  color: var(--hz-on-surface-variant);
  margin: 0 0 24px;
}
.ptask-structure-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.ptask-structure-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 16px;
  border-radius: 14px;
  border: 1px solid var(--hz-outline-variant);
  background: var(--hz-surface-container-low);
  color: var(--hz-on-surface);
  text-align: left;
  cursor: pointer;
}
.ptask-structure-card:hover {
  border-color: var(--hz-primary);
  background: var(--hz-surface-container-high);
}
.ptask-structure-card .material-symbols-outlined {
  font-size: 28px;
  color: var(--hz-primary);
}
.ptask-structure-card strong {
  font-size: 14px;
}
.ptask-structure-card span:last-child {
  font-size: 12px;
  color: var(--hz-on-surface-variant);
}


.ptask-row--subproject .ptask-col-name {
  align-items: center;
}
.ptask-row--subproject .proj-name-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: hidden;
}
.ptask-sub-icon {
  font-size: 18px;
  color: var(--hz-on-surface-variant);
  vertical-align: middle;
  margin-right: 4px;
}
@media (max-width: 640px) {
  .ptask-structure-actions {
    grid-template-columns: 1fr;
  }
}
