.exp-shell {
  --exp-text: #153654;
  --exp-muted: #4d6c86;
  --exp-blue: #125eac;
  --exp-panel: linear-gradient(145deg, rgba(255, 255, 255, .93), rgba(239, 248, 255, .76));
  --exp-line: #d8e8f5;
  display: grid;
  gap: 1.25rem;
  color: var(--exp-text);
}

.exp-shell button,
.exp-shell select,
.exp-shell input { font: inherit; }

.exp-shell :focus-visible {
  outline: 3px solid #0d70c8;
  outline-offset: 3px;
}

.exp-heading {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .6rem .1rem .35rem;
}

.exp-heading-icon,
.exp-empty-icon,
.exp-place-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #1669b7;
  background: linear-gradient(146deg, #fff 4%, #d6edff 95%);
  box-shadow: inset 0 0 0 1px #fff, 0 8px 20px #4f95c421;
}

.exp-heading-icon { width: 3.65rem; height: 3.65rem; border-radius: 1.2rem; }
.exp-heading h1 { margin: 0; font-size: clamp(1.75rem, 4.2vw, 2.75rem); line-height: 1.07; letter-spacing: -.045em; }
.exp-heading p,
.exp-panel-title p { margin: .45rem 0 0; color: var(--exp-muted); line-height: 1.55; }

.exp-tabs {
  display: flex;
  gap: .25rem;
  align-items: center;
  justify-self: start;
  padding: .3rem;
  border: 1px solid #fff;
  border-radius: 1rem;
  background-color: #e9f5ffbf;
  box-shadow: inset 0 1px 3px #d0e5f8;
}

.exp-tabs button {
  border: 0;
  border-radius: .76rem;
  padding: .58rem .9rem;
  min-height: 2.75rem;
  cursor: pointer;
  display: flex;
  gap: .45rem;
  align-items: center;
  justify-content: center;
  color: var(--exp-muted);
  background: transparent;
  font-weight: 650;
  white-space: nowrap;
}

.exp-tabs button[aria-pressed="true"] {
  background: #fff;
  color: #165fa3;
  box-shadow: 0 3px 10px #4b83af24;
}

.exp-tabs button:hover { color: var(--exp-blue); }
.exp-panel {
  padding: clamp(1.05rem, 3vw, 1.7rem);
  border-radius: 1.5rem;
  border: 1px solid #fff;
  background: var(--exp-panel);
  box-shadow: 0 15px 36px #4b7d9f10, inset 0 1px 0 #fff;
  min-width: 0;
}

.exp-panel-title h2,
.exp-factor-info h2 { font-size: 1.28rem; line-height: 1.22; margin: 0; letter-spacing: -.018em; }
.exp-panel-title p { max-width: 60rem; font-size: .94rem; }
.exp-spotlight {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.35rem;
  color: #1a4c76;
  border: 1px solid white;
  border-radius: 1.5rem;
  background: radial-gradient(ellipse at 10% 15%, #fff8, transparent 61%), linear-gradient(116deg, #def4ffed, #dfebffdf 74%, #f0f1ffe6);
  box-shadow: 0 12px 28px #5f93c117;
}

.exp-spotlight svg { flex: 0 0 auto; }
.exp-spotlight div { min-width: 0; }
.exp-spotlight div > span { color: var(--exp-blue); font-size: .9rem; font-weight: 700; }
.exp-spotlight strong { display: block; font-size: clamp(1.15rem, 2.7vw, 1.6rem); margin: .16rem 0; }
.exp-spotlight p { margin: 0; color: var(--exp-muted); }
.exp-spotlight > b { margin-left: auto; white-space: nowrap; font-size: clamp(1.6rem, 4.4vw, 2.6rem); font-variant-numeric: tabular-nums; letter-spacing: -.06em; }
.exp-spotlight > b small { font-size: .41em; color: var(--exp-muted); letter-spacing: 0; }

.exp-trend {
  display: grid;
  grid-template-columns: repeat(var(--exp-days, 9), minmax(5.1rem, 1fr));
  gap: .55rem;
  overflow-x: auto;
  padding: .25rem .22rem .55rem;
  margin: 1rem -.22rem -.4rem;
  scrollbar-width: thin;
  scrollbar-color: #a7cbe8 transparent;
}

.exp-day {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: .15rem;
  padding: .65rem .25rem .55rem;
  color: var(--exp-text);
  cursor: pointer;
  border: 1px solid var(--exp-line);
  border-radius: 1rem;
  background: linear-gradient(#fff, #f2f8fd);
  min-height: 9.5rem;
  transition: background-color .18s, border-color .18s, box-shadow .18s;
}

.exp-day:hover,
.exp-day[aria-current] { border-color: #8db9e5; box-shadow: inset 0 0 0 1px #bddbfc; background: #ebf6ff; }
.exp-day > span:first-child { color: var(--exp-muted); font-size: .875rem; }
.exp-day > strong { white-space: nowrap; font-size: .9rem; }
.exp-day svg { margin: .18rem 0 .02rem; }
.exp-day b { font-variant-numeric: tabular-nums; color: #185d9c; }
.exp-mini-chart { display: grid; align-items: end; width: .44rem; height: 2.1rem; border-radius: 1rem; background: #e0eef9; overflow: hidden; }
.exp-mini-chart i { width: 100%; background: linear-gradient(0deg, #428cd6, #9ad8fc); border-radius: 1rem; }

.exp-ranking { display: grid; gap: .4rem; margin: 1rem 0; }
.exp-ranking-row {
  display: grid;
  grid-template-columns: 2.5rem minmax(7rem, 1.4fr) minmax(6.6rem, 1fr) minmax(7rem, .85fr) minmax(4.5rem, .55fr);
  gap: .65rem;
  align-items: center;
  text-align: left;
  width: 100%;
  color: var(--exp-text);
  background: #ffffff9e;
  border: 1px solid #e2edf6;
  padding: .55rem .85rem;
  cursor: pointer;
  border-radius: .8rem;
}

.exp-ranking-row:hover { border-color: #a9cce7; background: #f2f9ff; }
.exp-row-weather { display: flex; }
.exp-row-date,
.exp-weather-only { display: grid; gap: .15rem; }
.exp-ranking-row small { color: var(--exp-muted); font-size: .85rem; }
.exp-row-score { text-align: right; white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.exp-level {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  border-radius: 1rem;
  background: #ecf1f6;
  color: #486074;
  padding: .26rem .52rem;
  line-height: 1.15;
  font-size: .78rem;
  font-weight: 650;
  white-space: nowrap;
}

.exp-level-high { color: #176852; background: #dbf5e9; }
.exp-level-caution { color: #215b8d; background: #dceeff; }
.exp-level-low { color: #865910; background: #fff0d5; }
.exp-level-avoid { color: #933e52; background: #fce6eb; }
.exp-note {
  margin: .9rem 0 0;
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  color: var(--exp-muted);
  font-size: .89rem;
  line-height: 1.52;
}

.exp-note svg { flex: 0 0 auto; margin-top: .12rem; color: var(--exp-blue); }
.exp-place-head { display: flex; gap: 1rem; justify-content: space-between; align-items: flex-start; margin-bottom: .95rem; }
.exp-select { display: grid; gap: .28rem; color: var(--exp-muted); font-size: .87rem; font-weight: 650; }
.exp-select select {
  appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' width='20' height='20'%3E%3Cpath d='m5 8 5 5 5-5' fill='none' stroke='%234d6c86' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right .48rem center / 1.2rem no-repeat;
  padding: .57rem 2rem .57rem .72rem;
  min-height: 2.7rem;
  border: 1px solid #c9dfef;
  border-radius: .68rem;
  color: var(--exp-text);
  cursor: pointer;
  min-width: 9rem;
}

.exp-empty {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-height: 5rem;
  padding: .85rem 1rem;
  border-radius: 1rem;
  border: 1px solid #d6e9f7;
  background: #eaf6ffcb;
}

.exp-empty-icon { width: 2.6rem; height: 2.6rem; border-radius: .8rem; }
.exp-empty strong { font-weight: 700; }
.exp-empty p { margin: .25rem 0 0; color: var(--exp-muted); line-height: 1.45; font-size: .9rem; overflow-wrap: anywhere; }
.exp-places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0; }
.exp-place {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: .9rem;
  min-width: 0;
  border-radius: 1.1rem;
  border: 1px solid #dae9f6;
  background: linear-gradient(150deg, #fff, #f1f8fd);
  transition: border-color .18s, box-shadow .18s;
}

.exp-place.is-current { border-color: #a9c9e5; }
.exp-place:hover, .exp-place:focus-within { border-color: #8ab8e3; box-shadow: 0 8px 17px #4e95cc17; }
.exp-place-icon { width: 2.4rem; height: 2.4rem; border-radius: .8rem; margin-bottom: .65rem; }
.exp-place h3 { margin: 0; font-size: 1.12rem; }
.exp-place p { margin: .25rem 0 .7rem; color: var(--exp-muted); font-size: .88rem; }
.exp-place-data { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin-bottom: .52rem; color: var(--exp-muted); font-size: .875rem; }
.exp-place-data b { color: var(--exp-text); margin-left: .15rem; }
.exp-place-missing { color: var(--exp-muted); font-size: .84rem; }
.exp-station-latest {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .2rem .35rem;
  margin-top: .6rem;
  padding: .55rem .6rem;
  color: var(--exp-muted);
  background: #eaf5ff;
  border: 1px solid #e0edf9;
  border-radius: .65rem;
  font-size: .85rem;
}

.exp-station-latest b { white-space: nowrap; color: var(--exp-text); }
.exp-station-latest time { grid-column: 1 / -1; }
.exp-place-button {
  min-height: 2.5rem;
  align-self: start;
  color: var(--exp-blue);
  background: transparent;
  border: 0;
  border-radius: .5rem;
  text-align: start;
  padding: .4rem .15rem 0;
  font-weight: 650;
}

.exp-place-button::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.exp-place:hover .exp-place-button { text-decoration: underline; text-underline-offset: .18em; }

.exp-history-controls { display: flex; align-items: flex-end; justify-content: space-between; gap: .85rem; }
.exp-upload {
  position: relative;
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  gap: .55rem;
  padding: .65rem 1rem;
  border-radius: .8rem;
  border: 1px solid #2473b6;
  color: #fff;
  background: #1d69ad;
  box-shadow: 0 6px 13px #347fbd30;
  font-weight: 650;
  cursor: pointer;
}

.exp-upload:hover { background: #135c9f; }
.exp-upload:focus-within { outline: 3px solid #2579c5; outline-offset: 3px; }
.exp-upload input { position: absolute; opacity: 0; inset: 0; width: 100%; cursor: pointer; }
.exp-details { margin-top: .9rem; border-top: 1px solid #e1edf7; padding-top: .65rem; color: var(--exp-muted); }
.exp-details summary { cursor: pointer; color: var(--exp-blue); font-weight: 650; }
.exp-details code { display: inline-block; margin-top: .65rem; max-width: 100%; padding: .45rem; border-radius: .4rem; color: #27577e; background: #e6f2fb; overflow-wrap: anywhere; white-space: normal; }
.exp-details p { margin: .45rem 0 0; line-height: 1.55; }
.exp-upload-result:empty { display: none; }
.exp-upload-result { margin-top: .85rem; }
.exp-file { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; padding: .72rem; border-radius: .75rem; background: #e5f5ed; color: #267155; overflow-wrap: anywhere; }
.exp-file button { margin-left: auto; color: #175842; border: 1px solid #b8e0cf; background: #fff; padding: .4rem .7rem; border-radius: .5rem; cursor: pointer; }
.exp-history-stat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.exp-history-stat > div {
  display: grid;
  align-content: start;
  gap: .2rem;
  padding: .9rem 1.18rem;
  min-width: 0;
  border: 1px solid #fff;
  border-radius: 1.05rem;
  background: var(--exp-panel);
  color: var(--exp-muted);
  overflow-wrap: anywhere;
}

.exp-history-stat b { color: var(--exp-text); font-size: clamp(1.18rem, 2.5vw, 1.75rem); }
.exp-history-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.exp-bars { display: grid; gap: .5rem; margin-top: .65rem; }
.exp-bar-row { display: grid; grid-template-columns: minmax(4.2rem, .75fr) minmax(3rem, 1.4fr) auto; align-items: center; gap: .55rem; font-size: .9rem; }
.exp-bar-row span { min-width: 0; overflow-wrap: anywhere; }
.exp-bar-row > div { height: .45rem; background: #dcecf8; border-radius: .6rem; overflow: hidden; }
.exp-bar-row i { display: block; height: 100%; border-radius: .6rem; background: linear-gradient(90deg, #2d74bc, #86c9f3); }
.exp-bars.mint i { background: linear-gradient(90deg, #247e72, #7cdec7); }
.exp-bars.purple i { background: linear-gradient(90deg, #7762b4, #bbabed); }

.exp-scale { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .65rem; margin-top: 1rem; }
.exp-scale-stop { border-radius: .85rem; background: #f2f7fd; border: 1px solid #e5edf7; padding: .6rem; min-width: 0; }
.exp-scale-stop > b { display: block; margin-bottom: .2rem; }
.exp-scale-high { background: #e9fbf2; }
.exp-scale-low { background: #fff8eb; }
.exp-scale-avoid { background: #fdf0f3; }
.exp-method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.exp-factor-info { position: relative; }
.exp-factor-image { display: flex; align-items: center; justify-content: center; width: 3.7rem; height: 3.7rem; margin-bottom: .64rem; }
.exp-factor-image svg { width: 100%; height: 100%; }
.exp-factor-info p { color: var(--exp-muted); margin: .5rem 0 0; line-height: 1.55; }
.exp-table-wrap { overflow: auto; padding-bottom: .3rem; margin-top: .85rem; }
.exp-table { width: 100%; border-collapse: collapse; text-align: start; font-size: .9rem; white-space: nowrap; }
.exp-table th, .exp-table td { padding: .6rem; border-bottom: 1px solid #e2edf6; }
.exp-table th { text-align: left; font-weight: 670; }
.exp-table th:first-child { padding-left: .25rem; }
.exp-table thead th { color: var(--exp-muted); }
.exp-sources { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: .8rem; }
.exp-sources a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .55rem .72rem;
  border: 1px solid #d5e6f5;
  border-radius: .75rem;
  color: var(--exp-blue);
  background: #fff;
  text-decoration: none;
  font-weight: 650;
  font-size: .9rem;
}
.exp-sources a:hover { background: #ecf6ff; }
.exp-sources a svg { flex: 0 0 auto; }

@media (max-width: 760px) {
  .exp-ranking-row { grid-template-columns: 2.25rem minmax(0, 1.2fr) minmax(4.5rem, .55fr) minmax(3.3rem, .45fr); }
  .exp-ranking-row .exp-level { display: none; }
  .exp-places, .exp-method-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 500px) {
  .exp-shell { gap: .88rem; }
  .exp-heading { align-items: flex-start; gap: .65rem; }
  .exp-heading-icon { width: 2.85rem; height: 2.85rem; border-radius: .9rem; }
  .exp-heading p { font-size: .93rem; }
  .exp-spotlight { gap: .6rem; padding: .7rem .75rem; }
  .exp-spotlight svg { width: 3rem; height: 3rem; }
  .exp-spotlight p { font-size: .84rem; }
  .exp-ranking-row { padding: .45rem .55rem; gap: .35rem; grid-template-columns: 1.85rem minmax(0, 1fr) 4.2rem 2.2rem; }
  .exp-row-weather svg { width: 1.75rem; height: auto; }
  .exp-ranking-row small { font-size: .75rem; }
  .exp-row-score small { display: none; }
  .exp-place-head { flex-direction: column; gap: .75rem; }
  .exp-places { gap: .45rem; }
  .exp-place { padding: .72rem; }
  .exp-station-latest { grid-template-columns: 1fr; overflow-wrap: anywhere; }
  .exp-history-controls { align-items: stretch; flex-direction: column; }
  .exp-upload { justify-content: center; }
  .exp-history-stat { gap: .4rem; }
  .exp-history-stat > div { padding: .65rem .53rem; font-size: .84rem; }
  .exp-history-grid { grid-template-columns: 1fr; }
  .exp-scale { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
  .exp-method-grid { gap: .5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .exp-shell * { transition: none !important; }
}
