.wiki-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  overflow: hidden;
}

.wiki-thumb {
  border-radius: 13px;
  max-width: 40%;
  float: right;
  margin-left: 1rem;
  margin-bottom: 1rem;
  background: var(--border-color);
}

.wiki-thumb--logo {
  display: block;
  max-width: 80%;
  max-height: 60px;
  width: auto;
  object-fit: contain;
  object-position: left center;
  margin-bottom: 0.75rem;
  margin: 0.75rem auto 2rem auto;
}

.wiki-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wiki-title {
  display: block;
  font-size: var(--font-large);
  font-weight: 600;
  color: var(--link-color);
  text-decoration: none;
  line-height: 1.1;
}

.wiki-title:hover {
  color: var(--link-hover, var(--link-color));
  text-decoration: underline;
}

.wiki-desc {
  margin-bottom: 1rem;
  font-size: var(--font-small);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 500;
}

.wiki-extract {
  font-size: var(--font-medium);
  color: var(--text-primary);
  display: inline;
}

.wiki-footer-link {
  display: inline-block;
  margin-top: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.wiki-footer-link:hover {
  color: var(--link-color);
  text-decoration: underline;
}

/* ── Currency Slot – Minimal Theme ──────────────────── */

.cxs-wrap {
    container-type: inline-size;
    box-sizing: border-box;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    font-family: var(--font-sans, sans-serif);
    position: relative;
    color: var(--text-primary);
}

.cxs-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.cxs-title {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.cxs-main {
    border: 1px solid var(--slot-inset-border, var(--border-light));
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
    background: var(--slot-inset-bg, var(--bg-light, #2f3033));
}

.cxs-row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    grid-template-areas: "flag input button";
    align-items: end;
    padding: 16px 18px;
    gap: 14px;
}

.cxs-flag {
    grid-area: flag;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s ease;
}

.cxs-flag.changing {
    opacity: 0;
}

.cxs-flag svg {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 6px;
}

.cxs-input-wrap {
    grid-area: input;
    flex: 1;
    min-width: 0;
    position: relative;
}

.cxs-label {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.cxs-amount {
    width: 100%;
    font-size: clamp(1.8rem, 5vw, 2rem);
    font-weight: 400;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-sans, sans-serif);
    letter-spacing: -0.03em;
    padding: 0 0 4px;
    border-bottom: 2px solid transparent;
    font-variant-numeric: tabular-nums;
    cursor: text;
    transition: border-color 160ms ease;
}

.cxs-amount:hover {
    border-bottom-color: color-mix(
        in srgb,
        var(--primary, #4285f4) 45%,
        transparent
    );
}

.cxs-amount:focus {
    border-bottom-color: var(--primary, #4285f4);
}

.cxs-amount::-webkit-inner-spin-button,
.cxs-amount::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.cxs-amount[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.cxs-result {
    font-size: clamp(1.8rem, 5vw, 2rem);
    font-weight: 400;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    min-height: 32px;
    font-variant-numeric: tabular-nums;
}

.cxs-result-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.cxs-result-line .cxs-result {
    flex: 1;
    min-width: 0;
}

.cxs-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid var(--border-light, var(--border));
    border-radius: 999px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.cxs-copy svg {
    display: block;
}

.cxs-copy .cxs-copy-done {
    display: none;
}

.cxs-copy.copied .cxs-copy-icon {
    display: none;
}

.cxs-copy.copied .cxs-copy-done {
    display: block;
}

.cxs-copy:hover,
.cxs-copy:focus-visible {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    border-color: var(--primary, #4285f4);
    color: var(--primary, #4285f4);
    outline: none;
}

.cxs-copy.copied {
    border-color: var(--success, #34a853);
    color: var(--success, #34a853);
}

/* Currency buttons */
.cxs-cur-btn {
    grid-area: button;
    justify-self: start;
    align-self: end;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    cursor: pointer;
    color: var(--text-primary);
    flex-shrink: 0;
    transition:
        background-color 160ms ease,
        border-color 160ms ease;
    font-family: var(--font-sans, sans-serif);
    margin-bottom: 2px;
}

.cxs-cur-btn:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
}

.cxs-cur-display {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.cxs-cur-code {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.cxs-cur-name {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-primary);
}

.cxs-divider {
    height: 1px;
    background: var(--border-light);
    position: relative;
}

.cxs-swap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg, #1a1a1a);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
    z-index: 2;
    padding: 0;
}

.cxs-swap:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    color: var(--text-primary);
}

.cxs-swap-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.4s ease;
    width: 100%;
    height: 100%;
}

.cxs-swap.spinning .cxs-swap-inner {
    transform: rotate(180deg);
}

/* Rate bar */
.cxs-rate-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding: 10px 18px;
    border-top: 1px solid var(--border-light);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.cxs-rate-val {
    font-weight: 600;
    color: var(--text-primary);
}

.cxs-updated {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cxs-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success, #4ade80);
    animation: cxs-pulse-animate 2s ease-in-out infinite;
}

@keyframes cxs-pulse-animate {
    0%,
    100% {
        opacity: 0.4;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Quick amounts */
.cxs-quick {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 14px;
}

.cxs-q {
    font-size: 0.88rem;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: var(--font-sans, sans-serif);
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease;
}

.cxs-q:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    color: var(--text-primary);
}

/* Popular pairs */
.cxs-pairs-label {
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.cxs-pairs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cxs-pair {
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease;
    background: var(--bg-light, #2f3033);
    overflow: hidden;
}

.cxs-pair:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
}

.cxs-pair-name {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.cxs-pair-rate {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
}

/* Picker */
.cxs-picker {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-light, var(--bg));
    border: 1px solid var(--border);
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: none;
    opacity: 0;
    transform: translateY(-8px);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.cxs-picker.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.cxs-picker-loading {
    padding: 32px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.cxs-picker-top {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
}

.cxs-picker-search {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-size: 1rem;
    color: var(--text-primary);
    font-family: var(--font-sans, sans-serif);
}

.cxs-picker-search::placeholder {
    color: var(--text-secondary);
}

.cxs-picker-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 8px;
    border-radius: 8px;
    transition:
        background-color 160ms ease,
        color 160ms ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cxs-picker-close:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
    color: var(--text-primary);
}

.cxs-picker-list {
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
}

.cxs-picker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 160ms ease;
}

.cxs-picker-item:hover {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
}

.cxs-picker-item--selected {
    background: var(--bg-hover, rgba(255, 255, 255, 0.04));
}

.cxs-picker-flag {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.cxs-picker-flag svg {
    width: 100%;
    height: 100%;
    border-radius: 6px;
}

.cxs-picker-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.cxs-picker-name {
    font-size: 0.94rem;
    font-weight: 500;
    color: var(--text-primary);
}

.cxs-picker-code {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.cxs-picker-checkmark {
    color: var(--primary, #4ade80);
    font-size: 0.9rem;
    font-weight: 600;
    flex-shrink: 0;
}

@container (max-width: 480px) {
    .cxs-row {
        grid-template-columns: 22px minmax(0, 1fr);
        grid-template-areas:
            "flag input"
            "flag button";
        align-items: start;
    }

    .cxs-cur-btn {
        margin-bottom: 0;
        margin-top: 2px;
    }

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

    .cxs-amount,
    .cxs-result {
        font-size: 1.6rem;
    }

    .cxs-result-line {
        align-items: flex-start;
    }

    .cxs-row {
        padding: 14px;
    }

    .cxs-main > .cxs-row:first-child {
        padding-bottom: 22px;
    }
}

/* ── Chart Panel ───────────────────────────────────── */

.cxs-layout {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 20px;
}

/* Default (narrow layouts): picker uses full card width. */
.cxs-picker {
    right: 0;
    width: 100%;
}

/* Wide chart + converter row follows the native slot's actual card width. */
@container (min-width: 900px) {
    .cxs-layout {
        flex-direction: row;
    }

    .cxs-picker {
        right: auto;
        width: calc((100% - 1rem) / 2);
    }
}

@container (max-width: 600px) {
    .cxs-layout {
        flex-direction: column;
    }

    .cxs-picker {
        width: 100%;
    }
}

.cxs-layout .cxs-main {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.cxs-chart-panel {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--slot-inset-border, var(--border-light));
    border-radius: 12px;
    padding: 16px;
    background: var(--slot-inset-bg, var(--bg-light, transparent));
}

@container (max-width: 600px) {
    .cxs-chart-panel {
        min-height: 212px;
    }
}

.cxs-chart-header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 12px;
}

.cxs-chart-title {
    display: none;
}

.cxs-chart-periods {
    display: flex;
    gap: 4px;
}

.cxs-period {
    padding: 4px 10px;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        border-color 160ms ease;
}

.cxs-period:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.cxs-period--active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cxs-period--active:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.cxs-chart-body {
    flex: 1;
    /* Matches renderChart() fixed H in script.js so loading state doesn’t jump. */
    min-height: 212px;
    position: relative;
}

.cxs-chart-svg {
    width: 100%;
    height: 100%;
    display: block;
    min-height: 212px;
}

.cxs-chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 212px;
    height: 100%;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.cxs-chart-stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.45rem 0.7rem;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-light);
}

.cxs-stat {
    flex: 1 1 92px;
    min-width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cxs-stat--placeholder {
    visibility: hidden;
    pointer-events: none;
}

.cxs-stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cxs-stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 2px;
}

.cxs-stat-value--up {
    color: var(--success);
}

.cxs-stat-value--down {
    color: var(--danger);
}

.cxs-chart-line {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cxs-chart-fill {
    opacity: 0.15;
}

.cxs-chart-dot {
    fill: var(--primary);
    r: 4;
}

/* ── Chart grid & axes ─────────────────────────────────────── */

.cxs-chart-grid-line {
    stroke: var(--border-light);
    stroke-width: 1;
    stroke-dasharray: 3 3;
}

.cxs-chart-y-label {
    font-size: 10px;
    fill: var(--text-secondary);
    font-family: var(--font-sans, sans-serif);
    dominant-baseline: middle;
}

.cxs-chart-x-label {
    font-size: 10px;
    fill: var(--text-secondary);
    font-family: var(--font-sans, sans-serif);
    dominant-baseline: middle;
}

/* ── Chart hover interaction ───────────────────────────────── */

.cxs-chart-hit {
    fill: transparent;
    pointer-events: all;
    cursor: crosshair;
}

.cxs-chart-hl-line {
    stroke: var(--text-secondary);
    stroke-width: 1;
    stroke-dasharray: 3 3;
    stroke-opacity: 0.5;
    pointer-events: none;
}

.cxs-chart-hl-dot {
    fill: var(--primary, #4285f4);
    stroke: var(--bg-light, var(--bg, #1f1f1f));
    stroke-width: 2;
    pointer-events: none;
}

.cxs-chart-tooltip {
    position: absolute;
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--theme-radius-sm, 8px);
    padding: 8px 12px;
    font-size: 0.8rem;
    pointer-events: none;
    white-space: nowrap;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.15s ease;
    top: 0;
}

.cxs-chart-tooltip--visible {
    opacity: 1;
}

.cxs-tt-date {
    font-size: 0.72rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.cxs-tt-rate {
    font-weight: 600;
    color: var(--text-primary);
}

.trc-card {
  --trc-accent: var(--primary);
  container-type: inline-size;
  box-sizing: border-box;
  width: 100%;
  margin: 0 0 12px;
  padding: 14px;
  border: 1px solid var(--border-light);
  border-radius: 18px;
  background: var(--bg-light);
  color: var(--text-primary);
  font-family: var(--font-sans, system-ui, sans-serif);
}

#results-page .results-slot-panel:has(> .results-slot-panel-body > .trc-card) {
  overflow: hidden;
}

#results-page .results-slot-panel:has(> .results-slot-panel-body > .trc-card) > .results-slot-panel-body {
  padding: 0 !important;
}

#results-page .results-slot-panel:has(> .results-slot-panel-body > .trc-card) .results-slot-panel-title {
  display: none;
}

#results-page .results-slot-panel:has(> .results-slot-panel-body > .trc-card) > .results-slot-panel-body > .trc-card {
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.trc-card *,
.trc-card *::before,
.trc-card *::after {
  box-sizing: border-box;
}

.trc-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.trc-title-wrap {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
  padding-top: 2px;
}

.trc-glyph {
  display: inline-flex;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--trc-accent);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.trc-title {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trc-provider-field {
  display: grid;
  min-width: min(250px, 52%);
  gap: 4px;
}

.trc-label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
}

.trc-status {
  display: none;
}

.trc-status[data-status="success"] {
  color: var(--success);
}

.trc-status[data-status="failed"] {
  color: var(--warning);
}

.trc-status[data-status="disabled"] {
  color: var(--text-secondary);
}

.trc-language-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
  margin-bottom: 10px;
}

.trc-field {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.trc-provider-select,
.trc-source-select,
.trc-target-select {
  width: 100%;
  min-width: 0;
  height: 40px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2380868b' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 10px 6px;
  padding: 0 32px 0 12px;
  color: var(--text-primary);
  font: inherit;
  font-size: 0.84rem;
  line-height: 1.2;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.trc-provider-select:focus,
.trc-source-select:focus,
.trc-target-select:focus {
  border-color: var(--trc-accent);
  outline: none;
}

.trc-source-input:focus,
.trc-output:focus {
  outline: none;
}

.trc-icon-button {
  display: inline-flex;
  width: 34px;
  height: 34px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-light);
  border-radius: 999px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.trc-icon-button:hover,
.trc-icon-button:focus-visible,
.trc-audio-button.trc-audio-playing {
  border-color: var(--border);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--text-secondary) 10%, transparent);
  outline: none;
}

.trc-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.trc-icon-button svg,
.trc-button svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

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

.trc-pane {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 8px;
  min-height: 190px;
  padding: 13px 14px 10px;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: var(--bg);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.trc-pane:focus-within {
  border-color: var(--trc-accent);
  box-shadow: 0 0 0 1px var(--trc-accent);
}

.trc-source-input,
.trc-output {
  width: 100%;
  min-height: 92px;
  max-height: 220px;
  resize: vertical;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text-primary);
  font: inherit;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.32;
  padding: 0;
}

.trc-output {
  color: var(--text-primary);
}

.trc-source-input::placeholder,
.trc-output::placeholder {
  color: var(--text-secondary);
}

.trc-romanization {
  min-height: 1.2em;
  color: var(--text-secondary);
  font-size: 0.96rem;
  line-height: 1.35;
}

.trc-romanization:empty {
  display: none;
}

.trc-pane-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  margin-top: auto;
}

.trc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.trc-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid var(--border-light);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 7px 11px;
}

.trc-button:hover {
  border-color: var(--border);
}

.trc-button:disabled,
.trc-card[data-trc-loading="1"] .trc-button {
  cursor: wait;
  opacity: 0.68;
}

.trc-copy-button[data-copied="1"] {
  border-color: var(--success);
  color: var(--success);
}

@container (max-width: 680px) {
  .trc-card {
    padding: 10px;
  }

  .trc-toolbar {
    display: grid;
    gap: 8px;
  }

  .trc-provider-field {
    min-width: 0;
  }
}

/* ── Unit Converter Slot ────────────────────────────────────────── */

.uxs-wrap {
    container-type: inline-size;
    position: relative;
    color: var(--text-primary, inherit);
    width: 100%;
    max-width: none;
}

.uxs-main {
    position: relative;
}

/* ── Category bar ──────────────────────────────────────────────── */

.uxs-top-bar {
    border-bottom: 1px solid var(--border-light, color-mix(in srgb, currentColor 15%, transparent));
    padding-bottom: 10px;
    background: transparent;
}

.uxs-category-select {
    width: 100%;
    padding: 8px 36px 8px 0;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: var(--text-primary, inherit);
    font-size: 0.88rem;
    font-weight: 500;
    letter-spacing: 0;
    outline: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.uxs-category-select:hover {
    background-color: var(--bg-hover, rgba(128, 128, 128, 0.12));
}

.uxs-category-select:focus-visible {
    box-shadow: inset 0 0 0 2px var(--primary, #4285f4) !important;
}

.uxs-category-select option,
.uxs-unit-select option {
    background: var(--bg-light, var(--bg, Canvas));
    color: var(--text-primary, CanvasText);
}

/* ── Conversion rows ───────────────────────────────────────────── */

.uxs-row {
    display: flex;
    align-items: center;
    padding: 16px 0;
    gap: 16px;
    transition: background-color 0.15s ease;
}

.uxs-input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: relative;
}

.uxs-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(
        --text-secondary,
        color-mix(in srgb, currentColor 60%, transparent)
    );
    margin-bottom: 4px;
}

/* ── Number input ──────────────────────────────────────────────── */

.degoog-input.uxs-amount {
    width: 100%;
    font-size: clamp(1.8rem, 5cqi, 2.1rem);
    font-weight: 400;
    color: var(--text-primary, inherit);
    background: transparent !important;
    border: none !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none;
    letter-spacing: 0;
    padding: 0 0 4px;
    font-variant-numeric: tabular-nums;
    transition: border-color 0.2s ease;
    cursor: text;
}

.degoog-input.uxs-amount:hover {
    border-bottom-color: color-mix(
        in srgb,
        var(--primary, #4285f4) 45%,
        transparent
    ) !important;
}

.degoog-input.uxs-amount:focus {
    border-bottom-color: var(--primary, #4285f4) !important;
}

.uxs-amount::-webkit-inner-spin-button,
.uxs-amount::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.uxs-amount[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ── Result display ────────────────────────────────────────────── */

.uxs-result {
    font-size: clamp(1.8rem, 5cqi, 2.1rem);
    font-weight: 400;
    color: var(--text-primary, inherit);
    letter-spacing: 0;
    min-height: 1.3em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: break-word;
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
}

.uxs-result.updating {
    color: color-mix(
        in srgb,
        var(--text-primary, inherit) 78%,
        var(--primary, #4285f4)
    );
}

.uxs-result-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.uxs-result-line .uxs-result {
    flex: 1;
    min-width: 0;
}

.uxs-copy {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 1px solid
        var(
            --border-light,
            var(--border, color-mix(in srgb, currentColor 30%, transparent))
        );
    border-radius: 999px;
    background: transparent;
    color: var(
        --text-secondary,
        color-mix(in srgb, currentColor 60%, transparent)
    );
    cursor: pointer;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease;
}

.uxs-copy svg {
    display: block;
}

.uxs-copy .uxs-copy-done {
    display: none;
}

.uxs-copy.copied .uxs-copy-icon {
    display: none;
}

.uxs-copy.copied .uxs-copy-done {
    display: block;
}

.uxs-copy:hover,
.uxs-copy:focus-visible {
    background: var(--bg-hover, rgba(128, 128, 128, 0.08));
    border-color: var(--primary, #4285f4);
    color: var(--primary, #4285f4);
    outline: none;
}

.uxs-copy.copied {
    border-color: var(--success, #34a853);
    color: var(--success, #34a853);
}

/* ── Unit select (right side) ──────────────────────────────────── */

.uxs-select-wrap {
    flex-shrink: 0;
    max-width: 55%;
}

.uxs-unit-select {
    width: 100%;
    color: var(--text-primary, inherit);
    font-size: 0.88rem;
    font-weight: 500;
    padding: 10px 36px 10px 14px;
    border-radius: 999px;
    border: 1px solid
        var(--border, color-mix(in srgb, currentColor 30%, transparent)) !important;
    background-color: var(--bg-light, var(--bg, transparent)) !important;
    outline: none;
    cursor: pointer;
    transition:
        border-color 0.15s ease,
        background-color 0.15s ease;
    text-align: left;
}

.uxs-unit-select:hover {
    border-color: var(
        --text-secondary,
        color-mix(in srgb, currentColor 50%, transparent)
    );
    background-color: var(--bg-hover, rgba(128, 128, 128, 0.08));
}

.uxs-unit-select:focus-visible {
    border-color: var(--primary, #4285f4);
    box-shadow: 0 0 0 1px var(--primary, #4285f4);
}

/* ── Divider + swap button ─────────────────────────────────────── */

.uxs-divider {
    height: 1px;
    background: color-mix(in srgb, currentColor 15%, transparent);
    position: relative;
}

.uxs-swap {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid
        var(--border, color-mix(in srgb, currentColor 30%, transparent));
    background: var(--bg-light, var(--bg, Canvas));
    color: var(
        --text-secondary,
        color-mix(in srgb, currentColor 60%, transparent)
    );
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition:
        background-color 0.15s ease,
        border-color 0.15s ease,
        color 0.15s ease,
        box-shadow 0.15s ease;
    z-index: 2;
    padding: 0;
}

.uxs-swap:hover {
    background: var(--bg-hover, rgba(128, 128, 128, 0.1));
    border-color: var(--primary, #4285f4);
    color: var(--primary, #4285f4);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.15);
}

.uxs-swap:active {
    transform: translate(-50%, -50%) scale(0.93);
}

.uxs-swap-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.uxs-swap.spinning .uxs-swap-inner {
    transform: rotate(180deg);
}

/* ── Formula bar ───────────────────────────────────────────────── */

.uxs-formula-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 0 0 0;
    border-top: 1px solid var(--border-light, color-mix(in srgb, currentColor 15%, transparent));
    font-size: 0.82rem;
    color: var(
        --text-secondary,
        color-mix(in srgb, currentColor 60%, transparent)
    );
    letter-spacing: 0;
    background: transparent;
}

/* ── Mobile / narrow container ─────────────────────────────────── */

@container (max-width: 480px) {
    .uxs-amount,
    .uxs-result {
        font-size: 1.5rem;
    }

    .uxs-result-line {
        align-items: flex-start;
    }

    .uxs-row {
        padding: 14px;
        gap: 12px;
    }

    .uxs-category-select {
        padding-left: 14px;
        font-size: 0.84rem;
    }

    .uxs-unit-select {
        font-size: 0.82rem;
        padding: 8px 32px 8px 12px;
    }
}

@keyframes weather-spin {
    100% { transform: rotate(360deg); }
}
@keyframes weather-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}
@keyframes weather-rain {
    0% { transform: translateY(-10px); opacity: 0; }
    30% { opacity: 1; }
    80%, 100% { transform: translateY(18px); opacity: 0; }
}
@keyframes weather-snow {
    0% { transform: translateY(-8px) translateX(0); opacity: 0; }
    30% { opacity: 1; }
    50% { transform: translateY(8px) translateX(4px); }
    100% { transform: translateY(22px) translateX(-2px); opacity: 0; }
}
@keyframes weather-flash {
    0%, 90%, 100% { opacity: 0.1; }
    92%, 95% { opacity: 1; }
}

.weather-ani-sun {
    display: flex;
    align-items: center;
    justify-content: center;
}
.weather-ani-float {
    animation: weather-float 4.5s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}
.weather-drop {
    position: absolute;
    width: 2px;
    background: #60a5fa;
    border-radius: 1px;
    animation: weather-rain 1.1s linear infinite;
    opacity: 0;
}
.weather-flake {
    position: absolute;
    width: 3px;
    height: 3px;
    background: #bfdbfe;
    border-radius: 50%;
    animation: weather-snow 2.2s linear infinite;
    opacity: 0;
}
.weather-bolt {
    animation: weather-flash 3.5s ease-in-out infinite;
}

.weather-result {
    container-type: inline-size;
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
    font-family: var(--font-sans, sans-serif);
    color: var(--text-primary);
    position: relative;
    box-sizing: border-box;
    /* Guaranteed-visible card border. Some themes (default dark) set
       --border-light identical to --bg-light, which makes borders vanish.
       Derive from --text-primary so it is always legible. */
    --weather-border: color-mix(in srgb, var(--text-primary) 16%, transparent);
    --weather-card-bg: var(--bg-light, color-mix(in srgb, var(--text-primary) 5%, transparent));
}

.weather-header {
    margin-bottom: 10px;
}

.weather-eyebrow {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.weather-location {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 0;
    overflow-wrap: anywhere;
}

.weather-hero {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px 24px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid var(--slot-inset-border, var(--weather-border));
    border-radius: 16px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--text-primary) 4%, transparent), transparent 55%), var(--slot-inset-bg, var(--weather-card-bg));
    box-shadow: inset 0 1px 0 color-mix(in srgb, var(--text-primary) 6%, transparent);
}

.weather-result[data-weather-is-day="1"] .weather-hero {
    background: radial-gradient(130% 135% at 6% -25%, color-mix(in srgb, #f59e0b 14%, transparent), transparent 56%), linear-gradient(180deg, color-mix(in srgb, var(--text-primary) 4%, transparent), transparent 55%), var(--slot-inset-bg, var(--weather-card-bg));
}

.weather-result[data-weather-is-day="0"] .weather-hero {
    background: radial-gradient(130% 135% at 6% -25%, color-mix(in srgb, #4285f4 16%, transparent), transparent 56%), linear-gradient(180deg, color-mix(in srgb, var(--text-primary) 5%, transparent), transparent 55%), var(--slot-inset-bg, var(--weather-card-bg));
}

.weather-hero-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    min-width: 0;
    flex: 0 1 auto;
}

.weather-hero-icon {
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.weather-temp-wrap {
    display: flex;
    align-items: flex-start;
    line-height: 0.9;
    flex-shrink: 0;
}

.weather-temp {
    font-size: clamp(3.2rem, 8.5cqi, 4rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.weather-deg {
    font-size: clamp(1.2rem, 3.2cqi, 1.6rem);
    font-weight: 400;
    margin-top: 5px;
    margin-left: 2px;
    opacity: 0.85;
}

.weather-hero-meta {
    display: grid;
    grid-template-columns: max-content max-content;
    column-gap: 12px;
    row-gap: 4px;
    align-content: center;
    font-size: 0.82rem;
    color: var(--text-secondary);
    flex: 0 0 auto;
    width: max-content;
    max-width: 100%;
}

.weather-meta-row {
    display: contents;
}

.weather-meta-row > span {
    white-space: nowrap;
}

.weather-meta-row strong {
    color: var(--text-primary);
    font-weight: 500;
    white-space: nowrap;
    justify-self: end;
    font-variant-numeric: tabular-nums;
}

.weather-hero-right {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 0;
    flex: 0 1 auto;
    margin-left: auto;
}

.weather-hero-eyebrow {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    color: var(--text-secondary);
}

.weather-hero-date {
    font-size: 0.84rem;
    color: var(--text-secondary);
}

.weather-desc {
    font-size: clamp(1.05rem, 2.8cqi, 1.25rem);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.weather-hero-hilo {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.weather-hero-hilo strong {
    color: var(--text-primary);
    font-weight: 600;
}

.weather-hero-hilo .weather-hilo-sep {
    margin: 0 4px;
    opacity: 0.5;
}

.weather-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}
.weather-tabs::-webkit-scrollbar {
    display: none;
}

.weather-tab {
    padding: 7px 15px;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 20px;
    border: 1px solid var(--weather-border);
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}

.weather-tab:hover {
    background: var(--bg-hover, rgba(128,128,128,0.08));
    color: var(--text-primary);
}

.weather-tab-active {
    background: var(--primary, #4285f4) !important;
    border-color: var(--primary, #4285f4) !important;
    color: #fff !important;
}

.weather-chart-wrap {
    padding: 12px 14px;
    border: 1px solid var(--weather-border);
    border-radius: 14px;
    background: var(--weather-card-bg);
    margin-bottom: 16px;
    position: relative;
}

.weather-chart-head {
    margin-bottom: 8px;
}

.weather-chart-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
}

.weather-chart-sub {
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.weather-chart {
    height: 140px;
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
}

.weather-chart-mount {
    position: relative;
    height: 100%;
    min-width: 100%;
}

.weather-chart-mount > svg {
    display: block;
    width: 100%;
    height: calc(100% - 18px);
}

.weather-chart-axis {
    position: relative;
    height: 18px;
    pointer-events: none;
}

.weather-chart-axis-tick {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-size: 10px;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--text-secondary);
}
.weather-chart::-webkit-scrollbar {
    display: none;
}

.weather-chart-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    font-size: 0.74rem;
    color: var(--text-secondary);
}

.weather-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.weather-legend-line {
    display: inline-block;
    width: 14px;
    height: 3px;
    border-radius: 1px;
}

.weather-legend-dashed {
    border-top: 2.5px dotted var(--text-secondary);
    background: transparent !important;
}

.weather-chart-tooltip {
    position: absolute;
    display: none;
    background: var(--weather-card-bg);
    border: 1px solid var(--weather-border);
    border-radius: 6px;
    padding: 6px 8px;
    font-size: 0.78rem;
    pointer-events: none;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.weather-week-heading {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.weather-week-hint {
    font-size: 0.74rem;
    font-weight: 400;
    opacity: 0.75;
}

.weather-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 18px;
}

.weather-day-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 10px 4px;
    background: var(--weather-card-bg);
    border: 1px solid var(--weather-border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    min-width: 0;
}

.weather-day-card:hover {
    background: var(--bg-hover, color-mix(in srgb, var(--text-primary) 8%, transparent));
    border-color: var(--text-secondary);
}

.weather-day-card-active {
    background: var(--slot-inset-bg, var(--weather-card-bg)) !important;
    border-color: var(--primary, #4285f4) !important;
    box-shadow: 0 0 0 1px var(--primary, #4285f4);
}

.weather-day-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.weather-day-card-active .weather-day-name {
    color: var(--primary, #4285f4);
}

.weather-day-ico {
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.weather-day-temps {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.8rem;
    font-weight: 500;
}

.weather-day-hi {
    color: var(--text-primary);
}

.weather-day-lo {
    color: var(--text-secondary);
    font-size: 0.74rem;
}

.weather-details-label {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.weather-now-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.weather-now-item {
    background: var(--weather-card-bg);
    border: 1px solid var(--weather-border);
    border-radius: 10px;
    padding: 8px 10px;
    min-width: 0;
}

.weather-now-label {
    font-size: 0.74rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
}

.weather-value {
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.weather-detail-sub {
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-left: 2px;
}

.weather-astro {
    margin-bottom: 0;
}

.weather-astro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.weather-astro-col {
    background: var(--weather-card-bg);
    border: 1px solid var(--weather-border);
    border-radius: 14px;
    padding: 10px 10px 8px;
    display: flex;
    flex-direction: column;
    overflow: visible;
}

.weather-astro-col-head {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.weather-astro-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.weather-astro-ico-sun {
    color: #f59e0b;
}

.weather-astro-ico-moon {
    color: var(--text-secondary, #80868b);
}

html[data-theme="dark"] .weather-astro-ico-moon {
    color: var(--text-secondary, #bdc1c6);
}

.weather-astro-phase {
    margin-left: auto;
    font-size: 0.72rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-align: right;
}

.weather-astro-phase-illum {
    opacity: 0.75;
    margin-left: 2px;
}

.weather-astro-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: end;
    gap: 4px 8px;
    position: relative;
    padding-bottom: 0;
}

.weather-astro-endpoint {
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-bottom: 2px;
}

.weather-astro-endpoint-right {
    text-align: right;
    align-items: flex-end;
}

.weather-astro-ep-label {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.weather-astro-ep-time {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--text-primary);
}

.weather-astro-relative {
    font-size: 0.68rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.weather-astro-track {
    grid-column: 2;
    width: 100%;
    min-width: 0;
    height: 48px;
    justify-self: stretch;
    position: relative;
    margin: 0 2px;
    overflow: visible;
}

.weather-astro-arc {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    pointer-events: none;
}

.weather-astro-arc-bg {
    stroke: color-mix(in srgb, var(--text-secondary) 32%, transparent);
    stroke-dasharray: 3 3;
    stroke-linecap: round;
}

.weather-astro-arc-fill {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease-out;
}

.weather-sun-arc-fill {
    stroke: color-mix(in srgb, #f59e0b 65%, transparent);
}

.weather-sun-track[data-sun-state="set"] .weather-sun-arc-fill {
    opacity: 0.42;
}

.weather-moon-arc-fill {
    stroke: color-mix(in srgb, var(--text-primary) 55%, transparent);
}

.weather-sun-dot,
.weather-moon-dot {
    position: absolute;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    top: 0;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 6px currentColor;
    transition:
        left 0.5s ease-out,
        top 0.5s ease-out,
        opacity 0.2s ease-out;
    z-index: 2;
}

.weather-sun-dot[hidden],
.weather-moon-dot[hidden] {
    display: none !important;
}

.weather-sun-dot {
    background: #f59e0b;
    color: #f59e0b;
}

.weather-moon-dot {
    background: #e5e7eb;
    color: #e5e7eb;
}

.weather-astro-apex {
    position: absolute;
    left: 50%;
    top: 1px;
    transform: translate(-50%, -52%);
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0 4px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--weather-card-bg) 88%, transparent);
    white-space: nowrap;
    font-size: 0.68rem;
    line-height: 1.2;
    color: var(--text-secondary);
    opacity: 0.85;
    pointer-events: none;
    z-index: 1;
}

.weather-astro-apex[hidden] {
    display: none !important;
}

.weather-astro-apex-label {
    font-weight: 400;
    color: var(--text-secondary);
}

.weather-astro-apex-time {
    font-weight: 500;
    color: var(--text-primary);
}

.weather-footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    border-top: 1px dashed color-mix(in srgb, var(--text-secondary) 15%, transparent);
    padding-top: 6px;
    padding-bottom: 0;
    margin-top: 6px;
    margin-bottom: 0;
}

.weather-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    color: var(--primary, #4285f4);
    text-decoration: none;
}

.weather-footer a:hover {
    text-decoration: underline;
}

.weather-footer-sep {
    opacity: 0.6;
}

@container (max-width: 420px) {
    .weather-hero-meta {
        width: 100%;
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

@container (max-width: 580px) {
    .weather-hero {
        flex-direction: column;
        gap: 16px;
    }
    .weather-hero-right {
        text-align: left;
        align-items: flex-start;
        margin-left: 0;
        width: 100%;
    }
    .weather-hero-left {
        width: 100%;
    }
    .weather-days {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }
    .weather-day-card:nth-child(n+5) {
        display: none;
    }
    .weather-now-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .weather-astro-grid {
        grid-template-columns: 1fr;
    }
}

.weather-result :where(button, input, select, a[href], [role="button"]):focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
