:root {
  --bg: #f5f1e8;
  --bg-soft: #fbf8f1;
  --card: #fffef9;
  --line: #e2dbc8;
  --ink: #123f3a;
  --muted: #5f7f79;
  --primary: #0f857b;
  --primary-dark: #0a6c64;
  --accent: #f3b85a;
  --ok: #0b8f61;
  --warn: #d98028;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #fbf8f2 0%, var(--bg) 55%, #efeadc 100%);
  color: var(--ink);
  font-family: "Noto Sans Thai", "Segoe UI", Tahoma, sans-serif;
}

body {
  display: flex;
  justify-content: center;
}

.app-shell {
  width: min(100vw, 430px);
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 1fr auto;
  background: linear-gradient(180deg, #f6f2e9 0%, #f8f4ec 48%, #f4efe4 100%);
}

.page-content {
  padding: 12px;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  min-width: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
  animation: cardIn 180ms ease;
  min-width: 0;
}

.hero-card {
  background:
    radial-gradient(circle at 20% 15%, rgba(255, 228, 184, 0.35), transparent 55%),
    linear-gradient(160deg, #fffdf7 0%, #f9f5ec 100%);
}

.me-identity-card {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.me-avatar {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #dff2ec;
  border: 1px solid #b9e2d7;
  color: #0c6f66;
  font-weight: 900;
  font-size: 17px;
}

.me-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.me-avatar img.is-hidden {
  display: none;
}

.me-avatar img:not(.is-hidden) + span {
  display: none;
}

.me-identity-copy {
  min-width: 0;
}

.me-identity-copy small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 3px;
}

.me-identity-copy strong {
  display: block;
  color: #174c46;
  font-size: 19px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.me-quick-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.me-quick-facts span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: #fff8eb;
  border: 1px solid #ead8b3;
  color: #7d5a1d;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.me-preferences-card {
  display: grid;
  gap: 8px;
}

.language-head {
  margin: 6px 0 0;
}

.language-head .label {
  margin: 0;
}

.language-row {
  margin-bottom: 4px;
}

.me-save-btn {
  width: 100%;
  min-height: 46px;
}

.me-fortune-card {
  display: grid;
  gap: 10px;
}

.me-fortune-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.me-fortune-color {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 58px;
  border: 1px solid #e0d8c4;
  border-radius: 8px;
  padding: 8px;
  background: #fffef9;
}

.me-fortune-color.good {
  border-color: #cfe8d8;
}

.me-fortune-color.avoid {
  border-color: #ead8b3;
}

.me-fortune-color small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.me-fortune-color strong {
  display: block;
  color: #174c46;
  font-size: 14px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.me-lucky-number-pill {
  justify-content: center;
  min-height: 40px;
  font-size: 14px;
}

.me-lucky-number-pill #meLuckyNumberText {
  font-size: 18px;
  font-weight: 900;
  color: #087d72;
}

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

.label {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}

.muted {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.strong {
  margin: 8px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.page-content.weather-mode {
  background:
    radial-gradient(circle at 20% 8%, rgba(255, 226, 166, 0.32), transparent 34%),
    linear-gradient(180deg, #f7f2e7 0%, #fbf8f1 46%, #f4efe4 100%);
}

.weather-hero {
  position: relative;
  border-radius: 8px;
  padding: 14px 12px 12px;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 14%, rgba(243, 184, 90, 0.26), transparent 36%),
    radial-gradient(circle at 18% 18%, rgba(15, 133, 123, 0.12), transparent 42%),
    linear-gradient(160deg, #fffdf7 0%, #f5f0e4 100%);
  border: 1px solid #e2dbc8;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02);
}

.weather-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.weather-province-field {
  min-width: 0;
}

.weather-province-label {
  margin-bottom: 0;
  color: #5f7f79;
}

.weather-province-select {
  min-height: 34px;
  border: 1px solid #d8d1be;
  background: #fffef9;
  color: #204945;
}

.weather-province-select option {
  color: #204945;
}

.weather-thai-date {
  align-self: start;
  max-width: 136px;
  margin-top: 1px;
  padding-right: 8px;
  padding-bottom: 4px;
  color: #5f7f79;
  font-size: 13px;
  line-height: 1.25;
  text-align: right;
  white-space: normal;
}

.weather-city {
  margin: 10px 0 2px;
  font-size: 45px;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0;
}

.weather-temp {
  margin: 2px 0;
  font-size: 90px;
  line-height: 0.95;
  font-weight: 200;
  letter-spacing: 0;
}

.weather-condition {
  margin: 4px 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0;
}

.weather-range {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
  color: #5b7671;
}

.weather-hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.weather-metric {
  min-height: 58px;
  border-radius: 8px;
  padding: 6px 7px;
  display: grid;
  align-content: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(226, 219, 200, 0.78);
  backdrop-filter: blur(5px);
}

.weather-metric small {
  font-size: 11px;
  line-height: 1.1;
  color: #5f7f79;
}

.weather-metric strong {
  font-size: 18px;
  line-height: 1;
  color: #174c46;
}

.weather-metric span {
  min-width: 0;
  font-size: 11px;
  line-height: 1.2;
  color: #5b7671;
  overflow-wrap: anywhere;
}

.weather-panel {
  background:
    linear-gradient(135deg, rgba(255, 253, 247, 0.98), rgba(239, 250, 245, 0.96)),
    var(--card);
  border: 1px solid #e2dbc8;
  color: var(--ink);
}

.weather-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #5f7f79;
}

.weather-panel-head small {
  font-size: 12px;
  color: inherit;
}

.weather-advice {
  margin: 0;
  font-size: 17px;
  line-height: 1.45;
  color: #214843;
}

.uv-panel {
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.98), rgba(239, 250, 245, 0.94)),
    var(--card);
}

.uv-care-row {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.uv-index-badge {
  min-height: 92px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  border: 1px solid #ead6aa;
  border-radius: 8px;
  background: #fffaf1;
  color: #9b5d11;
}

.uv-index-badge strong {
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
}

.uv-index-badge small,
.uv-index-badge span {
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
}

.uv-index-badge.uv-low {
  background: #edf8ee;
  border-color: #b8ddbd;
  color: #246234;
}

.uv-index-badge.uv-moderate {
  background: #fff7de;
  border-color: #ebd58e;
  color: #8a5a11;
}

.uv-index-badge.uv-high,
.uv-index-badge.uv-very_high,
.uv-index-badge.uv-extreme {
  background: #fff1e9;
  border-color: #efbf9e;
  color: #9a4217;
}

.uv-care-copy strong {
  display: block;
  color: #214843;
  font-size: 15px;
  line-height: 1.25;
}

.uv-care-copy p {
  margin: 4px 0 0;
  color: #4d716b;
  font-size: 12px;
  line-height: 1.45;
}

.uv-window {
  padding-left: 9px;
  border-left: 3px solid #ead6aa;
  color: #806124;
  font-weight: 700;
}

.air-panel {
  display: grid;
  gap: 10px;
}

.air-quality-row {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.pm25-gauge {
  --pm25-needle: -88deg;
  min-width: 0;
  display: grid;
  gap: 4px;
  justify-items: center;
  align-self: stretch;
}

.pm25-gauge-dial {
  width: 108px;
  height: 68px;
  position: relative;
  overflow: hidden;
  border-radius: 108px 108px 12px 12px;
  background:
    radial-gradient(circle at 50% 100%, #fffaf1 0 42%, transparent 43%),
    conic-gradient(from 270deg at 50% 100%,
      #2f9e66 0deg 36deg,
      #9fca55 36deg 72deg,
      #f1c44e 72deg 112deg,
      #e98246 112deg 150deg,
      #c94d42 150deg 180deg,
      transparent 180deg 360deg);
  border: 1px solid #d8d1be;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.pm25-gauge-dial::after {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 0;
  height: 36px;
  border-radius: 64px 64px 0 0;
  background: #fffaf1;
}

.pm25-needle {
  width: 43px;
  height: 3px;
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 2;
  transform-origin: 0 50%;
  transform: rotate(var(--pm25-needle));
  border-radius: 999px;
  background: #214843;
  box-shadow: 0 1px 3px rgba(25, 56, 50, 0.28);
}

.pm25-hub {
  width: 12px;
  height: 12px;
  position: absolute;
  left: calc(50% - 6px);
  bottom: 3px;
  z-index: 3;
  border: 2px solid #fffaf1;
  border-radius: 50%;
  background: #214843;
}

.pm25-gauge-value {
  position: absolute;
  left: 50%;
  bottom: 13px;
  z-index: 4;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  color: #174c46;
}

.pm25-gauge-value strong {
  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}

.pm25-gauge-value small {
  font-size: 9px;
  line-height: 1.1;
  font-weight: 800;
}

.pm25-gauge-scale {
  width: 100px;
  display: flex;
  justify-content: space-between;
  color: #6a817b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.air-score {
  width: fit-content;
  min-height: 0;
  padding: 4px 8px;
  border-radius: 999px;
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 4px;
  border: 1px solid #d8d1be;
  background: #fff9ec;
  color: #8a5a11;
}

.air-score span {
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
}

.air-score small {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
}

.air-score.air-good {
  background: #edf8ee;
  border-color: #b8ddbd;
  color: #246234;
}

.air-score.air-moderate {
  background: #fff7de;
  border-color: #ebd58e;
  color: #8a5a11;
}

.air-score.air-sensitive {
  background: #fff1e9;
  border-color: #efbf9e;
  color: #9a4217;
}

.air-copy strong {
  display: block;
  color: #214843;
  font-size: 16px;
  line-height: 1.25;
}

.air-copy p {
  margin: 3px 0 0;
  color: #4d716b;
  font-size: 12px;
  line-height: 1.45;
}

.pm25-reference {
  margin: 6px 0 0;
  padding-left: 9px;
  border-left: 3px solid #bad8ce;
  color: #5b7671;
  font-size: 11px;
  line-height: 1.4;
}

.gear-list {
  display: grid;
  gap: 7px;
}

.gear-item {
  min-height: 50px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #e7ddc8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.66);
}

.gear-item.on {
  border-color: #b9d9c8;
  background: rgba(239, 250, 245, 0.92);
}

.gear-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #fff3d5;
  color: #9b5d11;
  font-size: 18px;
  font-weight: 800;
}

.gear-item.on .gear-icon {
  background: #dff3eb;
  color: #0f6f66;
}

.gear-copy {
  min-width: 0;
}

.gear-copy strong {
  display: block;
  font-size: 13px;
  color: #214843;
}

.gear-copy small {
  display: block;
  margin-top: 2px;
  color: #5b7671;
  font-size: 11px;
  line-height: 1.35;
}

.gear-status {
  min-width: 54px;
  padding: 5px 7px;
  border-radius: 999px;
  background: #f4ead7;
  color: #806124;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.gear-item.on .gear-status {
  background: #0f857b;
  color: #fff;
}

.hourly-list {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(62px, 1fr);
  gap: 2px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.hourly-item {
  text-align: center;
  padding: 4px 2px;
}

.hourly-time {
  font-size: 13px;
  color: #5f7f79;
  font-weight: 700;
}

.hourly-icon {
  margin: 6px 0 5px;
  font-size: 24px;
}

.hourly-temp {
  font-size: 17px;
  font-weight: 700;
  color: #184f4a;
}

.daily-list {
  display: grid;
}

.daily-row {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(52px, 1fr) 52px 36px minmax(62px, 1fr) 36px;
  align-items: center;
  gap: 6px;
  border-top: 1px solid #e6deca;
}

.daily-row:first-child {
  border-top: 0;
}

.daily-day {
  font-size: 17px;
  font-weight: 700;
}

.daily-rain {
  text-align: center;
  font-size: 11px;
  color: #0f857b;
}

.daily-rain small {
  display: block;
  font-size: 11px;
  color: #0f857b;
  margin-top: 1px;
}

.daily-rain .daily-icon {
  display: block;
  font-size: 20px;
  line-height: 1;
  color: #0f857b;
}

.daily-min,
.daily-max {
  font-size: 16px;
  font-weight: 700;
}

.daily-min {
  color: #6b8682;
  text-align: right;
}

.daily-max {
  color: #184f4a;
}

.daily-bar {
  height: 6px;
  border-radius: 999px;
  background: #e3dcc9;
  position: relative;
}

.daily-bar span {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #f8b04c 0%, #ff8e2f 100%);
}

.daily-empty {
  padding: 10px 0;
  color: #6b8682;
}

input,
select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #d8d1be;
  border-radius: 8px;
  padding: 0 10px;
  background: #fff;
  color: #204945;
  font-size: 15px;
}

input:focus,
select:focus,
button:focus {
  outline: 2px solid #96d6cb;
  outline-offset: 1px;
}

.kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.kv-grid > div {
  border: 1px solid #e6dfcd;
  border-radius: 8px;
  background: #fffdf8;
  padding: 8px;
}

.kv-grid span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.kv-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 14px;
  color: #1a5650;
  letter-spacing: 0;
}

.prize-amount {
  display: block;
  margin-top: 3px;
  color: #6b8682;
  font-size: 11px;
  line-height: 1.3;
}

.lottery-next-card {
  background: linear-gradient(135deg, #fffdf7 0%, #eef8f4 100%);
}

.lottery-next-date {
  margin-top: 8px;
  color: #174c46;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0;
}

.kv-grid.compact strong {
  font-size: 13px;
}

.sticker-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.sticker {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid #ecdcb8;
  background: #fff;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.sticker.bounce {
  animation: bounceTiny 1.9s ease-in-out infinite;
}

.sticker.float {
  animation: bob 2.4s ease-in-out infinite;
}

.sticker.delay {
  animation-delay: 0.42s;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chip-btn {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid #d7cfbc;
  border-radius: 8px;
  background: #fff;
  color: #2f5752;
  font-weight: 700;
  font-size: 13px;
}

.chip-btn.active {
  background: #dff2ed;
  border-color: #abdacf;
  color: #0a6b62;
}

.spark-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  background: #fff8ea;
  border: 1px solid #f0ddb5;
  font-size: 13px;
  font-weight: 700;
  color: #7d5a19;
}

.calendar-empty {
  border: 1px dashed #d8d1be;
  border-radius: 8px;
  background: #fffdf7;
  padding: 10px;
  color: #5f7f79;
  font-size: 13px;
  line-height: 1.45;
}

.calendar-event-row {
  align-items: start;
}

.calendar-event-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.event-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border: 1px solid #d8eadf;
  border-radius: 8px;
  padding: 0 6px;
  background: #edf8f3;
  color: #0f766e;
  font-size: 11px;
  font-weight: 700;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
}

.tabs button {
  min-height: 33px;
  border: 1px solid #ddd5c4;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  color: #2c5954;
}

.tabs button.active {
  background: #dbf0ea;
  border-color: #a5d7cc;
  color: #0c6a62;
}

.fortune-summary {
  margin: 8px 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
  color: #214843;
}

.lucky-row {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.lucky-pill {
  min-height: 34px;
  border: 1px solid #ebddbf;
  border-radius: 8px;
  background: #fff8eb;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  font-size: 13px;
  color: #7d5a1d;
}

.color-guidance {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px 9px;
  border: 1px solid #e7ddc8;
  border-radius: 8px;
  background: #fffef9;
}

.color-guidance.good {
  border-color: #d6cba8;
  background: linear-gradient(135deg, #fff8eb, #fffef9);
}

.color-guidance.avoid {
  border-color: #e6c8bd;
  background: linear-gradient(135deg, #fff4ee, #fffef9);
}

.color-swatch {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(79, 74, 59, 0.16);
}

.color-guidance strong {
  display: block;
  color: #214843;
  font-size: 13px;
  line-height: 1.25;
}

.color-guidance p {
  margin: 3px 0 0;
  color: #4c6f69;
  font-size: 12px;
  line-height: 1.42;
}

.color-guidance small {
  display: block;
  margin-top: 3px;
  color: #7d5a1d;
  font-size: 11px;
  line-height: 1.35;
}

.local-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  border-color: #ead8b3;
  background:
    linear-gradient(135deg, rgba(255, 248, 232, 0.95), rgba(239, 250, 245, 0.96)),
    var(--card);
}

.local-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff3d5;
  border: 1px solid #eed69c;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  font-size: 19px;
}

.local-card-title {
  font-size: 13px;
  font-weight: 800;
  color: #9b5d11;
}

.local-card-text {
  margin: 3px 0 0;
  color: #315d57;
  font-size: 12px;
  line-height: 1.45;
}

.card-mini-title {
  font-size: 13px;
  font-weight: 700;
  color: #35645f;
  margin-bottom: 8px;
}

.list {
  display: grid;
  gap: 7px;
}

.list-row {
  border: 1px solid #e6deca;
  border-radius: 8px;
  background: #fffef9;
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
}

.list-row small {
  display: block;
  margin-top: 3px;
  color: #6b8682;
  font-size: 11px;
}

.list-row .value {
  font-weight: 700;
  color: #184f4a;
  font-size: 13px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.chip {
  min-height: 30px;
  border: 1px solid #ddd5c2;
  border-radius: 8px;
  background: #fff;
  padding: 5px 9px;
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #2f5a55;
}

.lottery-watch-hint {
  display: block;
  margin-top: 8px;
}

.lottery-watch-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.lottery-watch-empty {
  border: 1px solid #ddd5c2;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  color: #6b8682;
  font-size: 12px;
}

.lottery-watch-card {
  width: 100%;
  min-height: 48px;
  border: 1px solid #e0d8c4;
  border-radius: 8px;
  background: #fffef9;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  text-align: left;
  color: #2f5a55;
}

.lottery-watch-card strong {
  color: #174c46;
  font-size: 14px;
  letter-spacing: 0;
}

.lottery-watch-card span {
  color: #5f7f79;
  font-size: 12px;
  line-height: 1.35;
}

.lottery-watch-card em {
  border: 1px solid #e0d8c4;
  border-radius: 8px;
  padding: 5px 8px;
  background: #fff;
  color: #8b5b52;
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}

.lottery-watch-card.hit {
  border-color: #f2c46d;
  background: #fff8df;
}

.lottery-source-note {
  border-top: 1px solid #e2dbc8;
  padding: 10px 4px 0;
  color: #6f817e;
  font-size: 11px;
  line-height: 1.45;
}

.lottery-source-note strong {
  display: block;
  margin-bottom: 3px;
  color: #335d58;
  font-size: 12px;
}

.btn-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.calendar-share-row {
  display: flex;
  justify-content: center;
}

.calendar-share-row .btn {
  width: min(220px, 100%);
}

.weather-refresh-note {
  margin: -2px 0 0;
  padding: 8px 10px;
  border: 1px solid #e2dbc8;
  border-radius: 8px;
  background: rgba(255, 253, 247, 0.72);
  color: #5f7f79;
  display: flex;
  justify-content: center;
  gap: 6px;
  align-items: baseline;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.weather-refresh-note strong {
  color: #174c46;
  font-weight: 800;
}

.btn-row.tri {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.btn {
  min-height: 38px;
  border: 1px solid #d8d1c0;
  border-radius: 8px;
  background: #fff;
  color: #335d58;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.btn:active,
.chip-btn:active,
.tabs button:active,
.nav-btn:active {
  transform: translateY(1px) scale(0.99);
}

.btn.primary {
  border-color: var(--primary);
  background: linear-gradient(160deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 5px 12px rgba(15, 133, 123, 0.18);
}

.btn.on {
  border-color: #9cd7c9;
  background: #dff3ec;
  color: #0a6d64;
}

.form-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.form-inline input {
  min-width: 0;
}

.form-stack {
  display: grid;
  gap: 8px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 40px;
  border: 1px solid #e0d8c4;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  margin-top: 7px;
}

.toggle-row input {
  width: 18px;
  height: 18px;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid #ded6c3;
  background: #fffef8;
}

.nav-btn {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #506964;
  font-weight: 700;
  display: grid;
  grid-template-rows: 19px auto;
  justify-items: center;
  align-items: center;
  gap: 1px;
  padding: 5px 2px 4px;
  line-height: 1.1;
}

.nav-btn.active {
  background: #dff2ec;
  border-color: #b9e2d7;
  color: #0c6f66;
}

.nav-icon {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 19px;
  height: 19px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-label {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  font-weight: 800;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(74px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(92vw, 340px);
  min-height: 42px;
  padding: 9px 14px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  z-index: 99;
}

.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: end;
  padding: 18px;
  background: rgba(16, 32, 29, 0.38);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  position: relative;
  width: min(100%, 430px);
  max-height: calc(100vh - 56px);
  margin: 0 auto;
  overflow: auto;
  border: 1px solid #dcd4c3;
  border-radius: 12px;
  background: #fffef9;
  box-shadow: 0 18px 42px rgba(34, 45, 41, 0.22);
}

.about-modal {
  display: grid;
  gap: 12px;
  padding: 22px 18px 18px;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 1px solid #d8d1be;
  border-radius: 50%;
  background: #fffaf1;
  color: #264f49;
  font-size: 24px;
  line-height: 1;
}

.about-modal small {
  color: #0c7a70;
  font-size: 12px;
  font-weight: 800;
}

.about-modal h2 {
  max-width: calc(100% - 38px);
  margin: 0;
  color: #174c46;
  font-size: 22px;
  line-height: 1.18;
}

.about-modal p {
  margin: 0;
  color: #4f6761;
  font-size: 14px;
  line-height: 1.55;
}

.about-points {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.about-points li {
  position: relative;
  min-height: 34px;
  padding: 8px 10px 8px 34px;
  border: 1px solid #e0d8c4;
  border-radius: 8px;
  background: #fffaf1;
  color: #315d57;
  font-size: 13px;
  line-height: 1.35;
}

.about-points li::before {
  content: "";
  position: absolute;
  top: 13px;
  left: 13px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #0d9488;
  box-shadow: 0 0 0 4px #dff2ec;
}

.about-tagline {
  padding-top: 2px;
  font-weight: 800;
  color: #174c46;
}

.me-about-btn {
  min-height: 46px;
  border-color: #cfe8df;
  background: #f1fbf8;
  color: #087d72;
  font-weight: 800;
}

.tools-market-cards,
.tools-fuel-card,
.exchange-card,
.daily-quote-card,
.humor-joke-card {
  display: grid;
  gap: 10px;
}

.tools-market-card {
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.market-card-head {
  align-items: flex-start;
}

.market-card-title {
  min-width: 0;
  display: inline-grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.market-card-title > div {
  min-width: 0;
}

.market-card-icon {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #cfe8df;
  border-radius: 8px;
  background: #f8fffc;
  color: #087d72;
  box-shadow: inset 0 -6px 12px rgba(13, 148, 136, 0.08);
}

.market-card-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exchange-card-icon {
  border-color: #bde6dc;
  background: #e8faf5;
}

.quote-card-icon {
  border-color: #ecd6a6;
  background: #fff8e7;
  color: #9a5d00;
}

.joke-card-icon {
  border-color: #f0c78a;
  background: #fff3d9;
  color: #9a5d00;
}

.tools-market-card.is-pinned {
  border-color: #9bd8cd;
  box-shadow: 0 12px 28px rgba(10, 120, 108, 0.1);
}

.tools-market-card.is-collapsed .market-card-body {
  display: none;
}

.market-updated {
  display: block;
  margin-top: 4px;
}

.market-range {
  display: block;
  margin-top: 2px;
  color: #315d57;
  font-weight: 700;
}

.market-card-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 6px;
}

.icon-btn.market-action-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #f8fffc;
  color: #315d57;
  padding: 0;
  cursor: pointer;
}

.icon-btn.market-action-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.icon-btn.market-action-btn.active {
  border-color: #0d9488;
  background: #e0f5ef;
  color: #087d72;
}

.icon-btn.market-action-btn:active {
  transform: translateY(1px);
}

.fuel-price-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.fuel-row {
  min-height: 64px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 6px;
  border: 1px solid #e0d8c4;
  border-radius: 8px;
  background: #fffaf1;
}

.fuel-row span {
  color: #315d57;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
}

.fuel-row strong {
  color: #087d72;
  font-size: 19px;
  line-height: 1;
}

.fuel-row small,
.source-note,
.exchange-card-copy,
.quote-eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.fuel-nearby-title {
  margin-top: 12px;
  color: #174c46;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
}

.fuel-nearby-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.fuel-nearby-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.fuel-station-card {
  min-height: 66px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 10px;
  border: 1px solid #d7eadf;
  border-radius: 8px;
  background: #fbfffc;
  color: inherit;
  text-decoration: none;
}

.fuel-station-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.fuel-station-main strong,
.fuel-station-main span,
.fuel-station-main small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fuel-station-main strong {
  color: #174c46;
  font-size: 13px;
  font-weight: 900;
}

.fuel-station-main span,
.fuel-station-main small {
  color: #5f7f79;
  font-size: 11px;
  line-height: 1.3;
}

.fuel-station-side {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.fuel-station-side em {
  color: #087d72;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.fuel-station-side span {
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border-radius: 8px;
  background: #e0f5ef;
  color: #087d72;
  font-size: 11px;
  font-weight: 900;
}

.daily-quote-card {
  border-color: #d6eadb;
  background:
    linear-gradient(135deg, rgba(242, 251, 246, 0.98), rgba(255, 250, 237, 0.98)),
    var(--card);
}

.humor-joke-card {
  border-color: #ffd49b;
  background:
    linear-gradient(135deg, rgba(255, 247, 232, 0.98), rgba(239, 250, 247, 0.98)),
    var(--card);
}

.quote-card-body,
.joke-card-body {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px;
  border-radius: 8px;
}

.quote-card-body {
  min-height: 190px;
  border: 1px solid #d9ecdf;
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(240, 250, 245, 0.82)),
    linear-gradient(90deg, rgba(13, 148, 136, 0.1) 1px, transparent 1px),
    linear-gradient(180deg, rgba(13, 148, 136, 0.08) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
}

.joke-card-body {
  min-height: 210px;
  align-content: center;
  border: 1px solid #f2d7a6;
  background:
    radial-gradient(circle at 12% 16%, rgba(255, 199, 95, 0.28), transparent 30%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.72), rgba(255, 248, 232, 0.9));
}

.joke-eyebrow {
  margin: 0;
  color: #9a5d00;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.humor-joke-text {
  margin: 0;
  color: #174c46;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.28;
}

.joke-refresh-btn {
  justify-self: start;
  min-height: 42px;
  padding-inline: 16px;
  border-color: #f0bd64;
  background: #fff8e7;
  color: #8a4f00;
}

.daily-quote-card blockquote {
  margin: 0;
  color: #174c46;
  font-size: 21px;
  font-weight: 800;
  line-height: 1.38;
}

.daily-quote-card blockquote::before {
  content: "\201C";
  color: #0d9488;
  font-size: 30px;
  line-height: 0;
  vertical-align: -8px;
  margin-right: 3px;
}

.quote-author {
  display: grid;
  gap: 2px;
  justify-items: end;
  text-align: right;
}

.quote-author strong {
  color: #0a6b62;
  font-size: 15px;
  line-height: 1.2;
}

.quote-author span {
  color: #5f7f79;
  font-size: 12px;
  line-height: 1.35;
}

.exchange-rate-list {
  display: grid;
  gap: 8px;
}

.exchange-converter {
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #fbfffc;
}

.exchange-converter label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #315d57;
  font-size: 11px;
  font-weight: 900;
}

.exchange-converter input,
.exchange-converter select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid #d8d1c0;
  border-radius: 8px;
  background: #fff;
  color: #174c46;
  font-size: 13px;
  font-weight: 800;
}

.exchange-converter input {
  padding: 0 10px;
}

.exchange-converter select {
  padding: 0 8px;
}

.currency-select-wrap {
  position: relative;
  display: block;
}

.currency-flag-preview {
  position: absolute;
  left: 9px;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
  font-size: 16px;
  line-height: 1;
  pointer-events: none;
}

.exchange-converter .currency-select-wrap select {
  padding-left: 34px;
}

.exchange-trend-picker {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.exchange-trend-picker label {
  min-width: 0;
  display: grid;
  gap: 5px;
  color: #315d57;
  font-size: 11px;
  font-weight: 900;
}

.exchange-trend-picker select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 8px 0 34px;
  border: 1px solid #d8d1c0;
  border-radius: 8px;
  background: #fff;
  color: #174c46;
  font-size: 13px;
  font-weight: 800;
}

.exchange-trend-add-btn {
  min-height: 38px;
  padding-inline: 14px;
  border-color: #9bd8cd;
  background: #e0f5ef;
  color: #087d72;
  font-weight: 900;
}

.exchange-trend-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.exchange-trend-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #f8fffc;
  color: #174c46;
  font: inherit;
  cursor: pointer;
}

.exchange-trend-chip strong {
  font-size: 12px;
  line-height: 1;
}

.exchange-trend-chip em {
  color: #8a4f00;
  font-style: normal;
  font-weight: 900;
}

.exchange-trend-empty {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.exchange-converter-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.exchange-swap-btn {
  width: 38px;
  height: 38px;
  border: 1px solid #9bd8cd;
  border-radius: 8px;
  background: #e0f5ef;
  color: #087d72;
  font-size: 18px;
  font-weight: 900;
}

.exchange-converter-result {
  display: grid;
  gap: 3px;
  padding-top: 2px;
}

.exchange-converter-result strong {
  color: #087d72;
  font-size: 22px;
  line-height: 1.1;
}

.exchange-converter-result small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.exchange-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  gap: 8px;
  align-items: center;
  min-height: 72px;
  padding: 9px;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #f8fffc;
}

.exchange-row[role="button"] {
  cursor: pointer;
}

.exchange-open-btn {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(92px, 1fr) minmax(82px, 1fr) 112px;
  gap: 8px;
  align-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.exchange-code {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
}

.exchange-flag {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #fff;
  font-size: 17px;
  line-height: 1;
}

.exchange-code-text {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.fuel-page {
  min-height: calc(100dvh - 96px);
  display: grid;
  align-items: start;
}

.fuel-page-card {
  display: grid;
  gap: 14px;
  border-color: #c7e6df;
  background: linear-gradient(160deg, rgba(247, 255, 252, 0.98), rgba(255, 252, 244, 0.98));
}

.fuel-page-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.fuel-page-kicker {
  margin: 0 0 4px;
  color: #087d72;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.fuel-page-head h1 {
  margin: 0;
  color: #083f3a;
  font-size: 30px;
  line-height: 1.12;
}

.fuel-page-head p:last-child {
  margin: 6px 0 0;
  color: #5f7f79;
  font-size: 14px;
  line-height: 1.45;
}

.fuel-page-price-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.exchange-code strong,
.exchange-value strong {
  display: block;
  color: #174c46;
  font-size: 17px;
  line-height: 1.1;
}

.exchange-code-text span,
.exchange-value small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.exchange-remove-btn {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #efd3a7;
  border-radius: 8px;
  background: #fff8e7;
  color: #8a4f00;
  font-size: 17px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.exchange-trend-modal {
  display: grid;
  gap: 12px;
  padding: 22px 18px 18px;
}

.exchange-trend-modal h2 {
  max-width: calc(100% - 38px);
  margin: 0;
  color: #174c46;
  font-size: 22px;
  line-height: 1.18;
}

.exchange-trend-modal small {
  color: #0c7a70;
  font-size: 12px;
  font-weight: 800;
}

.exchange-range-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.exchange-range-tab {
  min-height: 34px;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #f8fffc;
  color: #315d57;
  font-size: 11px;
  font-weight: 900;
}

.exchange-range-tab.active {
  border-color: #0d9488;
  background: #e0f5ef;
  color: #087d72;
}

.exchange-modal-chart {
  min-height: 210px;
  display: grid;
  align-items: center;
  gap: 6px;
  padding: 10px;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #fbfffc;
}

.exchange-modal-svg {
  width: 100%;
  height: auto;
  display: block;
}

.exchange-modal-svg path {
  fill: none;
  stroke: #e3eee9;
  stroke-width: 1;
}

.exchange-modal-svg polyline {
  fill: none;
  stroke: #0d9488;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exchange-modal-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.exchange-modal-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.exchange-modal-stats div {
  min-height: 62px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 9px;
  border: 1px solid #e0d8c4;
  border-radius: 8px;
  background: #fffaf1;
}

.exchange-modal-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.exchange-modal-stats strong {
  color: #174c46;
  font-size: 17px;
  line-height: 1.2;
}

.exchange-value {
  text-align: right;
}

.exchange-row.up .exchange-value small {
  color: #0c7a70;
}

.exchange-row.down .exchange-value small {
  color: #9a5a17;
}

.sparkline {
  width: 100%;
  height: 34px;
  display: block;
}

.sparkline path,
.sparkline polyline {
  fill: none;
  stroke: #0d9488;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.exchange-row.down .sparkline polyline {
  stroke: #c47b22;
}

.market-empty {
  padding: 12px;
  border: 1px dashed #d8d1be;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.bts-card {
  display: grid;
  gap: 10px;
}

.bts-card.is-map-fullscreen,
.bts-card:fullscreen {
  width: 100vw;
  height: 100vh;
  max-width: none;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  padding: 14px;
  border-radius: 0;
  background: #fbfffd;
  overflow: hidden;
  z-index: 1000;
}

.bts-card.is-map-fullscreen {
  position: fixed;
  inset: 0;
}

.bts-map-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bts-reset-btn {
  width: 42px;
  font-size: 12px;
  font-weight: 900;
}

.bts-map-viewport {
  width: 100%;
  height: 430px;
  overflow: auto;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #f8fffc;
  -webkit-overflow-scrolling: touch;
}

.bts-card.is-map-fullscreen .bts-map-viewport,
.bts-card:fullscreen .bts-map-viewport {
  height: auto;
  min-height: 0;
}

.bts-map-inner {
  width: 1180px;
  height: 720px;
  transform-origin: top left;
}

.bts-map-svg {
  width: 1180px;
  height: 720px;
  display: block;
}

.bts-map-svg > rect {
  fill: #fbfffd;
}

.bts-route {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bts-route.sukhumvit {
  stroke: #168a45;
}

.bts-route.silom {
  stroke: #0f6f3d;
}

.bts-route.gold {
  stroke: #d4a019;
}

.bts-route.blue {
  stroke: #1d5ea8;
}

.bts-route.purple {
  stroke: #7b3fb2;
}

.bts-route.yellow {
  stroke: #f0c419;
}

.bts-route.pink {
  stroke: #e75a9c;
}

.bts-route.arl {
  stroke: #b53030;
}

.bts-route.red {
  stroke: #d62828;
}

.bts-station {
  cursor: pointer;
}

.bts-station circle {
  fill: #fff;
  stroke: #174c46;
  stroke-width: 2;
}

.bts-station.connected circle {
  stroke-width: 3.4;
}

.bts-station.selected circle {
  fill: #0d9488;
  stroke: #043f3a;
}

.bts-station text {
  fill: #315d57;
  font-size: 10px;
  font-weight: 800;
  paint-order: stroke;
  stroke: #fbfffd;
  stroke-width: 4px;
}

.bts-line-labels text {
  fill: #174c46;
  font-size: 16px;
  font-weight: 900;
}

.bts-station-detail {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #f8fffc;
}

.bts-detail-code {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 8px;
  background: #0d9488;
  color: #fff;
  font-weight: 900;
}

.bts-detail-main strong,
.bts-detail-main span,
.bts-detail-meta span {
  display: block;
}

.bts-detail-main strong {
  color: #174c46;
  font-size: 18px;
  line-height: 1.15;
}

.bts-detail-main span,
.bts-detail-meta span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.bts-detail-meta {
  grid-column: 1 / -1;
  display: grid;
  gap: 3px;
}

.calendar-month-card {
  display: grid;
  gap: 10px;
}

.month-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.month-title {
  min-width: 132px;
  text-align: center;
  color: #174c46;
  font-size: 14px;
  font-weight: 900;
}

.month-nav-btn {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d8eee7;
  border-radius: 8px;
  background: #f8fffc;
  color: #315d57;
  padding: 0;
}

.month-nav-btn::before {
  content: "";
  width: 9px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-left: 2px solid currentColor;
}

#calendarPrevMonthBtn::before {
  transform: rotate(-45deg);
}

#calendarNextMonthBtn::before {
  transform: rotate(135deg);
}

.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
}

.month-weekday {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

.month-day {
  min-height: 66px;
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 7px 5px;
  border: 1px solid #e0d8c4;
  border-radius: 8px;
  background: #fffef9;
  color: #174c46;
  overflow: hidden;
}

.month-day.empty {
  border-color: transparent;
  background: transparent;
}

.month-day span {
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.month-day small {
  color: #6f5a24;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.month-day.holiday {
  border-color: #e4bf6a;
  background: #fff7dc;
}

.month-day.buddhist {
  border-color: #b8ddd5;
  background: #f1fbf8;
}

.month-day.today {
  outline: 2px solid #0d9488;
  outline-offset: 1px;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounceTiny {
  0%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-3px);
  }
  60% {
    transform: translateY(-1px);
  }
}

@media (max-width: 390px) {
  .nav-btn {
    min-height: 42px;
    padding-inline: 1px;
  }

  .nav-label {
    font-size: 10px;
  }

  .weather-city {
    font-size: 38px;
  }

  .weather-temp {
    font-size: 74px;
  }

  .weather-condition {
    font-size: 25px;
  }

  .weather-range {
    font-size: 24px;
  }

  .weather-hero-metrics {
    gap: 5px;
  }

  .weather-hero-top {
    grid-template-columns: minmax(0, 1fr) minmax(96px, 124px);
    gap: 8px;
  }

  .weather-thai-date {
    max-width: 124px;
    padding-right: 6px;
    padding-bottom: 4px;
    font-size: 12px;
  }

  .weather-metric {
    padding: 6px 5px;
  }

  .daily-row {
    grid-template-columns: 1fr 56px 40px 1fr 40px;
  }

  .gear-item {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .gear-status {
    grid-column: 2;
    justify-self: start;
    min-width: 0;
    margin-top: 1px;
  }

  .btn-row.tri {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .fuel-price-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .exchange-row {
    grid-template-columns: minmax(0, 1fr) 28px;
  }

  .exchange-trend-picker {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .exchange-trend-add-btn {
    grid-column: 1 / -1;
  }

  .exchange-open-btn {
    grid-template-columns: minmax(86px, 1fr) minmax(68px, 1fr) 82px;
  }
}
