    :root {
      --bg: #f5f7fb;
      --surface: #ffffff;
      --surface-soft: #f5f8fb;
      --line: #e3e9f2;
      --text: #111827;
      --muted: #64748b;
      --muted-2: #94a3b8;
      --accent: #ff6b16;
      --accent-2: #ff4f45;
      --navy: #0f172a;
      --shadow: 0 14px 35px rgba(15, 23, 42, 0.08);
    }

    * {
      box-sizing: border-box;
    }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
      color: var(--text);
      background:
        radial-gradient(circle at top left, #fff7ed, transparent 35%),
        linear-gradient(180deg, #f8fafc, #eef2f7);
    }

    body.is-loading {
      overflow: hidden;
    }

    .page {
      max-width: 1152px;
      margin: 0 auto;
      padding: 20px 20px 42px;
    }

    .hero {
      display: flex;
      justify-content: space-between;
      gap: 24px;
      align-items: flex-end;
      margin-bottom: 20px;
      padding-top: 14px;
    }

    .eyebrow {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin-bottom: 10px;
      padding: 6px 12px;
      border: 1px solid #fed7aa;
      border-radius: 999px;
      background: rgba(255, 255, 255, 0.72);
      box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
      color: #c2410c;
      font-size: 14px;
      font-weight: 750;
    }

    h1 {
      max-width: 860px;
      margin: 0;
      color: #0f172a;
      font-size: clamp(36px, 5vw, 54px);
      line-height: 1;
      letter-spacing: -0.04em;
    }

    .subtitle {
      max-width: 760px;
      margin: 18px 0 0;
      color: #475569;
      font-size: 16px;
      line-height: 1.45;
    }

    .best-card,
    .panel,
    .event-card,
    .selected-card,
    .detail-card {
      background: var(--surface);
      border: 1px solid rgba(226, 232, 240, 0.92);
      box-shadow: var(--shadow);
    }

    .best-card {
      width: 260px;
      flex: 0 0 auto;
      border-radius: 14px;
      padding: 16px;
      background: rgba(255, 255, 255, 0.82);
      border-color: rgba(255, 255, 255, 0.74);
      box-shadow: 0 22px 42px rgba(148, 163, 184, 0.28);
    }

    .best-label {
      display: flex;
      gap: 10px;
      align-items: center;
      color: #64748b;
      font-size: 14px;
      font-weight: 650;
      margin-bottom: 10px;
    }

    .best-content {
      display: grid;
      grid-template-columns: 50px 1fr;
      gap: 12px;
      align-items: center;
    }

    .event-badge {
      width: 48px;
      height: 48px;
      border-radius: 16px;
      display: grid;
      place-items: center;
      background: linear-gradient(135deg, var(--accent), var(--accent-2));
      color: #ffffff;
      font-size: 12px;
      font-weight: 900;
      letter-spacing: 0.04em;
    }

    .sun-icon {
      width: 28px;
      height: 28px;
      stroke: currentColor;
      stroke-width: 2.4;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
    }

    .best-date {
      color: #0f172a;
      font-size: 18px;
      font-weight: 900;
      line-height: 1.1;
    }

    .best-meta {
      color: #64748b;
      font-size: 14px;
      line-height: 1.35;
      margin-top: 6px;
    }

    .panel {
      border-radius: 16px;
      overflow: hidden;
      background: rgba(255, 255, 255, 0.86);
      border-color: rgba(255, 255, 255, 0.78);
      box-shadow: 0 24px 48px rgba(148, 163, 184, 0.26);
    }

    .location-panel {
      padding: 20px;
      border-bottom: 1px solid #f1f5f9;
    }

    .section-label {
      margin-bottom: 12px;
      color: #334155;
      font-size: 15px;
      font-weight: 850;
    }

    .search-form {
      display: grid;
      grid-template-columns: minmax(260px, 1fr) auto;
      gap: 12px;
      align-items: start;
    }

    .location-search {
      position: relative;
    }

    .search-input-wrap {
      position: relative;
    }

    .search-input-wrap::before {
      content: "";
      position: absolute;
      left: 18px;
      top: 50%;
      width: 14px;
      height: 14px;
      border: 2px solid #94a3b8;
      border-radius: 999px;
      transform: translateY(-50%);
    }

    .search-input-wrap::after {
      content: "";
      position: absolute;
      left: 32px;
      top: calc(50% + 9px);
      width: 9px;
      height: 2px;
      border-radius: 999px;
      background: #94a3b8;
      transform: rotate(45deg);
      transform-origin: left center;
    }

    input {
      width: 100%;
      border: 1px solid #dbe3ee;
      background: #ffffff;
      color: var(--text);
      border-radius: 16px;
      padding: 17px 18px;
      font-size: 18px;
      font-weight: 750;
      outline: none;
    }

    #city-search {
      padding-left: 50px;
    }

    input:focus {
      border-color: rgba(255, 107, 22, 0.65);
      box-shadow: 0 0 0 4px rgba(255, 107, 22, 0.10);
    }

    .hidden-input {
      display: none;
    }

    .form-actions {
      display: grid;
      grid-template-columns: 1fr;
      gap: 10px;
      min-width: 190px;
    }

    button {
      border: 0;
      cursor: pointer;
      font-family: inherit;
    }

    .submit-button {
      width: 100%;
      min-height: 54px;
      border-radius: 16px;
      padding: 14px 24px;
      color: #ffffff;
      background: var(--navy);
      box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
      font-size: 16px;
      font-weight: 750;
    }

    .secondary-button {
      width: 100%;
      min-height: 48px;
      border: 1px solid #dbe3ee;
      border-radius: 16px;
      padding: 12px 18px;
      background: #ffffff;
      color: #0f172a;
      box-shadow: none;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 9px;
      font-size: 15px;
      font-weight: 800;
    }

    .secondary-button:hover {
      border-color: rgba(255, 107, 22, 0.55);
      transform: translateY(-1px);
    }

    .secondary-button:disabled {
      cursor: wait;
      opacity: 0.72;
      transform: none;
    }

    .button-icon {
      width: 18px;
      height: 18px;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
      fill: none;
      flex: 0 0 auto;
    }

    .submit-button:hover,
    .event-card:hover {
      transform: translateY(-1px);
    }

    .submit-button:disabled {
      cursor: wait;
      opacity: 0.72;
      transform: none;
    }

    .suggestions {
      display: none;
      position: absolute;
      z-index: 10;
      top: calc(100% + 8px);
      left: 0;
      right: 0;
      max-height: 280px;
      overflow-y: auto;
      background: #ffffff;
      border: 1px solid #dbe3ee;
      border-radius: 16px;
      box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
    }

    .suggestions.is-visible {
      display: block;
    }

    .suggestion-item {
      width: 100%;
      padding: 13px 15px;
      background: transparent;
      color: var(--text);
      text-align: left;
      font-size: 15px;
      font-weight: 700;
    }

    .suggestion-item:hover,
    .suggestion-item:focus {
      background: #fff4ed;
    }

    .suggestion-main,
    .suggestion-meta {
      display: block;
      line-height: 1.3;
    }

    .suggestion-meta {
      margin-top: 3px;
      color: var(--muted);
      font-size: 12px;
      font-weight: 500;
    }

    .location-status {
      min-height: 22px;
      margin-top: 14px;
      color: #64748b;
      font-size: 15px;
      line-height: 1.35;
    }

    .location-status.is-error,
    .error {
      color: #b42318;
    }

    .forecast-panel {
      padding: 20px;
    }

    .forecast-header {
      display: flex;
      justify-content: space-between;
      gap: 16px;
      align-items: center;
      margin-bottom: 12px;
    }

    .forecast-title {
      margin: 0;
      color: #0f172a;
      font-size: 18px;
      letter-spacing: -0.02em;
    }

    .forecast-note {
      color: #64748b;
      font-size: 14px;
      margin-top: 5px;
    }

    .click-note {
      color: #64748b;
      display: flex;
      align-items: center;
      gap: 8px;
      font-size: 14px;
      white-space: nowrap;
    }

    .event-strip {
      display: flex;
      gap: 12px;
      overflow-x: auto;
      padding: 2px 0 12px;
      margin: 0 -20px;
      padding-left: 20px;
      padding-right: 20px;
      scrollbar-color: #cbd5e1 transparent;
    }

    .event-strip-wrap {
      position: relative;
      margin-top: 2px;
    }

    .event-strip-wrap::after {
      content: "";
      position: absolute;
      top: 0;
      right: -20px;
      bottom: 12px;
      width: 86px;
      pointer-events: none;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(248, 250, 252, 0.96) 70%);
      opacity: 1;
      transition: opacity 160ms ease;
    }

    .event-strip-wrap::before {
      content: "›";
      position: absolute;
      z-index: 2;
      top: 50%;
      right: 8px;
      width: 34px;
      height: 34px;
      display: grid;
      place-items: center;
      border-radius: 999px;
      color: #64748b;
      background: rgba(255, 255, 255, 0.88);
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
      font-size: 32px;
      line-height: 1;
      pointer-events: none;
      transform: translateY(-50%);
      transition: opacity 160ms ease;
    }

    .event-strip-wrap.is-scroll-end::before,
    .event-strip-wrap.is-scroll-end::after,
    .event-strip-wrap.is-not-scrollable::before,
    .event-strip-wrap.is-not-scrollable::after {
      opacity: 0;
    }

    .event-card {
      min-width: 156px;
      min-height: 148px;
      display: grid;
      grid-template-columns: 1fr 52px;
      grid-template-rows: auto auto 1fr;
      gap: 7px;
      align-items: center;
      padding: 16px;
      border-radius: 16px;
      color: var(--text);
      text-align: left;
      background: rgba(255, 255, 255, 0.72);
      border-color: rgba(255, 255, 255, 0.72);
      box-shadow: 0 1px 5px rgba(15, 23, 42, 0.08);
    }

    .event-card.is-active {
      background: #ffffff;
      border-color: #fdba74;
      box-shadow: 0 16px 36px rgba(255, 107, 22, 0.14);
    }

    .event-day {
      color: #94a3b8;
      font-size: 13px;
      font-weight: 650;
      letter-spacing: 0.04em;
    }

    .event-type {
      color: #1e293b;
      font-size: 14px;
      font-weight: 750;
    }

    .event-time {
      align-self: end;
      color: #020617;
      font-size: 24px;
      font-weight: 850;
      letter-spacing: -0.04em;
    }

    .event-quality {
      grid-column: 1;
      color: #64748b;
      margin-top: 1px;
      font-size: 12px;
      align-self: start;
    }

    .mini-badge {
      grid-column: 2;
      grid-row: 1 / span 2;
      justify-self: end;
      width: 52px;
      height: 52px;
      border-radius: 18px;
      display: grid;
      place-items: center;
      color: #ffffff;
      background: linear-gradient(135deg, #fb923c, #f43f5e);
      box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
      font-size: 11px;
      font-weight: 900;
      letter-spacing: 0.04em;
    }

    .mini-badge .sun-icon {
      width: 30px;
      height: 30px;
    }

    .event-badge.tone-excellent,
    .mini-badge.tone-excellent {
      background: linear-gradient(135deg, #fb923c, #f43f5e);
    }

    .event-badge.tone-great,
    .mini-badge.tone-great {
      background: linear-gradient(135deg, #fbbf24, #f97316);
    }

    .event-badge.tone-good,
    .mini-badge.tone-good {
      background: linear-gradient(135deg, #fde047, #f59e0b);
    }

    .event-badge.tone-okay,
    .mini-badge.tone-okay {
      background: linear-gradient(135deg, #cbd5e1, #64748b);
    }

    .event-badge.tone-poor,
    .mini-badge.tone-poor {
      background: linear-gradient(135deg, #64748b, #334155);
    }

    .score-ring {
      --size: 48px;
      --ring: #f97316;
      grid-column: 2;
      grid-row: 3 / span 2;
      justify-self: end;
      width: var(--size);
      height: var(--size);
      border-radius: 999px;
      display: grid;
      place-items: center;
      background: conic-gradient(var(--ring) calc(var(--score) * 1%), #e7edf4 0);
      position: relative;
    }

    .score-ring::after {
      content: "";
      position: absolute;
      inset: 7px;
      border-radius: inherit;
      background: #ffffff;
    }

    .score-ring strong {
      position: relative;
      z-index: 1;
      color: #0f172a;
      font-size: 14px;
      line-height: 1;
    }

    .score-ring.large {
      --size: 80px;
    }

    .score-ring.large strong {
      font-size: 26px;
    }

    .score-ring.tone-excellent,
    .score-ring.tone-great,
    .score-ring.tone-good {
      --ring: #f97316;
    }

    .score-ring.tone-okay,
    .score-ring.tone-poor {
      --ring: #64748b;
    }

    .detail-grid {
      display: grid;
      grid-template-columns: minmax(0, 1fr);
      gap: 16px;
      margin-top: 18px;
    }

    .detail-panel {
      display: none;
      grid-column: 1 / -1;
    }

    .detail-panel.is-active {
      display: block;
    }

    .detail-content {
      display: grid;
      grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
      gap: 16px;
    }

    .selected-card,
    .detail-card {
      border-radius: 12px;
      padding: 20px;
      box-shadow: 0 1px 8px rgba(15, 23, 42, 0.08);
    }

    .selected-top {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      align-items: start;
      margin-bottom: 14px;
    }

    .kicker {
      color: var(--accent);
      font-size: 14px;
      font-weight: 750;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .selected-title {
      margin: 0;
      color: #0f172a;
      font-size: 24px;
      line-height: 1.1;
      letter-spacing: -0.03em;
    }

    .selected-copy {
      max-width: 590px;
      margin: 10px 0 28px;
      color: #475569;
      font-size: 16px;
      line-height: 1.4;
    }

    .metric-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px;
    }

    .metric {
      border-radius: 16px;
      padding: 16px;
      background: #f8fafc;
    }

    .metric-label {
      color: #94a3b8;
      font-size: 12px;
      font-weight: 850;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      margin-bottom: 10px;
    }

    .metric-value {
      color: #0f172a;
      font-size: 20px;
      font-weight: 850;
      letter-spacing: -0.03em;
    }

    .detail-card {
      color: #e5e7eb;
      background: #020617;
      border-color: #0f172a;
    }

    .detail-card h3 {
      margin: 0 0 14px;
      color: #ffffff;
      font-size: 18px;
      letter-spacing: -0.02em;
    }

    .detail-card p {
      margin: 0 0 24px;
      color: #cbd5e1;
      font-size: 14px;
      line-height: 1.45;
    }

    .bar-list {
      display: grid;
      gap: 13px;
    }

    .bar-head {
      display: flex;
      justify-content: space-between;
      gap: 14px;
      color: #dbe4f0;
      font-size: 14px;
      margin-bottom: 6px;
    }

    .bar-track {
      height: 8px;
      border-radius: 999px;
      background: #172033;
      overflow: hidden;
    }

    .bar-fill {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: #ffffff;
    }

    .empty {
      min-height: 300px;
      display: grid;
      place-items: center;
      color: #64748b;
      text-align: center;
      font-size: 17px;
    }

    .empty strong {
      display: block;
      color: #0f172a;
      font-size: 28px;
      margin-bottom: 8px;
    }

    .popular-cities {
      margin-top: 20px;
    }

    .popular-cities .location-panel {
      border-bottom: 0;
    }

    .city-links {
      margin-top: 14px;
      padding-bottom: 2px;
    }

    .city-link {
      min-width: 150px;
      min-height: 84px;
      display: grid;
      grid-template-columns: 1fr;
      grid-template-rows: auto auto;
      align-content: start;
      gap: 8px;
      padding: 16px;
      text-decoration: none;
    }

    .city-link:hover,
    .city-link.is-active {
      border-color: #fdba74;
      box-shadow: 0 10px 24px rgba(255, 107, 22, 0.12);
    }

    .city-link span {
      font-size: 15px;
      font-weight: 850;
    }

    .error {
      border: 1px solid rgba(180, 35, 24, 0.20);
      background: #fff1f0;
      padding: 14px 16px;
      border-radius: 12px;
      margin-bottom: 18px;
    }

    .loading-overlay {
      position: fixed;
      inset: 0;
      z-index: 100;
      display: none;
      place-items: center;
      padding: 24px;
      background: rgba(248, 250, 252, 0.78);
      opacity: 0;
      pointer-events: none;
      transition: opacity 180ms ease;
    }

    .loading-overlay.is-visible {
      display: grid;
      opacity: 1;
      pointer-events: auto;
    }

    .loading-box {
      display: grid;
      justify-items: center;
      gap: 16px;
      width: min(320px, 100%);
      padding: 28px;
      border: 1px solid var(--line);
      border-radius: 18px;
      background: #ffffff;
      box-shadow: 0 26px 80px rgba(15, 23, 42, 0.16);
      text-align: center;
    }

    .spinner {
      width: 54px;
      height: 54px;
      border-radius: 999px;
      border: 5px solid #e7edf4;
      border-top-color: var(--accent);
      animation: spin 0.82s linear infinite;
    }

    .loading-title {
      color: #0f172a;
      font-size: 20px;
      font-weight: 850;
      letter-spacing: -0.02em;
    }

    .loading-text {
      color: #64748b;
      font-size: 14px;
      line-height: 1.45;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    .click-note::after {
      content: "›";
      color: #64748b;
      font-size: 26px;
      line-height: 1;
    }

    @media (max-width: 920px) {
      .search-form,
      .detail-content {
        grid-template-columns: 1fr;
      }

      .hero {
        display: block;
      }

      .best-card {
        max-width: 360px;
        width: auto;
        margin-top: 18px;
      }

      .forecast-header {
        display: block;
      }

      .click-note {
        margin-top: 8px;
        white-space: normal;
      }
    }

    @media (max-width: 620px) {
      .page {
        padding: 18px 14px 32px;
      }

      h1 {
        font-size: 42px;
      }

      .event-strip {
        margin-left: -14px;
        margin-right: -14px;
        padding-left: 14px;
        padding-right: 14px;
      }

      .event-strip-wrap::after {
        right: -14px;
        width: 72px;
      }

      .event-strip-wrap::before {
        right: 2px;
      }

      .event-card {
        min-width: 148px;
      }

      .metric-grid {
        grid-template-columns: 1fr;
      }

      .selected-top {
        display: block;
      }

      .selected-top .score-ring {
        margin-top: 16px;
      }
    }
