
body {
  font-family: var(--font-sans);
}

.card,
.greeting-card,
.metric-card,
.tile {
  box-shadow: var(--shadow-card);
}

.card-title,
.greeting {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -.02em;
}

.metric-value {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}

.sidebar {
  background: var(--sidebar-grad);
  border-right: 1px solid var(--sidebar-line);
  box-shadow: none;
  padding: 0 12px 16px;
  
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sidebar-brand {
  min-height: var(--shell-header-h);
  padding: 0 10px;
  margin: 0 0 6px;
  border-bottom: 0;
}

.logo-mark {
  width: 28px;
  height: 28px;
}


.brand-wordmark {
  color: var(--sidebar-ink);
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.035em; 
}

.brand-wordmark span {
  color: var(--c-gold);
}

.sidebar-section {
  padding: 0;
  gap: 2px;
}

.sidebar-section + .sidebar-section {
  border-top: 0;
}


.sidebar-section-label {
  display: block;
  padding: 16px 12px 6px;
  color: var(--sidebar-label);
  font: 500 10.5px/1.3 var(--font-sans);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.nav-item {
  min-height: 40px;
  margin: 0;
  padding: 0 12px;
  border-radius: var(--r-nav);
  color: color-mix(in srgb, var(--sidebar-ink) 82%, transparent);
  font-size: 14px;
  font-weight: 400;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--sidebar-ink);
  text-decoration: none;
}

.nav-item.active {
  background: var(--sidebar-on-bg);
  color: var(--sidebar-ink);
  box-shadow: var(--sidebar-on-ring);
  font-weight: 500;
}

.nav-item.active::before {
  display: none;
}

.nav-icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
  color: inherit;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  color: inherit;
}


.nav-subitem {
  border-radius: var(--r-nav);
  font-size: 13px;
}


.sidebar-foot {
  margin-top: auto;
  padding: 14px 4px 0;
  border: 0;
  border-top: 1px solid var(--sidebar-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  gap: 10px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 6px;
}

.sidebar-user-meta {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.sidebar-user .user-email {
  display: block;
  max-width: 100%;
  color: var(--sidebar-ink);
  font: 500 13px/1.35 var(--font-sans);
}

.sidebar-user .sk-email,
.sidebar-user .sk-tier {
  max-width: 100%;
}

.sidebar-user .tier-pill {
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--sidebar-muted);
  font: 400 11.5px/1.35 var(--font-sans);
  letter-spacing: 0;
  text-transform: none;
}

.sidebar-user .tier-pill.skeleton {
  background: var(--skeleton-base);
}

.sidebar-foot .btn-logout {
  width: 100%;
  justify-content: center;
  border: 1px solid var(--sidebar-line);
  color: var(--sidebar-muted);
}

.sidebar-foot .btn-logout:hover {
  border-color: var(--c-border-strong);
  background: var(--sidebar-hover);
  color: var(--sidebar-ink);
}

.sidebar-foot-copy {
  margin-top: 0;
  padding: 0 6px;
  color: var(--sidebar-muted);
  font: var(--t-caption);
  line-height: 1.5;
  letter-spacing: 0;
}

.topbar {
  min-height: var(--shell-header-h);
  padding: 0 28px;
  gap: 16px;
  background: var(--c-top-bg);
  border-bottom: 1px solid var(--c-border);
  box-shadow: none;
  backdrop-filter: blur(14px);
}


.brand-top {
  display: none;
  align-items: center;
  gap: 8px;
  color: var(--c-text);
  text-decoration: none;
}

.brand-top .brand-wordmark {
  color: var(--c-text);
  font-size: 17px;
}

.brand-top .logo-mark {
  width: 24px;
  height: 24px;
}

.topbar-context {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin-right: auto;
}

.topbar-title {
  color: var(--c-text);
  font: 500 14px/1.3 var(--font-sans);
  letter-spacing: 0;
}

.topbar-actions {
  gap: 12px;
}

.topbar-icon-btn,
.theme-toggle {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--c-text-muted);
  border-radius: var(--r-btn);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}

.topbar-icon-btn:hover,
.theme-toggle:hover {
  color: var(--c-text);
  background: var(--c-surface-2);
  border-color: var(--c-border);
}

.theme-toggle {
  border-color: var(--c-border);
}


.market-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 32px;
  padding: 0;
  border: 0;
  color: var(--c-text-muted);
  font: var(--t-small);
  font-feature-settings: var(--font-features);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.market-status #myt-clock {
  color: var(--c-text-muted);
}

.markets-pill,
.markets-pill[data-status="open"],
.markets-pill[data-status="closed"] {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  color: var(--c-text);
  font: var(--t-small);
  font-weight: 500;
  letter-spacing: 0;
}

.markets-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c-text-muted);
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out);
}

.markets-pill[data-status="open"]::before {
  background: var(--c-up);
  box-shadow: 0 0 0 3px var(--c-up-bg);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c-accent-soft);
  color: var(--c-accent-text);
  border: 0;
  font-size: .72rem;
  font-weight: 600;
}

.top-av {
  display: none;
}

.btn-logout {
  min-height: 36px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--r-btn);
  border-color: transparent;
  background: transparent;
  color: var(--c-text-muted);
  font: var(--t-btn);
  font-size: 13px;
}

.btn-logout:hover {
  border-color: transparent;
  background: var(--c-surface-2);
  color: var(--c-text);
}

.main-content {
  background: transparent;
}

.stock-table,
.jv-table,
.results-table,
.num,
.currency,
.score {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}


@media (min-width: 880px) and (max-width: 1099px) {
  .topbar {
    padding: 0 20px;
    gap: 12px;
  }

  .topbar-actions {
    gap: 8px;
  }
}

@media (max-width: 879px) {
  .topbar {
    padding: 0 14px;
  }

  .topbar-icon-btn,
  .theme-toggle {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .topbar-context {
    flex: 1 1 0;
    min-width: 0;
    margin-right: 0;
  }

  .topbar-actions {
    flex: 0 0 auto;
    min-width: max-content;
  }

  #topbar-help-wrap {
    display: none;
  }

  .market-status {
    padding: 0 8px;
  }

  
  .btn-logout {
    min-height: 44px;
    white-space: nowrap;
  }

  
  .nav-item {
    min-height: 44px;
  }

  
  .sidebar {
    width: min(84vw, 290px);
    border-right: 0;
    border-left: 1px solid var(--sidebar-line);
  }

  .top-av {
    display: inline-flex;
  }
}

@media (max-width: 520px) {
  .topbar {
    gap: 4px;
  }

  .topbar-title {
    font-size: .86rem;
  }

  .topbar-actions {
      gap: 4px;
    }

  
  .market-status,
  .markets-pill {
    display: none;
  }
}


.tabbar {
  display: none;
}

@media (max-width: 767px) {
  
  .topbar-context,
  #topbar-search-wrap,
  #topbar-notif-wrap,
  #btn-account {
    display: none;
  }

  .brand-top {
    display: flex;
    margin-right: auto;
  }

  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    height: var(--tabbar-h);
    box-sizing: border-box;
    padding: 6px 2px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--sidebar-grad);
    border-top: 1px solid var(--sidebar-line);
  }

  .tabbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: color-mix(in srgb, var(--sidebar-ink) 72%, transparent);
    font: 400 11px/1.2 var(--font-sans);
    text-decoration: none;
    cursor: pointer;
    transition: color var(--dur-fast) var(--ease-out);
  }

  .tabbar-item:hover {
    color: var(--sidebar-ink);
    text-decoration: none;
  }

  .tabbar-item:hover .tabbar-pill {
    background: var(--sidebar-hover);
  }

  .tabbar-pill {
    position: relative;
    width: 40px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--r-nav);
    transition: background var(--dur-fast) var(--ease-out);
  }

  
  .tabbar-pill::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: var(--sidebar-on-bg);
    box-shadow: inset 0 2px 0 var(--c-accent-line);
    opacity: 0;
    transform: scale(.9);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  }

  .tabbar-item .nav-icon {
    position: relative;
    width: 20px;
    height: 20px;
    stroke-width: 1.7;
    color: inherit;
  }

  .tabbar-item.active {
    color: var(--sidebar-ink);
    font-weight: 500;
  }

  .tabbar-item.active .tabbar-pill::before {
    opacity: 1;
    transform: scale(1);
  }

  .tabbar-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}






.topbar-icon-btn.gsearch .gsearch-text,
.topbar-icon-btn.gsearch .gsearch-kbd {
  display: none;
}


@media (min-width: 880px) {
  .topbar-icon-btn.gsearch {
    width: 250px;
    min-width: 0;
    height: 36px;
    padding: 0 8px 0 14px;
    gap: 10px;
    justify-content: flex-start;
    border-color: var(--c-border);
    background: var(--c-input-bg);
    color: var(--c-text-muted);
    font: var(--t-small);
    text-align: left;
    cursor: text;
  }

  .topbar-icon-btn.gsearch:hover {
    border-color: var(--c-border-strong);
    background: var(--c-input-bg);
    color: var(--c-text);
  }

  .topbar-icon-btn.gsearch:focus-visible {
    border-color: var(--c-border-focus);
    box-shadow: 0 0 0 3px var(--c-focus-ring);
  }

  .topbar-icon-btn.gsearch svg {
    flex-shrink: 0;
  }

  .topbar-icon-btn.gsearch .gsearch-text {
    display: block;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-icon-btn.gsearch .gsearch-kbd {
    display: inline-flex;
    flex-shrink: 0;
  }
}

@media (min-width: 1280px) {
  .topbar-icon-btn.gsearch {
    width: 300px;
  }
}

.gs-dialog {
  width: min(640px, calc(100vw - 24px));
  max-width: none;
  margin: 12vh auto auto;
  padding: 0;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-card);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-popover);
  overflow: hidden;
  font: var(--t-body);
}

.gs-dialog[open] {
  animation: gs-in var(--dur-base) var(--ease-out);
}

@keyframes gs-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.985);
  }
}

.gs-dialog::backdrop {
  background: var(--c-scrim);
  background: color-mix(in srgb, var(--c-bg) 60%, transparent);
  backdrop-filter: blur(3px);
}

.gs-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--c-border);
  transition: border-color var(--dur-fast) var(--ease-out);
}

.gs-input-row:focus-within {
  border-bottom-color: var(--c-border-focus);
}

.gs-input-icon {
  flex-shrink: 0;
  color: var(--c-text-muted);
}

.gs-dialog .gs-input {
  flex: 1;
  min-width: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--c-text);
  font: 500 16px/1.4 var(--font-sans);
  outline: none;
  appearance: none;
}

.gs-dialog .gs-input:focus,
.gs-dialog .gs-input:focus-visible {
  border: 0;
  box-shadow: none;
  outline: none;
}

.gs-dialog .gs-input::placeholder {
  color: var(--c-text-label);
}

.gs-dialog .gs-input::-webkit-search-cancel-button,
.gs-dialog .gs-input::-webkit-search-decoration {
  display: none;
  appearance: none;
}

.gs-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-border-soft);
  color: var(--c-text-muted);
  font: var(--t-small);
}

.gs-status[hidden],
.gs-retry[hidden],
.gs-empty[hidden] {
  display: none;
}

.gs-retry {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--c-accent-text);
  font: var(--t-btn);
  font-size: 13px;
  cursor: pointer;
}

.gs-retry:hover {
  background: var(--c-surface-2);
}

.gs-list {
  max-height: min(52vh, 420px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px;
}

.gs-list:empty {
  display: none;
}

.gs-group-label {
  padding: 10px 10px 4px;
  color: var(--c-text-label);
  font: var(--t-caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.gs-opt {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 8px 10px;
  border-radius: var(--r-nav);
  cursor: pointer;
}

.gs-opt[aria-selected="true"] {
  background: var(--c-accent-soft);
  box-shadow: inset 2px 0 0 var(--c-accent-line);
}

.gs-code {
  flex-shrink: 0;
  min-width: 48px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.gs-name {
  flex: 1;
  min-width: 0;
}

.gs-title,
.gs-sub {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gs-sub {
  color: var(--c-text-muted);
  font: var(--t-caption);
}

.gs-meta {
  flex-shrink: 0;
  max-width: 30%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--c-text-label);
  font: var(--t-caption);
}

.gs-wl-msg {
  margin: 0;
  padding: 10px 16px;
  border-bottom: 1px solid var(--c-border-soft);
  color: var(--c-text-muted);
  font: var(--t-small);
  overflow-wrap: anywhere;
}

.gs-wl-msg[hidden] {
  display: none;
}

.gs-wl[hidden] {
  display: none;
}


.gs-wl {
  display: inline-grid;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--c-accent-text);
  cursor: pointer;
}

.gs-wl svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gs-wl:hover {
  background: var(--c-surface-2);
}

.gs-wl[aria-pressed="true"] {
  border-color: var(--c-accent-line);
  background: var(--c-accent-soft);
}

.gs-wl:focus-visible {
  outline: 2px solid var(--c-border-focus);
  outline-offset: 2px;
}

.gs-ico {
  display: grid;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  background: var(--c-surface-2);
  color: var(--c-text-muted);
}

.gs-ico svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gs-empty {
  margin: 0;
  padding: 26px 16px;
  color: var(--c-text-muted);
  text-align: center;
  overflow-wrap: anywhere;
}

.gs-foot {
  display: flex;
  gap: 16px;
  padding: 10px 16px;
  border-top: 1px solid var(--c-border);
  color: var(--c-text-label);
  font: var(--t-caption);
}

.gs-foot .kbd-hint {
  display: inline-flex;
}

@media (max-width: 879px) {
  .gs-dialog {
    margin-top: 8vh;
  }

  .gs-foot {
    display: none;
  }
}

@media (max-width: 520px) {
  .gs-meta {
    display: none;
  }
}

@media (pointer: coarse) {
  .gs-retry {
    min-height: 44px;
  }

  .gs-wl {
    width: 44px;
    height: 44px;
  }
}

@media (min-width: 880px) and (max-width: 1099px) {
  .topbar-icon-btn.gsearch {
    width: 200px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gs-dialog[open] {
    animation: none;
  }

  .gs-input-row {
    transition: none;
  }
}




button.nav-item {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

button.nav-item:focus-visible {
  outline: 2px solid var(--c-border-focus);
  outline-offset: -2px;
}


.nav-item-compact-only {
  display: none;
}

.top-av-btn {
  display: none;
}


.drawer-close {
  display: none;
}

@media (max-width: 879px) {
  .nav-item-compact-only {
    display: flex;
  }

  .drawer-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: var(--r-btn);
    background: transparent;
    color: var(--sidebar-muted);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
  }

  .drawer-close:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-ink);
  }

  .drawer-close:focus-visible {
    outline: 2px solid var(--c-border-focus);
    outline-offset: 2px;
  }

  
  .top-av-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
  }

  .top-av-btn:focus-visible {
    outline: 2px solid var(--c-border-focus);
    outline-offset: 2px;
  }

  
  #topbar-help-wrap {
    display: contents;
  }

  #btn-help {
    display: none;
  }

  #help-dropdown {
    position: fixed;
    top: calc(var(--shell-header-h) + 8px);
    right: 12px;
    left: auto;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100dvh - var(--shell-header-h) - var(--tabbar-h, 0px) - 24px);
    overflow-y: auto;
  }

  
  .sidebar {
    padding-bottom: 0;
  }

  .sidebar-foot {
    position: sticky;
    bottom: 0;
    z-index: 1;
    margin-left: -12px;
    margin-right: -12px;
    padding: 14px 16px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--sidebar-grad);
  }

  
  .drawer-open .tour-pill {
    visibility: hidden;
  }
}


.fb-dialog {
  width: min(520px, calc(100vw - 24px));
  max-width: none;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--c-border-strong);
  border-radius: var(--r-card);
  background: var(--c-surface);
  color: var(--c-text);
  box-shadow: var(--shadow-popover);
  overflow-y: auto;
  font: var(--t-body);
}

.fb-dialog[open] {
  animation: gs-in var(--dur-base) var(--ease-out);
}

.fb-dialog::backdrop {
  background: var(--c-scrim);
  background: color-mix(in srgb, var(--c-bg) 60%, transparent);
  backdrop-filter: blur(3px);
}

.fb-form,
.fb-done {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.fb-form[hidden],
.fb-done[hidden] {
  display: none;
}

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

.fb-title {
  margin: 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -.01em;
}

.fb-title:focus {
  outline: none;
}

.fb-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: -10px -10px -10px 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--c-text-muted);
  cursor: pointer;
}

.fb-close:hover {
  background: var(--c-surface-hover);
  color: var(--c-text);
}

.fb-lede {
  margin: 0;
  color: var(--c-text-muted);
  font: var(--t-small);
}

.fb-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.fb-label {
  padding: 0;
  color: var(--c-text);
  font: var(--t-label);
}

.fb-optional {
  margin-left: 6px;
  color: var(--c-text-muted);
  font: var(--t-caption);
}


.fb-seg {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-btn);
  background: var(--c-input-bg);
}

.fb-seg label {
  position: relative;
}

.fb-seg input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.fb-seg span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: calc(var(--r-btn) - 2px);
  color: var(--c-text-muted);
  font: var(--t-small);
  font-weight: 500;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}

.fb-seg input:checked + span {
  background: var(--c-accent-soft);
  box-shadow: inset 0 0 0 1px var(--c-accent-line);
  color: var(--c-text);
}

.fb-seg input:focus-visible + span {
  outline: 2px solid var(--c-border-focus);
  outline-offset: 1px;
}


.fb-stars {
  position: relative;
  display: inline-flex;
  gap: 2px;
}

.fb-stars input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.fb-stars label {
  width: 44px;
  height: 44px;
  cursor: pointer;
  background-color: var(--c-border-strong);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8-4.3-4.1 5.9-.9z'/%3E%3C/svg%3E") center / 28px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8-4.3-4.1 5.9-.9z'/%3E%3C/svg%3E") center / 28px no-repeat;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.fb-stars input:checked + label,
.fb-stars label:has(~ input:checked),
.fb-stars label:hover,
.fb-stars label:has(~ label:hover) {
  background-color: var(--c-accent);
}

.fb-stars:hover label:not(:hover):not(:has(~ label:hover)) {
  background-color: var(--c-border-strong);
}

.fb-stars input:focus-visible + label {
  background-color: var(--c-accent-line);
}

.fb-message {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  font: var(--t-body);
}

.fb-count {
  justify-self: end;
  color: var(--c-text-muted);
  font: var(--t-caption);
  font-variant-numeric: tabular-nums;
}

.fb-count.is-short {
  color: var(--c-warning);
}

.fb-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.fb-file-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: start;
  min-height: 44px;
  padding: 0 16px;
  border: 1px dashed var(--c-border-strong);
  border-radius: var(--r-btn);
  color: var(--c-text-muted);
  font: var(--t-small);
  font-weight: 500;
  cursor: pointer;
}

.fb-file-btn[hidden] {
  display: none;
}

.fb-file-btn:hover {
  border-color: var(--c-accent-line);
  color: var(--c-text);
}

.fb-file-input:focus-visible + .fb-file-btn {
  outline: 2px solid var(--c-border-focus);
  outline-offset: 2px;
}

.fb-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card-sm);
}

.fb-preview[hidden] {
  display: none;
}

.fb-preview img {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  background: var(--c-surface-2);
}

.fb-preview-name {
  overflow: hidden;
  color: var(--c-text-muted);
  font: var(--t-caption);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fb-remove {
  min-height: 44px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-btn);
  background: transparent;
  color: var(--c-text-muted);
  font: var(--t-small);
  cursor: pointer;
}

.fb-remove:hover {
  background: var(--c-surface-hover);
  color: var(--c-text);
}

.fb-status {
  margin: 0;
  font: var(--t-small);
}

.fb-status:empty {
  display: none;
}

.fb-status.is-error {
  color: var(--c-down-text);
}

.fb-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.fb-btn {
  min-height: 44px;
  min-width: 96px;
}

@media (max-width: 520px) {
  
  .fb-dialog {
    width: 100vw;
    max-height: calc(100dvh - 32px);
    margin: auto 0 0;
    border-radius: var(--r-card) var(--r-card) 0 0;
  }

  .fb-form,
  .fb-done {
    padding: 18px 16px calc(16px + env(safe-area-inset-bottom, 0px));
  }

  .fb-message {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fb-dialog[open] {
    animation: none;
  }
}


.move-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-1) 28px;
  background: var(--c-accent-soft);
  border-bottom: 1px solid var(--c-border-sky);
  color: var(--c-text);
  font: var(--t-small);
}
.move-banner-close {
  flex: none;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--c-text-muted);
  font: var(--t-btn);
  cursor: pointer;
}
.move-banner-close:hover { background: var(--c-surface-hover); color: var(--c-text); }
.move-banner-close:focus-visible { outline: 2px solid var(--c-accent-line); outline-offset: 2px; }
