:root {
  --bg: #f4efe6;
  --surface: rgba(255, 251, 245, 0.86);
  --surface-strong: rgba(255, 248, 238, 0.95);
  --surface-muted: rgba(244, 239, 230, 0.72);
  --ink: #1f1e1a;
  --muted: #5f5a4f;
  --accent: #0d6b69;
  --accent-strong: #12484f;
  --accent-soft: rgba(13, 107, 105, 0.12);
  --warm: #ba6f33;
  --warm-soft: rgba(186, 111, 51, 0.12);
  --danger: #9d2f2f;
  --danger-soft: rgba(157, 47, 47, 0.12);
  --svc-spotify: #6f8f7b;
  --svc-spotify-soft: #e8f0eb;
  --svc-spotify-border: #bdd0c2;
  --svc-spotify-text: #315044;
  --line: rgba(31, 30, 26, 0.12);
  --shadow: 0 24px 60px rgba(28, 24, 18, 0.14);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --day-card-height: 11rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(13, 107, 105, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(186, 111, 51, 0.18), transparent 24%),
    linear-gradient(180deg, #fbf4e9 0%, #f0e5d3 100%);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(1440px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 1fr);
  grid-template-areas:
    "hero filters"
    "location location";
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.hero-copy,
.location-card,
.listening-card,
.calendar-panel,
.day-drawer,
.event-modal,
.month-section {
  backdrop-filter: blur(18px);
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: var(--shadow);
}

.hero-copy {
  grid-area: hero;
  border-radius: var(--radius-xl);
  min-height: 100%;
  padding: 1.65rem 1.85rem;
  position: relative;
  overflow: hidden;
  align-self: start;
}

.hero-copy::after {
  content: "";
  position: absolute;
  inset: auto -12% -35% auto;
  width: 14rem;
  height: 14rem;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(13, 107, 105, 0.18), transparent 70%);
}

.eyebrow,
.calendar-kicker,
.drawer-kicker,
.modal-kicker,
.meta-label,
.month-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--muted);
}

.hero h1,
.calendar-title-group h2,
.day-drawer h3,
.event-modal h3,
.month-section h3 {
  margin: 0;
  font-family: "Fraunces", serif;
  line-height: 0.95;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6rem);
}

.hero-text {
  max-width: 38rem;
  margin: 0.9rem 0 0;
  font-size: 1.02rem;
  line-height: 1.58;
  color: var(--muted);
}

.location-card,
.listening-card {
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.15rem;
}

.location-card {
  grid-area: location;
  display: grid;
  gap: 0.65rem;
}

.listening-card {
  grid-area: filters;
  display: grid;
  gap: 0.95rem;
}

.location-card-header,
.spotify-card-header,
.sync-strip {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.9rem;
}

.listening-card-header {
  display: grid;
  gap: 0.7rem;
}

.listening-title {
  display: block;
  font-family: "Fraunces", serif;
  font-size: 1.55rem;
  line-height: 0.98;
}

.spotify-header-copy {
  display: grid;
  gap: 0.38rem;
  justify-items: start;
}

.provider-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.34rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--chip-border, rgba(31, 30, 26, 0.1));
  background: var(--chip-bg, rgba(255, 255, 255, 0.65));
  color: var(--chip-text, var(--muted));
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1;
}

.provider-chip--spotify {
  --chip-bg: rgba(108, 185, 127, 0.14);
  --chip-border: rgba(108, 185, 127, 0.26);
  --chip-text: #2f6a45;
}

#spotify-status {
  display: block;
}

.listening-provider {
  display: grid;
  gap: 0.8rem;
  padding: 0.9rem;
  border-radius: calc(var(--radius-lg) - 4px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.18));
  border: 1px solid rgba(31, 30, 26, 0.08);
}

.listening-provider .meta-note {
  margin-top: 0;
}

.location-use-button,
.location-search-submit,
.spotify-connect-button,
.spotify-action-button,
.spotify-secondary-button {
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
}

.location-use-button {
  flex-shrink: 0;
  padding: 0.55rem 0.85rem;
}

.location-search-form {
  margin: 0;
  width: 100%;
  max-width: 24rem;
}

.location-search-form,
.location-feedback,
.location-suggestions,
.location-recent {
  max-width: min(100%, 70rem);
}

.location-toolbar {
  display: grid;
  grid-template-columns: minmax(15rem, 24rem) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: center;
}

.location-search-row {
  position: relative;
}

.location-search-input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.8rem 3.9rem 0.8rem 0.95rem;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.location-search-input:focus-visible {
  outline: 2px solid rgba(13, 107, 105, 0.22);
  outline-offset: 1px;
}

.location-search-submit {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  width: 2.8rem;
  height: 2.8rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--accent-strong);
  transform: translateY(-50%);
}

.location-search-submit:hover,
.location-search-submit:focus-visible {
  background: rgba(13, 107, 105, 0.08);
  transform: translateY(-50%) scale(1.03);
  outline: none;
}

.location-search-submit:disabled {
  cursor: default;
  opacity: 0.7;
}

.location-search-icon {
  width: 1.1rem;
  height: 1.1rem;
  display: block;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2312484f' stroke-width='2.1' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='M20 20l-4.35-4.35'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.location-search-submit.is-loading .location-search-icon {
  width: 1rem;
  height: 1rem;
  background-image: none;
  border-radius: 999px;
  border: 2px solid rgba(13, 107, 105, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.spotify-connect-button,
.spotify-action-button,
.spotify-secondary-button {
  padding: 0.68rem 0.92rem;
}

.spotify-secondary-button {
  padding: 0.36rem 0.68rem;
  border: 1px solid rgba(95, 90, 79, 0.12);
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
}

.spotify-connect-button.is-secondary {
  border: 1px solid rgba(95, 90, 79, 0.12);
  background: rgba(255, 255, 255, 0.56);
  color: var(--accent-strong);
}

.spotify-actions {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  justify-content: flex-end;
  gap: 0.55rem;
}

.listening-scope-panel {
  display: grid;
  gap: 0.72rem;
  justify-items: stretch;
}

.listening-scope-groups {
  display: grid;
  gap: 0.55rem;
  width: min(100%, 44rem);
}

.listening-provider .listening-scope-panel {
  margin-top: 0.15rem;
}

.listening-scope-group-label {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.spotify-filter-toggle-row {
  appearance: none;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(31, 30, 26, 0.08);
  background: rgba(255, 255, 255, 0.56);
  text-align: left;
  transition: transform 140ms ease, background 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.spotify-filter-toggle-row:hover,
.spotify-filter-toggle-row:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(13, 107, 105, 0.16);
  box-shadow: 0 12px 26px rgba(31, 30, 26, 0.05);
  outline: none;
}

.spotify-filter-toggle-row.is-active {
  background: rgba(13, 107, 105, 0.09);
  border-color: rgba(13, 107, 105, 0.18);
}

.spotify-filter-toggle-row:disabled {
  cursor: default;
  opacity: 0.68;
  transform: none;
  box-shadow: none;
}

.spotify-filter-toggle-copy {
  display: grid;
  gap: 0;
  min-width: 0;
}

.spotify-filter-toggle-title {
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.spotify-filter-switch {
  width: 3.3rem;
  height: 1.95rem;
  padding: 0.2rem;
  border-radius: 999px;
  background: rgba(95, 90, 79, 0.2);
  box-shadow: inset 0 0 0 1px rgba(95, 90, 79, 0.08);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.spotify-filter-switch-thumb {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 7px 18px rgba(31, 30, 26, 0.16);
  transition: transform 180ms ease;
}

.spotify-filter-toggle-row.is-active .spotify-filter-switch {
  background: rgba(13, 107, 105, 0.3);
  box-shadow: inset 0 0 0 1px rgba(13, 107, 105, 0.18);
}

.spotify-filter-toggle-row.is-active .spotify-filter-switch-thumb {
  transform: translateX(1.35rem);
}

.spotify-scope-chooser {
  display: grid;
  gap: 0;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition: max-height 220ms ease, opacity 180ms ease, transform 180ms ease, margin-top 180ms ease;
  margin-top: 0;
  pointer-events: none;
}

.spotify-scope-chooser.is-active {
  max-height: 7rem;
  opacity: 1;
  transform: translateY(0);
  margin-top: 0.2rem;
  pointer-events: auto;
}

.spotify-scope-chooser .segmented-control-secondary {
  gap: 0.6rem;
}

.spotify-scope-chooser .segmented-control-secondary .segment-button {
  padding: 0.5rem 0.86rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.74);
  color: var(--accent-strong);
  border: 1px solid rgba(13, 107, 105, 0.08);
}

.spotify-scope-chooser .segmented-control-secondary .segment-button:hover,
.spotify-scope-chooser .segmented-control-secondary .segment-button:focus-visible {
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(13, 107, 105, 0.16);
}

.spotify-scope-chooser .segmented-control-secondary .segment-button.is-active {
  background: var(--svc-spotify-soft);
  border-color: var(--svc-spotify-border);
  color: var(--svc-spotify-text);
}

.listening-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.55rem;
}

.spotify-feedback,
.stream-feedback {
  padding: 0.62rem 0.76rem;
  border-radius: var(--radius-md);
  background: rgba(13, 107, 105, 0.08);
  border: 1px solid rgba(13, 107, 105, 0.14);
  color: var(--accent-strong);
  font-size: 0.82rem;
  line-height: 1.45;
}

.spotify-feedback.is-error,
.stream-feedback.is-error {
  background: rgba(157, 47, 47, 0.08);
  border-color: rgba(157, 47, 47, 0.16);
  color: var(--danger);
}

.location-suggestions {
  display: grid;
  gap: 0.45rem;
}

.location-suggestion {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.7rem 0.8rem;
  background: rgba(255, 255, 255, 0.62);
  text-align: left;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.location-suggestion:hover,
.location-suggestion:focus-visible {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(13, 107, 105, 0.22);
  outline: none;
}

.location-suggestion-label {
  display: block;
  font-weight: 600;
}

.location-suggestion-note {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.45;
}

.location-feedback {
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius-md);
  background: rgba(13, 107, 105, 0.08);
  border: 1px solid rgba(13, 107, 105, 0.14);
  color: var(--accent-strong);
  font-size: 0.86rem;
  line-height: 1.45;
}

.location-feedback.is-error {
  background: rgba(157, 47, 47, 0.08);
  border-color: rgba(157, 47, 47, 0.16);
  color: var(--danger);
}

.location-recent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  justify-self: end;
  gap: 0.45rem;
  min-width: 0;
}

.location-chip-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.location-chip {
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.72rem;
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  transition: transform 140ms ease, background 140ms ease;
}

.location-chip:hover,
.location-use-button:hover {
  transform: translateY(-1px);
}

.sync-refresh-button {
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
  transition: transform 140ms ease, background 140ms ease, opacity 140ms ease;
  flex-shrink: 0;
}

.sync-refresh-button:disabled {
  cursor: default;
  opacity: 0.7;
}

.meta-label,
.meta-note {
  display: block;
}

.meta-note {
  margin-top: 0.55rem;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.94rem;
}

.calendar-layout {
  display: block;
}

.calendar-panel,
.day-drawer {
  border-radius: var(--radius-xl);
  padding: 1.2rem;
}

.stream-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem);
  gap: 1rem;
  align-items: start;
  margin-bottom: 1.25rem;
}

.calendar-title-group h2 {
  font-size: clamp(2rem, 5vw, 3rem);
}

.stream-note {
  margin: 0.65rem 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.sync-strip {
  padding: 0.9rem 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(31, 30, 26, 0.08);
}

.sync-strip-copy {
  display: grid;
  gap: 0.22rem;
}

.sync-strip-detail {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.segmented-control {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.segment-button {
  border: 0;
  border-radius: 999px;
  padding: 0.52rem 0.78rem;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, opacity 140ms ease;
}

.segmented-control-primary .segment-button {
  padding: 0.58rem 0.92rem;
  font-size: 0.98rem;
}

.segmented-control-secondary .segment-button {
  padding: 0.36rem 0.68rem;
  font-size: 0.74rem;
  font-weight: 500;
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid transparent;
  letter-spacing: 0.04em;
}

.segmented-control-secondary {
  padding: 0;
  border-radius: 999px;
  background: transparent;
  border: 0;
  gap: 0.45rem;
}

.segment-button:hover,
.segment-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  outline: none;
}

.segment-button.is-active {
  background: var(--accent);
  color: white;
}

.segmented-control-secondary .segment-button:hover,
.segmented-control-secondary .segment-button:focus-visible {
  background: rgba(13, 107, 105, 0.08);
  border-color: rgba(13, 107, 105, 0.12);
  color: var(--accent-strong);
}

.segmented-control-secondary .segment-button.is-active {
  background: var(--svc-spotify-soft);
  border-color: var(--svc-spotify-border);
  color: var(--accent-strong);
  box-shadow: none;
}

.segment-button:disabled,
.spotify-connect-button:disabled,
.spotify-action-button:disabled,
.spotify-secondary-button:disabled,
.spotify-filter-toggle-row:disabled {
  cursor: default;
  opacity: 0.62;
  transform: none;
}

.month-sections {
  display: grid;
  gap: 1rem;
}

.month-section {
  border-radius: var(--radius-xl);
  padding: 1rem;
}

.month-section-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.month-status-chip,
.retry-button,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 0;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.month-status-chip,
.retry-button {
  padding: 0.45rem 0.8rem;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.retry-button {
  transition: transform 140ms ease, background 140ms ease;
}

.retry-button:hover,
.drawer-close:hover,
.modal-close:hover,
.sync-refresh-button:hover,
.spotify-connect-button:hover,
.spotify-action-button:hover,
.spotify-secondary-button:hover,
.ticket-link:hover,
.source-link:hover,
.pill:hover,
.drawer-pill:hover,
.day-expand-trigger:hover {
  transform: translateY(-1px);
}

.month-error {
  color: var(--danger);
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 248, 248, 0.8);
  border: 1px solid rgba(157, 47, 47, 0.16);
}

.month-grid-shell {
  overflow-x: auto;
  padding-bottom: 0.2rem;
}

.weekday-row,
.day-stream-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.75rem;
  min-width: 980px;
}

.weekday-row {
  margin-bottom: 0.5rem;
}

.weekday-slot {
  padding: 0 0.25rem;
  font-size: 0.73rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-spacer {
  min-height: var(--day-card-height);
  border-radius: var(--radius-lg);
  background: transparent;
  border: 0;
}

.day-cell {
  height: var(--day-card-height);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.8rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  position: relative;
  overflow: hidden;
}

.day-cell.today {
  border-color: rgba(13, 107, 105, 0.4);
  box-shadow: inset 0 0 0 1px rgba(13, 107, 105, 0.18);
}

.day-cell-loading {
  background: var(--surface-muted);
}

.day-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
}

.day-heading {
  display: grid;
  gap: 0.18rem;
}

.day-weekday {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.day-number {
  font-family: "Fraunces", serif;
  font-size: 1.45rem;
  line-height: 1;
}

.day-expand-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  border: 0;
  padding: 0.18rem;
  border-radius: 999px;
  background: transparent;
  transition: background 180ms ease, box-shadow 180ms ease, transform 140ms ease;
}

.day-expand-trigger:hover,
.day-expand-trigger:focus-visible {
  background: rgba(255, 250, 243, 0.98);
  box-shadow: 0 10px 20px rgba(31, 30, 26, 0.08);
  outline: none;
}

.day-expand-count {
  padding: 0 0.6rem 0 0.8rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.day-expand-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 250, 243, 0.95);
  border: 2px solid rgba(95, 90, 79, 0.72);
  transition: background 180ms ease, border-color 180ms ease;
}

.day-expand-trigger:hover .day-expand-icon,
.day-expand-trigger:focus-visible .day-expand-icon {
  background: white;
  border-color: rgba(95, 90, 79, 0.9);
}

.expand-icon {
  width: 1rem;
  height: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ba6f33' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 11L20 4'/%3E%3Cpath d='M15.5 4H20v4.5'/%3E%3Cpath d='M11 13L4 20'/%3E%3Cpath d='M4 15.5V20h4.5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.day-empty-state {
  font-size: 0.72rem;
  color: rgba(95, 90, 79, 0.72);
}

.pill-stack {
  display: grid;
  gap: 0.35rem;
  align-content: start;
  min-height: 0;
  overflow: hidden;
}

.pill,
.drawer-pill {
  border: 0;
  width: 100%;
  text-align: left;
  padding: 0.42rem 0.55rem;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, rgba(13, 107, 105, 0.12), rgba(13, 107, 105, 0.03));
  color: var(--ink);
  transition: transform 140ms ease, box-shadow 140ms ease;
}

.pill.is-sold-out,
.drawer-pill.is-sold-out {
  background: linear-gradient(135deg, rgba(157, 47, 47, 0.14), rgba(157, 47, 47, 0.04));
}

.pill-title-row,
.drawer-pill-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.drawer-pill-title-group {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  min-width: 0;
  flex-wrap: wrap;
  max-width: 100%;
}

.pill-title,
.drawer-pill-title {
  display: block;
  font-size: 0.84rem;
  line-height: 1.25;
  font-weight: 500;
}

.pill-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.pill-subtitle,
.drawer-pill-subtitle {
  display: block;
  margin-top: 0.18rem;
  font-size: 0.74rem;
  color: var(--muted);
}

.pill-subtitle.is-match,
.drawer-pill-subtitle.is-match {
  color: var(--accent-strong);
}

.drawer-pill-support-row {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
  margin-top: 0.3rem;
  max-width: 100%;
}

.status-badge {
  padding: 0.26rem 0.5rem;
}

.status-badge-compact {
  padding: 0.16rem 0.34rem;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.status-badge.sold-out {
  background: var(--danger-soft);
  color: var(--danger);
}

.status-badge.available {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.more-label,
.empty-copy {
  font-size: 0.76rem;
  color: var(--muted);
}

.day-loading {
  display: grid;
  gap: 0.5rem;
  align-content: start;
  padding-top: 0.15rem;
}

.loading-spinner {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  border: 2px solid rgba(13, 107, 105, 0.18);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

.loading-line {
  height: 0.65rem;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(13, 107, 105, 0.1) 0%,
    rgba(13, 107, 105, 0.22) 50%,
    rgba(13, 107, 105, 0.1) 100%
  );
  background-size: 220% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
}

.loading-line-short {
  width: 58%;
}

.loading-line-tiny {
  width: 2rem;
}

.load-sentinel {
  height: 2px;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: transparent;
  z-index: 20;
}

.day-drawer {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: min(25rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  display: flex;
  flex-direction: column;
  z-index: 25;
}

.drawer-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.drawer-body {
  padding-top: 1rem;
  min-height: 18rem;
  overflow: hidden;
}

.drawer-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.drawer-list {
  display: grid;
  gap: 0.7rem;
  max-height: calc(100vh - 12rem);
  overflow-y: auto;
  padding-right: 0.2rem;
}

.drawer-pill-support {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.45;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 15, 12, 0.48);
  display: grid;
  place-items: center;
  padding: 1.5rem;
  z-index: 40;
}

.event-modal {
  width: min(34rem, 100%);
  max-height: calc(100vh - 3rem);
  border-radius: var(--radius-xl);
  padding: 1.4rem;
  position: relative;
  overflow-y: auto;
}

.modal-close,
.drawer-close,
.sync-refresh-button {
  border: 0;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 0.55rem 0.85rem;
  transition: transform 140ms ease, background 140ms ease;
}

.event-modal h3 {
  font-size: clamp(2rem, 6vw, 3rem);
  margin-top: 0.5rem;
  padding-right: 0;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
  padding-right: 5rem;
}

.modal-supporting {
  margin-top: 0.9rem;
  padding: 0.8rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.modal-supporting-label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.28rem;
}

.modal-supporting-copy {
  display: block;
  line-height: 1.55;
}

.modal-supporting-row {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  flex-wrap: wrap;
  max-width: 100%;
}

.match-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.11rem 0.38rem;
  border: 1px solid var(--match-badge-border, var(--svc-spotify-border));
  background: var(--match-badge-bg, var(--svc-spotify-soft));
  color: var(--match-badge-text, var(--svc-spotify-text));
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1.1;
}

.match-badge--compact {
  padding: 0.1rem 0.34rem;
}

.match-badge--modal {
  margin-top: 0;
  padding: 0.12rem 0.38rem;
}

.match-badge--spotify {
  --match-badge-bg: var(--svc-spotify-soft);
  --match-badge-border: var(--svc-spotify-border);
  --match-badge-text: var(--svc-spotify-text);
}

.modal-details {
  margin-top: 1.2rem;
  display: grid;
  gap: 0.85rem;
}

.detail-row {
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

.detail-label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 0.35rem;
}

.detail-row-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.availability-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  flex-wrap: wrap;
}

.availability-copy {
  display: flex;
  align-items: center;
  min-height: 2.5rem;
  min-width: 0;
}

.modal-time-summary {
  line-height: 1.45;
}

.modal-refresh-note {
  margin-top: 0.55rem;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.79rem;
}

.modal-time-grid {
  margin-top: 0.7rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.3rem 0.8rem;
  align-items: center;
}

.modal-time-label {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.modal-time-value {
  font-weight: 500;
}

.modal-time-loading {
  display: block;
  width: min(8rem, 100%);
  max-width: 100%;
}

.modal-time-loading-short {
  width: min(6rem, 100%);
}

.modal-time-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.time-assumption-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.16rem 0.45rem;
  border-radius: 999px;
  background: var(--warm-soft);
  color: var(--warm);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-footer-meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
}

.modal-source-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.modal-source-note {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.modal-source-name {
  color: var(--ink);
  font-weight: 500;
}

.modal-pending-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.38rem 0.72rem;
  border-radius: 999px;
  background: rgba(95, 90, 79, 0.1);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
}

.modal-inline-spinner {
  width: 0.82rem;
  height: 0.82rem;
  border-width: 1.8px;
}

.ticket-link,
.source-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.1rem;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease;
  white-space: nowrap;
}

.ticket-link {
  background: var(--accent);
  color: white;
  font-weight: 600;
}

.source-link {
  background: var(--warm-soft);
  color: var(--warm);
}

.source-link-subtle {
  padding: 0.5rem 0.82rem;
  background: rgba(95, 90, 79, 0.1);
  color: var(--muted);
}

.source-link-subtle:hover,
.source-link-subtle:focus-visible {
  background: rgba(95, 90, 79, 0.18);
  color: var(--ink);
}

.ticket-link[aria-disabled="true"],
.source-link[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.6;
}

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

@keyframes shimmer {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: -100% 0;
  }
}

@media (max-width: 1080px) {
  .hero,
  .stream-header {
    grid-template-columns: 1fr;
  }

  .hero {
    grid-template-areas:
      "hero"
      "filters"
      "location";
  }

  .day-drawer {
    width: min(24rem, calc(100vw - 1rem));
  }
}

@media (max-width: 720px) {
  .app-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 0.8rem;
  }

  .hero-copy,
  .location-card,
  .listening-card,
  .calendar-panel,
  .day-drawer,
  .event-modal,
  .month-section {
    border-radius: 22px;
  }

  .hero-copy {
    padding: 1.4rem;
  }

  .location-card-header,
  .spotify-card-header,
  .sync-strip {
    flex-direction: column;
  }

  .location-use-button,
  .sync-refresh-button,
  .spotify-connect-button,
  .spotify-action-button,
  .spotify-secondary-button {
    width: 100%;
    justify-content: center;
  }

  .location-recent {
    justify-content: flex-start;
    justify-self: start;
  }

  .location-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .location-search-form {
    max-width: 100%;
  }

  .listening-card-header,
  .listening-card-footer {
    gap: 0.75rem;
  }

  .spotify-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .spotify-filter-toggle-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .calendar-panel,
  .day-drawer,
  .month-section {
    padding: 0.95rem;
  }

  .day-stream-grid {
    min-width: 780px;
  }

  .day-cell {
    height: 10rem;
    padding: 0.7rem 0.65rem;
  }

  .weekday-row {
    min-width: 780px;
  }

  .day-expand-count {
    padding-left: 0.65rem;
  }

  .detail-row-split {
    align-items: start;
    flex-direction: column;
  }

  .availability-row,
  .modal-footer-meta {
    align-items: start;
    flex-direction: column;
  }

  .availability-row .ticket-link {
    width: 100%;
  }

  .day-drawer {
    right: 0.5rem;
    left: 0.5rem;
    bottom: 0.5rem;
    width: auto;
    max-height: 74vh;
  }
}
