#results-layout:has(#engine-stats) #sidebar-col {
  display: none;
}

#results-layout:has(#engine-stats) #results-main {
  max-width: none;
}

.es-command {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.5rem 0 2rem;
}

.es-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.es-heading {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.es-logo {
  color: var(--primary);
  font-size: 1.5rem;
}

.es-heading-text {
  display: flex;
  flex-direction: column;
}

.es-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.es-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.es-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.es-tabs {
  display: flex;
  gap: 0.25rem;
}

.es-tab {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.es-tab:hover {
  background: var(--bg-hover);
}

.es-tab--on {
  background: var(--primary);
  color: var(--white);
}


.es-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.es-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--bg-light);
}

.es-card-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.es-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.es-table-wrap {
  overflow-x: auto;
}

.es-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.es-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.es-table td {
  padding: 0.55rem 0.6rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.es-row:hover td {
  background: var(--bg-hover);
}

.es-num {
  font-variant-numeric: tabular-nums;
}

.es-engine {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.es-name {
  font-weight: 500;
}

.es-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-secondary);
}

.es-dot--healthy {
  background: var(--success);
}

.es-dot--shaky {
  background: var(--warning, #d98324);
}

.es-dot--down {
  background: var(--danger);
}

.es-row--down .es-fail,
.es-error {
  color: var(--danger);
}

.es-row--shaky .es-fail {
  color: var(--warning, #d98324);
}

.es-chips {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.es-chip {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.es-muted {
  color: var(--text-secondary);
}

.es-empty,
.es-foot {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

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

/* ── Timer & Stopwatch Plugin ────────────────────────────────────────────── */

.timer-widget {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  max-width: 704px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  user-select: none;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

.timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 10px;
  border-bottom: 1px solid var(--border);
}

.timer-tabs {
  display: flex;
  gap: 4px;
}

.timer-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px;
  border-radius: 20px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.timer-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.timer-tab--active {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.timer-tab--active svg {
  color: var(--text-link);
}

.timer-header-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.timer-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition:
    background 0.15s,
    color 0.15s;
}

.timer-icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.timer-icon-btn[aria-pressed="true"] {
  color: var(--text-link);
}

/* ── Body / Circle ───────────────────────────────────────────────────────── */

.timer-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px 20px;
}

.timer-circle-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
}

.timer-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 200px;
  height: 200px;
}

.timer-track {
  stroke: var(--border-light);
}

.timer-progress {
  stroke: var(--text-link);
  /* circumference = 2π × 54 ≈ 339.29 */
  stroke-dasharray: 339.29;
  stroke-dashoffset: 0;
  transform: rotate(-90deg);
  transform-origin: 60px 60px;
  transition: stroke-dashoffset 0.85s linear;
}

.timer-progress--instant {
  transition: none;
}

.timer-display-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-display {
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  cursor: pointer;
  line-height: 1;
}

.timer-display:hover {
  opacity: 0.8;
}

/* Stopwatch mode: display is not editable */
.timer-widget[data-mode="stopwatch"] .timer-display {
  cursor: default;
}

.timer-widget[data-mode="stopwatch"] .timer-display:hover {
  opacity: 1;
}

.timer-display-input {
  font-size: 2rem;
  font-weight: 600;
  width: 120px;
  text-align: center;
  background: none;
  border: none;
  border-bottom: 2px solid var(--text-link);
  color: var(--text-primary);
  outline: none;
  padding: 0 4px;
  line-height: 1;
  font-family: inherit;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.timer-footer {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
}

.timer-action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--text-primary);
  cursor: pointer;
  transition: background 0.15s;
  font-size: 1rem;
}

.timer-action-btn:hover {
  background: var(--bg-hover);
}

.timer-action-btn:active {
  background: var(--border);
}

.timer-action-btn + .timer-action-btn {
  border-left: 1px solid var(--border);
}

/* ── Fullscreen ──────────────────────────────────────────────────────────── */

.timer-widget--fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw !important;
  max-width: 100vw !important;
  height: 100vh;
  border-radius: 0;
  border: none;
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.timer-widget--fullscreen .timer-header {
  width: 100%;
  max-width: 560px;
}

.timer-widget--fullscreen .timer-body {
  flex: 1;
  padding: 0;
}

.timer-widget--fullscreen .timer-circle-wrap {
  width: min(60vh, 60vw);
  height: min(60vh, 60vw);
}

.timer-widget--fullscreen .timer-svg {
  width: min(60vh, 60vw);
  height: min(60vh, 60vw);
}

.timer-widget--fullscreen .timer-display {
  font-size: clamp(2rem, 8vw, 5rem);
}

.timer-widget--fullscreen .timer-footer {
  width: 100%;
  max-width: 560px;
  border-radius: 0 0 14px 14px;
  border: 1px solid var(--border);
  border-top: 1px solid var(--border);
  overflow: hidden;
}

/* ── Calculator Plugin ─────────────────────────────────────────────────────── */

.calc-widget {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
  max-width: 704px;
  padding: 0 0 4px 0;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  user-select: none;
  overflow: hidden;
}

/* Display */
.calc-display {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 14px 16px 10px 16px;
  min-height: 72px;
  gap: 8px;
  border: 1px solid var(--border-light);
  border-radius: 13px;
}

.calc-history-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 6px;
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 2px;
  line-height: 0;
  transition:
    color 0.15s,
    background 0.15s;
}

.calc-history-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.calc-display-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.calc-expr {
  font-size: 1rem;
  color: var(--text-secondary);
  text-align: right;
  word-break: break-all;
  min-height: 1.4em;
  max-height: 3em;
  overflow: hidden;
  line-height: 1.4;
}

.calc-result {
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--text-primary);
  text-align: right;
  line-height: 1.1;
  word-break: break-all;
}

.calc-result--small {
  font-size: 1.6rem;
}

.calc-result--error {
  font-size: 1.4rem;
  color: var(--text-secondary);
}

/* History Panel */
.calc-history-panel {
  padding: 6px 0;
  max-height: 160px;
  overflow-y: auto;
}

.calc-history-empty {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 12px 16px;
}

.calc-history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 16px;
  cursor: pointer;
  transition: background 0.12s;
  gap: 12px;
}

.calc-history-item:hover {
  background: var(--border-light);
}

.calc-history-expr {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calc-history-val {
  font-size: 0.9rem;
  color: var(--text-primary);
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Grid */
.calc-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0.5rem;
  border: 1px solid var(--border-light);
  background-color: var(--bg-light);
  border-radius: 13px;
}

.calc-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* Buttons */
.calc-btn {
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 400;
  height: 42px;
  padding: 0 4px;
  transition:
    background 0.12s,
    filter 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1;
}

button.calc-btn {
  border-radius: 13px;
}

.button-group button.calc-btn:first-child {
  border-radius: 13px 0 0 13px;
}
.button-group button.calc-btn:last-child {
  border-radius: 0 13px 13px 0;
}

.calc-row .button-group {
  grid-column: span 2;
}

.calc-btn sup {
  font-size: 0.6em;
  line-height: 1;
}

.calc-btn--digit {
  background: var(--bg-hover, var(--border-light));
  color: var(--text-primary);
}

.calc-btn--digit:hover {
  filter: brightness(1.15);
}

.calc-btn--digit:active {
  filter: brightness(0.9);
}

.calc-btn--sci {
  background: transparent;
  color: var(--text-secondary);
}

.calc-btn--sci:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.calc-btn--sci:active {
  filter: brightness(0.85);
}

.calc-btn--op {
  background: transparent;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.calc-btn--op:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.calc-btn--op:active {
  filter: brightness(0.85);
}

.calc-btn--clear {
  background: transparent;
  color: var(--text-secondary);
  font-weight: 500;
}

.calc-btn--clear:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.calc-btn--equals {
  background: var(--text-link);
  color: #202124;
  font-size: 1.1rem;
  font-weight: 500;
}

.calc-btn--equals:hover {
  background: var(--text-link-hover);
}

.calc-btn--equals:active {
  background: var(--text-link-active);
}

/* Deg/Rad toggle */
.calc-btn--toggle {
  background: transparent;
  color: var(--text-secondary);
  border-radius: 32px;
  font-size: 0.82rem;
}

.calc-btn--toggle.calc-btn--active {
  background: var(--bg-hover);
  color: var(--text-primary);
  font-weight: 500;
}

.calc-btn--toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* Inv active */
.calc-btn--inv {
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.82rem;
}

.calc-btn--inv:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.calc-btn--inv.calc-btn--active {
  background: var(--bg-hover);
  color: var(--text-primary);
  font-weight: 500;
}

/* Footer */
.calc-footer {
  text-align: center;
  padding: 6px 0 2px;
}

.calc-footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 4px;
  transition: color 0.15s;
}

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

.currency-widget {
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
  max-width: 704px;
  color: var(--text-primary);
  padding: 0 0 8px 0;
}

.currency-header {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 2px;
  line-height: 1.4;
}

.currency-result {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 4px;
  letter-spacing: -0.01em;
}

.currency-meta {
  font-size: 0.72rem;
  color: var(--text-secondary);
  opacity: 0.75;
  margin-bottom: 18px;
}

.currency-inputs {
  border: 1px solid var(--border-light);
  border-radius: 12px;
  overflow: hidden;
}

.currency-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  gap: 12px;
}

.currency-from-input,
.currency-to-input {
  flex: 1;
  min-width: 0;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-primary);
  background: transparent;
  border: none;
  outline: none;
  padding: 0;
  -moz-appearance: textfield;
}

.currency-from-input::-webkit-outer-spin-button,
.currency-from-input::-webkit-inner-spin-button,
.currency-to-input::-webkit-outer-spin-button,
.currency-to-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.currency-select-wrap {
  position: relative;
  flex-shrink: 0;
}

.currency-select-wrap::after {
  content: "▾";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1;
}

.currency-from-select,
.currency-to-select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--bg-hover, rgba(128, 128, 128, 0.08));
  border: 1px solid var(--border-light);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  padding: 5px 26px 5px 9px;
  cursor: pointer;
  outline: none;
  max-width: 210px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: inherit;
}

.currency-from-select:hover,
.currency-to-select:hover {
  border-color: var(--text-secondary);
}

.currency-loading .currency-from-select,
.currency-loading .currency-to-select {
  opacity: 0.5;
  pointer-events: none;
}

.currency-loading .currency-to-input {
  opacity: 0.4;
}

.currency-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0;
}

.dict-card {
  max-width: 704px;
  color: var(--text-primary);
  padding: 0 0 8px 0;
  font-family:
    system-ui,
    -apple-system,
    sans-serif;
}

.dict-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 14px;
}

.dict-word {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.dict-phonetic {
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-family: ui-monospace, monospace;
  opacity: 0.85;
}

/* Entry groups */

.dict-entry-group {
  margin-bottom: 14px;
}

.dict-entry-group:last-of-type {
  margin-bottom: 8px;
}

.dict-pos {
  font-size: 0.82rem;
  font-style: italic;
  color: var(--link-color, #4a90e2);
  margin-bottom: 6px;
}

/* Definitions list */

.dict-definitions {
  margin: 0 0 8px 0;
  padding-left: 1.3rem;
}

.dict-definitions li {
  margin-bottom: 6px;
  line-height: 1.5;
}

.dict-definition {
  color: var(--text-primary);
  font-size: 0.95rem;
}

.dict-tag {
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--bg-hover, rgba(128, 128, 128, 0.1));
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

.dict-example {
  font-size: 0.88rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-top: 3px;
  margin-left: 0;
  line-height: 1.45;
}

/* Synonyms */

.dict-synonyms {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}

.dict-syn-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.dict-syn-chip {
  font-size: 0.8rem;
  color: var(--text-secondary);
  background: var(--bg-hover, rgba(128, 128, 128, 0.1));
  border: 1px solid var(--border-light, rgba(128, 128, 128, 0.2));
  border-radius: 20px;
  padding: 2px 10px;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
}

.dict-syn-chip:hover {
  background: var(--bg-active, rgba(128, 128, 128, 0.2));
  color: var(--text-primary);
}

/* Divider between groups */

.dict-entry-group + .dict-entry-group {
  border-top: 1px solid var(--border-light, rgba(128, 128, 128, 0.15));
  padding-top: 12px;
}

/* Hidden extra groups */

.dict-extra {
  display: none;
}

/* Show-more button */

.dict-more-btn {
  display: block;
  width: 100%;
  max-width: 704px;
  margin-top: 10px;
  padding: 8px 16px;
  background: var(--bg-hover, rgba(128, 128, 128, 0.08));
  border: 1px solid var(--border-light, rgba(128, 128, 128, 0.2));
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s ease;
}

.dict-more-btn:hover {
  background: var(--bg-active, rgba(128, 128, 128, 0.16));
}

.dict-more-arrow {
  font-size: 0.7rem;
  vertical-align: middle;
  display: inline-block;
  transition: transform 0.2s ease;
}

.dict-more-btn[aria-expanded="true"] .dict-more-arrow {
  transform: rotate(180deg);
}

/* Footer attribution */

.dict-footer {
  margin-top: 10px;
}

.dict-source-link {
  font-size: 0.72rem;
  color: var(--text-secondary);
  opacity: 0.65;
  text-decoration: none;
}

.dict-source-link:hover {
  opacity: 1;
  text-decoration: underline;
}

.math-widget {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg-light);
  max-width: 652px;
  color: var(--text-primary);
}

.math-header {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

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

.math-query {
  font-size: 1.1rem;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.math-equals {
  font-size: 0.9rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

.math-result {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.math-calc {
  font-family: system-ui, -apple-system, sans-serif;
  max-width: 652px;
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.math-calc-screen {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.math-calc-expr {
  width: 100%;
  background: var(--bg-light);
  color: var(--text-primary);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.4rem;
  font-weight: 600;
  padding: 0.6rem 0.75rem;
  border: 0;
  border-radius: 12px;
  outline: none;
}

.math-calc-result {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  min-height: 1.6rem;
  padding: 0 0.75rem;
}

.math-calc-keys {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.math-calc-row {
  display: flex;
  gap: 0.4rem;
}

.math-calc-key {
  flex: 1;
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: var(--bg-light);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1.05rem;
  padding: 0.7rem 0;
  cursor: pointer;
  transition: background 0.15s;
}

.math-calc-key:hover {
  background: var(--bg-hover);
}

.math-calc-fn {
  color: var(--text-secondary);
}

.math-calc-eq {
  background: var(--brand-blue);
  color: #fff;
}

.math-calc-eq:hover {
  background: var(--brand-blue);
  opacity: 0.92;
}

.imdb-result {
  padding: 0;
  max-width: 652px;
  color: var(--text-primary);
}

.imdb-hero {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
}

.imdb-poster {
  flex-shrink: 0;
  width: 100px;
  height: 150px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-light);
}

.imdb-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.imdb-hero-text {
  flex: 1;
  min-width: 0;
}

.imdb-meta {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.imdb-title {
  margin: 0 0 0.35rem;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

.imdb-title-link {
  color: inherit;
  text-decoration: none;
}

.imdb-title-link:hover .imdb-title,
.imdb-title-link:hover .imdb-filmography-title {
  text-decoration: underline;
}

a.imdb-cast-card {
  color: inherit;
  text-decoration: none;
}

a.imdb-cast-card:hover .imdb-cast-name {
  text-decoration: underline;
}

.imdb-hero-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.35rem;
}

.imdb-hero-meta .imdb-rated + .imdb-released::before {
  content: " · ";
  color: var(--text-secondary);
}

.imdb-ratings {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}

.imdb-plot {
  margin: 0 0 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-primary);
}

.imdb-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 1.5rem;
  margin-bottom: 1.5rem;
}

.imdb-grid-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.8125rem;
}

.imdb-grid-label {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.imdb-grid-value {
  color: var(--text-primary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
}

.imdb-cast-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
}

.imdb-cast-strip {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  padding: 0 0.25rem 0 0;
}

.imdb-cast-scroll {
  scrollbar-width: none;
}

.imdb-cast-scroll::-webkit-scrollbar {
  display: none;
}

.imdb-cast-card {
  flex: 0 0 auto;
  width: 5.5rem;
  padding: 0;
  background: var(--bg-light);
  border-radius: 8px;
  overflow: hidden;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.imdb-cast-photo-wrap {
  width: 100%;
  aspect-ratio: 1;
  background: var(--border-light);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.imdb-cast-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.imdb-cast-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg-light);
}

.imdb-cast-card .imdb-cast-name {
  padding: 0.4rem 0.35rem 0.15rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-primary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.imdb-cast-character {
  padding: 0 0.35rem 0.4rem;
  font-size: 0.65rem;
  color: var(--text-secondary);
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.imdb-link {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--primary, #1a73e8);
  text-decoration: none;
}

.imdb-link:hover {
  text-decoration: underline;
}

.imdb-hero--compact {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}

.imdb-hero--compact .imdb-poster {
  width: 80px;
  height: 120px;
}

.imdb-filmography-title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.imdb-section-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.imdb-filmography-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  margin: 0 0 1rem;
}


.imdb-filmography-scroll::-webkit-scrollbar {
  display: none;
}

.imdb-filmography-strip {
  display: flex;
  gap: 0.75rem;
  width: max-content;
  padding: 0 0.25rem 0 0;
}

.imdb-filmography-scroll::-webkit-scrollbar {
  height: 6px;
}

.imdb-filmography-scroll::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  opacity: 0.3;
  border-radius: 3px;
}

.imdb-movie-card {
  flex: 0 0 auto;
  width: 7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.15s ease;
}

.imdb-movie-card:hover {
  transform: scale(1.02);
}

.imdb-movie-poster {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-light);
  margin-bottom: 0.35rem;
}

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

.imdb-movie-poster-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.imdb-movie-title {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.2;
  display: -webkit-box;
  line-clamp: 2;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.imdb-movie-year {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

@media (min-width: 480px) {
  .imdb-meta-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 640px) {
  .imdb-meta-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tmdb-tabs {
  position: relative;
}

.tmdb-tab-bar {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 1px;
}

.tmdb-tab-bar::-webkit-scrollbar {
  display: none;
}

.tmdb-tab-btn {
  all: unset;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0.5rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
  margin-bottom: -1px;
}

.tmdb-tab-btn:hover {
  color: var(--text-primary);
}

.tmdb-tab-btn--active {
  color: var(--text-primary);
  border-bottom-color: var(--primary, #1a73e8);
}

.tmdb-accordion {
  border-radius: 8px;
  margin-bottom: 0.5rem;
  overflow: hidden;
}

.tmdb-accordion .tmdb-accordion {
  border-radius: 6px;
  margin: 0.35rem 0;
}

.tmdb-accordion-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.tmdb-accordion-summary::-webkit-details-marker {
  display: none;
}

.tmdb-accordion-summary::before {
  content: "";
  flex-shrink: 0;
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--text-secondary);
  border-bottom: 2px solid var(--text-secondary);
  transform: rotate(-45deg);
  transition: transform 0.15s ease;
}

.tmdb-accordion[open] > .tmdb-accordion-summary::before {
  transform: rotate(45deg);
}

.tmdb-accordion-meta {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--text-secondary);
}

.tmdb-accordion-body {
  padding: 0 0 0.75rem;
  max-height: 20rem;
  overflow-y: auto;
  scrollbar-width: thin;
}

.tmdb-season-detail {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.tmdb-season-poster {
  flex-shrink: 0;
  width: 52px;
  border-radius: 6px;
  object-fit: cover;
}

.tmdb-season-info {
  flex: 1;
  min-width: 0;
}

.tmdb-season-overview {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-primary);
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tmdb-season-link {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--primary, #1a73e8);
  text-decoration: none;
}

.tmdb-season-link:hover {
  text-decoration: underline;
}

.gh-slot-result {
  padding: 0;
  max-width: 100%;
  width: 100%;
  color: var(--text-primary);
  min-width: 0;
}

.gh-slot-wrap {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.gh-slot-section {
  margin-bottom: 0;
  min-width: 0;
}

.gh-slot-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.gh-slot-grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  min-width: 0;
}

.gh-slot-grid::-webkit-scrollbar {
  /* The global theme rule (src/styles/style.scss) only sets `width`, which
     affects vertical scrollbars. Set the height here so the horizontal bar
     of this grid matches (0.5rem). Ideally this moves into the theme so all
     horizontal scrollbars are consistent site-wide. */
  height: 0.5rem;
}

.gh-slot-grid::-webkit-scrollbar-track {
  background: var(--bg-hover);
  border-radius: 3px;
}

.gh-slot-grid::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  opacity: 0.4;
  border-radius: 3px;
}

.gh-slot-card {
  display: block;
  padding: 1rem;
  background: var(--bg-light);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  flex: 0 0 auto;
  min-width: 220px;
  max-width: 280px;
  transition: background 0.15s ease;
}

.results-slot-panel-body a:hover {
  text-decoration: none;
}

.gh-slot-card {
  background: var(--bg-hover);
}

.gh-slot-avatar {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gh-slot-avatar--user {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
}

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

.gh-slot-avatar-placeholder {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.gh-slot-repo-head,
.gh-slot-user-head {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.gh-slot-repo-meta,
.gh-slot-user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.gh-slot-repo-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--primary, #0969da);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gh-slot-repo-lang {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gh-slot-stars {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
}

.gh-slot-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gh-slot-user-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
}

.gh-slot-user-login {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.gh-slot-user-stats {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

#results-layout:has(#engine-stats) #sidebar-col {
  display: none;
}

#results-layout:has(#engine-stats) #results-main {
  max-width: none;
}

.es-command {
  width: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0.5rem 0 2rem;
}

.es-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.es-heading {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.es-logo {
  color: var(--primary);
  font-size: 1.5rem;
}

.es-heading-text {
  display: flex;
  flex-direction: column;
}

.es-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
}

.es-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.es-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.es-tabs {
  display: flex;
  gap: 0.25rem;
}

.es-tab {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
}

.es-tab:hover {
  background: var(--bg-hover);
}

.es-tab--on {
  background: var(--primary);
  color: var(--white);
}


.es-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem;
}

.es-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: var(--bg-light);
}

.es-card-value {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.es-card-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.es-table-wrap {
  overflow-x: auto;
}

.es-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.es-table th {
  text-align: left;
  padding: 0.5rem 0.6rem;
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.es-table td {
  padding: 0.55rem 0.6rem;
  color: var(--text-primary);
  white-space: nowrap;
}

.es-row:hover td {
  background: var(--bg-hover);
}

.es-num {
  font-variant-numeric: tabular-nums;
}

.es-engine {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.es-name {
  font-weight: 500;
}

.es-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--text-secondary);
}

.es-dot--healthy {
  background: var(--success);
}

.es-dot--shaky {
  background: var(--warning, #d98324);
}

.es-dot--down {
  background: var(--danger);
}

.es-row--down .es-fail,
.es-error {
  color: var(--danger);
}

.es-row--shaky .es-fail {
  color: var(--warning, #d98324);
}

.es-chips {
  display: inline-flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.es-chip {
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-light);
  color: var(--text-secondary);
  font-size: 0.72rem;
}

.es-muted {
  color: var(--text-secondary);
}

.es-empty,
.es-foot {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.degoog-search-bar.voice-search-listening {
  border-radius: var(--degoog-search-bar-radius, 1.5rem)
    var(--degoog-search-bar-radius, 1.5rem) 0 0;
}

.voice-search-panel {
  position: absolute;
  top: 100%;
  left: -1px;
  right: -1px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.5rem calc(0.75rem + 1px) 0.75rem;
  border-radius: 0 0 var(--degoog-search-bar-radius, 1.5rem)
    var(--degoog-search-bar-radius, 1.5rem);
  background: var(--search-bar-bg);
  color: var(--text-primary);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  transform-origin: top center;
  animation: voice-search-open 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}

.voice-search-panel--closing {
  animation: voice-search-close 0.2s ease forwards;
  pointer-events: none;
}

.voice-search-wave {
  display: block;
  width: 100%;
  height: 4rem;
}

.voice-search-transcript {
  min-height: 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  text-align: center;
  overflow-wrap: anywhere;
}

.voice-search-heard + .voice-search-interim:not(:empty)::before {
  content: " ";
}

.voice-search-interim {
  color: var(--text-secondary);
}

.voice-search-interim--idle {
  animation: voice-search-breathe 1.6s ease-in-out infinite;
}

.voice-search-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.voice-search-hint strong {
  color: var(--brand-blue);
  font-weight: inherit;
}

.voice-search-stop,
.voice-search-command-start {
  flex-shrink: 0;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  border-radius: 0.25rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  font-size: 0.8125rem;
  height: 1.75rem;
  padding: 0 0.75rem;
  cursor: pointer;
  transition: background 0.2s ease;
}

.voice-search-stop:hover,
.voice-search-command-start:hover {
  background: var(--bg-hover);
}

.voice-search-command-start {
  font-size: 0.875rem;
  height: 2.25rem;
  padding: 0 1rem;
}

.search-bar-action-btn.voice-search-active {
  color: var(--text-primary);
  animation: voice-search-pulse 1.4s ease-in-out infinite;
}

.voice-search-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  background: var(--bg-light);
  color: var(--text-primary);
  border-radius: 0.5rem;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  z-index: 1000;
  max-width: calc(100vw - 2rem);
}

.voice-search-command {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
  color: var(--text-secondary);
}

@keyframes voice-search-open {
  from {
    opacity: 0;
    transform: scaleY(0.6);
  }
}

@keyframes voice-search-close {
  to {
    opacity: 0;
    transform: scaleY(0.6);
  }
}

@keyframes voice-search-pulse {
  0%,
  100% {
    background: color-mix(in srgb, var(--brand-blue) 8%, transparent);
  }
  50% {
    background: color-mix(in srgb, var(--brand-blue) 22%, transparent);
  }
}

@keyframes voice-search-breathe {
  50% {
    opacity: 0.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .voice-search-panel,
  .voice-search-panel--closing,
  .voice-search-interim--idle,
  .search-bar-action-btn.voice-search-active {
    animation: none;
  }

  .search-bar-action-btn.voice-search-active {
    background: color-mix(in srgb, var(--brand-blue) 16%, transparent);
  }
}

.weather-result {
  padding: 1.5em 0;
  max-width: 652px;
  color: var(--text-primary);
}

.weather-result .ti {
  font-size: 1.25em;
  opacity: 0.9;
  color: var(--text-primary);
}

.weather-location {
  margin: 0 0 1rem;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.weather-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.weather-hero-icon {
  flex-shrink: 0;
  width: 4rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: 12px;
  border: 1px solid var(--border-light);
}

.weather-hero-icon .ti {
  font-size: 2.5rem;
  color: var(--primary, #1a73e8);
}

.weather-hero-text {
  min-width: 0;
}

.weather-temp {
  font-size: 2rem;
  margin: 0 0 0.2rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.weather-desc {
  font-size: 0.9375rem;
  font-weight: 400;
  opacity: 0.85;
  color: var(--text-secondary);
}

.weather-feels {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.weather-now-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem 1rem;
  margin-bottom: 1.5rem;
}

.weather-now-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
}

.weather-now-icon {
  flex-shrink: 0;
  font-size: 1.1rem !important;
  opacity: 0.7;
  color: var(--text-secondary) !important;
}

.weather-value {
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-week-heading {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.weather-week-hint {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.8;
}

.weather-week-wrap {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-light);
  overflow: hidden;
}

.weather-week {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.weather-week th,
.weather-week td {
  text-align: left;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border-light);
}

.weather-week th {
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.7rem;
}

.weather-week tbody tr:last-child td {
  border-bottom: none;
}

.weather-week-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.weather-week-row:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.04));
}

.weather-week-row:focus {
  outline: 2px solid var(--primary, #1a73e8);
  outline-offset: -2px;
}

.weather-day {
  font-weight: 600;
  color: var(--text-primary);
  width: 3.5rem;
}

.weather-day-icon .ti {
  font-size: 1.35rem !important;
  color: var(--primary, #1a73e8) !important;
}

.weather-day-temps {
  font-weight: 500;
  color: var(--text-primary);
}

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

.weather-day-precip .ti {
  font-size: 0.9rem !important;
  opacity: 0.8;
  margin-right: 0.2rem;
}

.weather-hourly-row td {
  padding: 0 !important;
  border-bottom: 1px solid var(--border-light);
  vertical-align: top;
  background: var(--bg-light);
}

.weather-hourly-cell {
  padding: 0.75rem 1rem !important;
  overflow: hidden;
}

.weather-hourly-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0.25rem 0;
  margin: 0 -0.25rem 0 0;
}

.weather-hourly-strip {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  padding: 0 0.25rem 0 0;
}

.weather-hourly-scroll::-webkit-scrollbar {
  height: 6px;
}

.weather-hourly-scroll::-webkit-scrollbar-track {
  background: var(--border-light);
  border-radius: 3px;
}

.weather-hourly-scroll::-webkit-scrollbar-thumb {
  background: var(--text-secondary);
  opacity: 0.3;
  border-radius: 3px;
}

.weather-hour-card {
  flex: 0 0 auto;
  min-width: 4.25rem;
  padding: 0.6rem 0.5rem;
  background: var(--search-bar-bg, #fff);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.weather-hour-time {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.weather-hour-icon {
  font-size: 1.5rem !important;
  color: var(--primary, #1a73e8) !important;
}

.weather-hour-temp {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.weather-hour-precip {
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.custom-logo-img {
  display: block;
  max-height: 300px;
  max-width: 500px;
  width: auto;
  object-fit: contain;
}

.custom-logo-img--search {
  max-width: 300px;
}

.custom-logo-upload-ui {
  padding: 12px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.custom-logo-preview-wrap {
  display: flex;
  align-items: center;
  min-height: 60px;
}

.custom-logo-preview {
  max-height: 300px;
  max-width: 500px;
  object-fit: contain;
  border-radius: 6px;
  border: 1px solid var(--border-light, rgba(255,255,255,0.1));
  background: var(--bg-tertiary, rgba(0,0,0,0.2));
  padding: 4px 8px;
}

.custom-logo-none {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-style: italic;
}

.custom-logo-actions {
  display: flex;
  gap: 8px;
}

.custom-logo-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border-light, rgba(255,255,255,0.15));
  background: var(--bg-secondary, #1e1e2e);
  color: var(--text-primary, #cdd6f4);
  transition: background 0.15s;
  user-select: none;
}

.custom-logo-btn:hover {
  background: var(--primary-light, rgba(139,92,246,0.15));
}

.custom-logo-btn--remove {
  color: var(--danger, #f38ba8);
  border-color: var(--danger-light, rgba(243,139,168,0.25));
}

.custom-logo-btn--remove:hover {
  background: rgba(243,139,168,0.12);
}

.custom-logo-status {
  font-size: 0.78rem;
  color: var(--text-secondary);
  margin: 0;
  min-height: 1em;
}


.custom-logo-gallery {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.custom-logo-gallery-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
}
.custom-logo-gallery-thumb {
  width: 72px;
  height: 48px;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 4px;
  flex: 0 0 auto;
}
.custom-logo-gallery-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}
.custom-logo-gallery-name {
  font-size: 0.82rem;
  color: var(--text-primary, #cdd6f4);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}


#cl-interval-sec {
  background: var(--search-bar-bg);
  color: var(--text-primary, #cdd6f4);
  border: 1px solid var(--border-light, rgba(255,255,255,0.15));
  border-radius: 6px;
  padding: 6px 8px;
}

#cl-interval-sec:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.08);
}

.time-result .time-place {
  font-size: 1.25rem;
  margin: 0 0 0.25rem 0;
}

.time-time {
  font-size: 1.75rem;
  font-weight: 600;
  margin: 0.25rem 0;
}

.time-date {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.define-result .define-word {
  font-size: 1.5rem;
  margin: 0 0 0.25rem 0;
}

.define-phonetic {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0 0 0.75rem 0;
}

.define-meaning {
  margin-bottom: 1rem;
}

.define-pos {
  font-style: italic;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.define-list {
  margin: 0.25rem 0 0 1rem;
  padding-left: 0.5rem;
}

.define-example {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.image-search-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-light);
  font-size: 13px;
  color: var(--text-secondary);
  position: sticky;
  top: 8px;
  z-index: 5;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
}

.image-search-strip-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
}

.image-search-strip-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.image-search-strip-query {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 0 5px;
}

.image-search-strip-status {
  color: var(--text-cite);
  font-size: 12px;
}

.image-search-strip-bar {
  position: relative;
  height: 3px;
  margin-top: 4px;
  border-radius: 2px;
  background: var(--bg-hover);
  overflow: hidden;
}

.image-search-strip-bar[hidden] {
  display: none;
}

.image-search-strip-fill {
  display: block;
  height: 100%;
  width: 0;
  background: var(--brand-blue);
  transition: width 0.2s ease;
}

.image-search-strip-bar-busy .image-search-strip-fill {
  position: absolute;
  width: 35%;
  animation: image-search-sweep 1.1s ease-in-out infinite;
}

.image-search-strip-toggle {
  flex-shrink: 0;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
}

.image-search-command {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-start;
  color: var(--text-secondary);
}

.image-search-command-pick {
  background: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
}

@keyframes image-search-sweep {
  from {
    left: -35%;
  }
  to {
    left: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .image-search-strip-fill {
    animation: none;
    transition: none;
  }
}

.ac-item--history {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

.ac-item--history .ac-item-icon--clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
}

.ac-item--history .ac-item-icon--clock svg {
  width: 20px;
  height: 20px;
}

.ac-item--history .ac-item-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-item--history .ac-item-delete {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  opacity: 0.8;
}

.ac-item--history .ac-item-delete:hover {
  opacity: 1;
  background: var(--bg-hover);
  color: var(--danger);
}

.ac-item--history .ac-item-delete svg {
  width: 18px;
  height: 18px;
}

.search-history-result .result-favicon--clock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  color: var(--text-cite);
}

.search-history-result .result-favicon--clock svg {
  width: 22px;
  height: 22px;
}

.search-history-result .history-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  text-decoration: none;
}

.search-history-result .history-delete-btn:hover {
  color: var(--danger);
  background: var(--bg-hover);
}

.search-history-result .history-delete-btn svg {
  width: 18px;
  height: 18px;
}

