:root {
  --shell-max: 1760px;
  --shell-pad: clamp(0.75rem, 1.6vw, 1.5rem);
  --bg: radial-gradient(circle at 18% 8%, #ffc08a 0, #ffc08a00 30%),
    radial-gradient(circle at 80% 0, #9de3ff 0, #9de3ff00 28%),
    linear-gradient(160deg, #0e1b25 0%, #172d3b 55%, #1f2937 100%);
  --card: #f7f9fb;
  --ink: #112136;
  --muted: #5a6a7c;
  --accent: #ff6f3c;
  --p1: #f85f5c;
  --p2: #ffbb28;
  --p3: #48a8ff;
}

* {
  box-sizing: border-box;
}

body {
  position: relative;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  background-attachment: fixed;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: #eff4fb;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("/assets/festival-crowd.webp");
  background-image: image-set(
    url("/assets/festival-crowd.avif") type("image/avif") 1x,
    url("/assets/festival-crowd.webp") type("image/webp") 1x
  );
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  mix-blend-mode: soft-light;
  filter: saturate(0.9) contrast(1.03);
}

body > *:not(#authDrawerRoot) {
  position: relative;
  z-index: 1;
}

main {
  flex: 1 0 auto;
  width: 100%;
  margin-bottom: 0;
}

#authDrawerRoot {
  position: static;
  z-index: auto;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, #0f1d28 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, #8cb4d6 35%, transparent);
}

.topbar-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0.6rem var(--shell-pad);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.brand-link {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 8px;
  background: #ff6f3c;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
}

.brand-text {
  font-size: 0.92rem;
  font-weight: 700;
  color: #eaf2fb;
}

.topbar-center {
  flex: 1 1 auto;
  min-width: 0;
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-left: auto;
}

.header-auth-btn {
  min-width: 6.4rem;
  background: #e8eff7;
  color: #1e3652;
}

.header-auth-btn:hover {
  background: #f2f7ff;
}

.header-create-btn {
  min-width: 9.2rem;
  border: 1px solid #ff9b72;
  background: linear-gradient(180deg, #ff8452 0%, #ff6f3c 100%);
  color: #fff;
  font-weight: 800;
}

.header-create-btn:hover {
  background: linear-gradient(180deg, #ff8f61 0%, #ff7848 100%);
}

.hero {
  padding: 1.25rem var(--shell-pad) 0.85rem;
  max-width: var(--shell-max);
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
  color: #ffbe8f;
}

h1 {
  margin: 0.45rem 0;
  font-size: clamp(1.7rem, 3.2vw, 2.7rem);
}

.subtext {
  color: #c5d5e7;
  max-width: 48rem;
  margin: 0;
  text-wrap: pretty;
}

.home-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 var(--shell-pad) clamp(3.4rem, 9vh, 6rem);
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.legal-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem var(--shell-pad) clamp(3.4rem, 9vh, 6rem);
  align-content: start;
}

.legal-panel h1 {
  margin-top: 0;
}

.legal-panel h2 {
  margin-bottom: 0.45rem;
}

.site-footer {
  border-top: 1px solid color-mix(in srgb, #8cb4d6 30%, transparent);
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, #0f1d28 84%, transparent);
  margin-top: auto;
}

.site-footer-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 1rem var(--shell-pad) 1.2rem;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 0.85rem;
  align-items: start;
}

.site-footer-brand strong {
  color: #eaf2fb;
}

.site-footer-brand p {
  margin: 0.28rem 0 0;
  color: #b7c9dc;
  font-size: 0.84rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  justify-content: flex-end;
}

.site-footer-links a {
  color: #d8e7f7;
  text-decoration: none;
  font-size: 0.84rem;
}

.site-footer-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.site-footer-meta {
  grid-column: 1 / -1;
  margin: 0;
  color: #a9c0d7;
  font-size: 0.78rem;
}

.home-search-panel label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.create-panel label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.result-list {
  display: grid;
  gap: 0.6rem;
}

.result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border: 1px solid #d8e4f2;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  background: #fcfeff;
}

.result-card h3 {
  margin: 0;
}

.result-open {
  text-decoration: none;
  border-radius: 10px;
  background: #ff6f3c;
  color: #fff;
  font-weight: 700;
  padding: 0.45rem 0.62rem;
  flex-shrink: 0;
}

.empty-state {
  border: 1px dashed #d4e2f2;
  border-radius: 12px;
  padding: 0.8rem;
  background: #f9fcff;
}

.admin-list {
  display: grid;
  gap: 0.48rem;
}

.admin-list-item {
  border: 1px solid #d7e4f2;
  border-radius: 12px;
  padding: 0.62rem 0.68rem;
  background: #fbfdff;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.65rem;
}

.admin-list-item h3 {
  margin: 0;
  font-size: 1rem;
}

.admin-list-item p {
  margin: 0.22rem 0 0;
}

.admin-role-controls {
  display: grid;
  gap: 0.34rem;
  width: 170px;
}

.admin-delete-btn {
  background: #fff;
  color: #a11d1d;
  border: 1px solid #e5a7a7;
  min-width: 94px;
}

.admin-delete-btn:hover {
  background: #fff0f0;
}

.layout {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--shell-pad) clamp(3.4rem, 9vh, 6rem);
  display: grid;
  grid-template-columns: minmax(255px, 300px) minmax(0, 1fr);
  gap: 0.85rem;
  align-content: start;
}

.panel {
  background: var(--card);
  color: var(--ink);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: 0 18px 45px rgba(9, 17, 29, 0.3);
}

.controls label {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

select,
input,
button {
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 0.95rem;
  padding: 0.55rem 0.7rem;
  max-width: 100%;
  min-width: 0;
}

select,
input {
  width: 100%;
}

input[type="checkbox"] {
  width: auto;
}

button {
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  font-weight: 700;
}

button.ghost {
  background: #e8eff7;
  color: #213a55;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button.is-disabled-look {
  background: #e9eff7;
  color: #6d7f93;
  border: 1px solid #ccdaea;
}

button.is-disabled-look:hover {
  background: #e9eff7;
}

.like-social-btn {
  background: #ffffff;
  color: #23415f;
  border: 1px solid #9cb4cc;
  min-width: 6.1rem;
}

.like-social-btn:hover {
  background: #edf4fc;
  border-color: #7f9fbe;
}

.like-social-btn.is-liked {
  background: #ffedf2;
  color: #9b2041;
  border: 1px solid #e8a4b6;
}

.like-social-btn.is-liked:hover {
  background: #ffe4eb;
  border-color: #df8fa7;
}

.like-social-btn.is-disabled-look {
  background: #eef2f8;
  color: #7b8ea2;
  border: 1px solid #d2ddeb;
}

.follow-schedule-btn {
  background: #fff;
  color: #1f3b58;
  border: 1px solid #98aec4;
  min-width: 7.1rem;
}

.follow-schedule-btn:hover {
  background: #edf4fc;
  border-color: #7f9fbe;
}

.follow-schedule-btn.is-following {
  background: #e6f6ea;
  color: #21643c;
  border: 1px solid #9accab;
}

.follow-schedule-btn.is-following:hover {
  background: #daf1e2;
}

.follow-schedule-btn.is-disabled-look {
  background: #eef2f8;
  color: #7b8ea2;
  border: 1px solid #d2ddeb;
}

.row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.row.stacked {
  flex-direction: column;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.84rem;
}

.schedule-meta-item {
  display: grid;
  gap: 0.08rem;
  margin: 0 0 0.32rem;
  padding: 0.34rem 0.46rem;
  border: 1px solid #dce7f3;
  border-radius: 9px;
  background: #f4f8fd;
}

.schedule-meta-label {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #647991;
}

.schedule-meta-value {
  font-size: 0.84rem;
  font-weight: 700;
  color: #1a324c;
  word-break: break-word;
}

.schedule-meta-empty {
  color: #7f91a5;
}

.editor-block {
  border: 1px solid #dce7f3;
  border-radius: 12px;
  padding: 0.62rem;
  margin-bottom: 0.65rem;
  background: #f7fbff;
}

.editor-block h4 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
  letter-spacing: 0.01em;
}

.editor-rows {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.editor-row {
  display: grid;
  gap: 0.35rem;
  align-items: center;
}

.editor-row.day {
  grid-template-columns: minmax(0, 1fr) auto;
}

.editor-row.stage {
  grid-template-columns: minmax(0, 1fr) auto;
}

.editor-row.set {
  grid-template-columns: minmax(0, 1.6fr) 100px 100px 88px;
}

.editor-row.set input[data-field="artist"] {
  font-weight: 600;
}

.editor-row.set input[data-field="start"],
.editor-row.set input[data-field="end"] {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.editor-row button {
  padding: 0.42rem 0.5rem;
}

.planner-state-stack {
  display: grid;
  gap: 0.35rem;
  margin: 0.56rem 0 0.5rem;
}

.planner-state-card {
  border: 1px solid #cad8e8;
  border-radius: 11px;
  background: #edf3fa;
  padding: 0.42rem 0.54rem;
}

.planner-state-card.is-neutral {
  border-color: #cad8e8;
  background: #edf3fa;
}

.planner-state-card.is-success {
  border-color: #abd8be;
  background: #eefaf2;
}

.planner-state-card.is-warning {
  border-color: #e4ca91;
  background: #fff6df;
}

.planner-state-card.is-danger {
  border-color: #e2a9ac;
  background: #fff1f2;
}

.planner-state-label {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4f647b;
}

.planner-state-title {
  margin: 0.1rem 0 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: #17344f;
}

.planner-state-body {
  margin: 0.12rem 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.33;
  color: #2c4863;
}

.planner-state-card.is-success .planner-state-title,
.planner-state-card.is-success .planner-state-body {
  color: #1e6141;
}

.planner-state-card.is-warning .planner-state-title,
.planner-state-card.is-warning .planner-state-body {
  color: #7b5600;
}

.planner-state-card.is-danger .planner-state-title,
.planner-state-card.is-danger .planner-state-body {
  color: #8b1f2f;
}

.editor-state-stack {
  display: grid;
  gap: 0.4rem;
  margin: 0.55rem 0 0.42rem;
}

.editor-state-card {
  border: 1px solid #cad8e8;
  border-radius: 11px;
  background: #edf3fa;
  padding: 0.44rem 0.55rem;
}

.editor-state-card.is-neutral {
  border-color: #cad8e8;
  background: #edf3fa;
}

.editor-state-card.is-success {
  border-color: #abd8be;
  background: #eefaf2;
}

.editor-state-card.is-warning {
  border-color: #e4ca91;
  background: #fff6df;
}

.editor-state-card.is-danger {
  border-color: #e2a9ac;
  background: #fff1f2;
}

.editor-state-label {
  margin: 0;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #4f647b;
}

.editor-state-title {
  margin: 0.1rem 0 0;
  font-size: 0.86rem;
  font-weight: 800;
  color: #17344f;
}

.editor-state-body {
  margin: 0.12rem 0 0;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.33;
  color: #2c4863;
}

.editor-state-card.is-success .editor-state-title,
.editor-state-card.is-success .editor-state-body {
  color: #1e6141;
}

.editor-state-card.is-warning .editor-state-title,
.editor-state-card.is-warning .editor-state-body {
  color: #7b5600;
}

.editor-state-card.is-danger .editor-state-title,
.editor-state-card.is-danger .editor-state-body {
  color: #8b1f2f;
}

.editor-blocker-callout {
  border: 1px solid #e2a9ac;
  background: #fff3f4;
  border-radius: 11px;
  padding: 0.55rem 0.62rem;
  margin: 0.45rem 0;
}

.editor-blocker-headline {
  margin: 0 0 0.34rem;
  color: #8b1f2f;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.34;
}

.editor-blockers {
  margin: 0;
  padding-left: 1.02rem;
  color: #8b1f2f;
  font-size: 0.79rem;
  line-height: 1.35;
}

.editor-blockers li {
  margin-bottom: 0.2rem;
}

.editor-actions {
  display: grid;
  gap: 0.42rem;
  margin-bottom: 0.6rem;
}

.editor-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem;
}

.editor-wide-action {
  width: 100%;
}

.editor-secondary-action {
  background: #fff;
  color: #1e3652;
  border: 1px solid #94a8bf;
}

.editor-secondary-action:hover {
  background: #edf3fa;
}

.editor-add-action {
  background: linear-gradient(180deg, #f3f8ff 0%, #e5f0ff 100%);
  border-color: #7f9fc5;
  color: #173a60;
  font-weight: 800;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 0 rgba(41, 72, 103, 0.08);
}

.editor-add-action:hover {
  background: linear-gradient(180deg, #e9f3ff 0%, #d8e8ff 100%);
  border-color: #678bb6;
}

.editor-danger-action {
  width: 100%;
  background: #fff;
  color: #a11d1d;
  border: 1px solid #e5a7a7;
}

.editor-danger-action:hover {
  background: #fff0f0;
}

.editor-danger-inline {
  background: #fff;
  color: #a11d1d;
  border: 1px solid #e5a7a7;
  min-width: 88px;
}

.editor-danger-inline:hover {
  background: #fff0f0;
}

.editor-day-group {
  border: 1px solid #cfdeee;
  border-radius: 12px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6fbff 100%);
  padding: 0.5rem;
  margin-bottom: 0.45rem;
}

.editor-day-group-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.editor-day-group-header h5 {
  margin: 0;
  font-size: 0.98rem;
}

.editor-day-group-body {
  display: grid;
  gap: 0.4rem;
}

.editor-stage-group {
  border: 1px solid #d5e3f1;
  border-radius: 10px;
  background: #fff;
  padding: 0.45rem;
}

.editor-stage-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.36rem;
}

.editor-stage-group-header h6 {
  margin: 0;
  font-size: 0.92rem;
}

.editor-group-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.editor-day-bar {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.62rem;
  padding: 0.2rem 0.08rem;
}

.editor-day-bar::before,
.editor-day-bar::after {
  content: "";
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #d0deee 0%, #a7bfd9 100%);
}

.editor-day-bar::after {
  background: linear-gradient(90deg, #a7bfd9 0%, #d0deee 100%);
}

.editor-day-bar-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.8rem;
  padding: 0.18rem 0.72rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #bed0e3;
  color: #1f3851;
  font-size: 1.01rem;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.editor-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.editor-kicker.is-stage {
  background: #e8f7ef;
  color: #2d6c53;
}

.editor-stage-group-body {
  display: grid;
  gap: 0.35rem;
}

.editor-stage-group-footer {
  display: flex;
  justify-content: flex-start;
  margin-top: 0.32rem;
}

.editor-set-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) 100px 100px 88px;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 0.08rem;
}

.editor-set-columns span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5f738a;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(430px, 96vw);
  height: 100vh;
  background: #f8fbff;
  color: #13263b;
  z-index: 1200;
  box-shadow: -24px 0 40px rgba(9, 17, 29, 0.38);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow-y: auto;
}

.drawer-header {
  position: sticky;
  top: 0;
  background: #f8fbff;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid #dce8f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
}

.drawer-heading {
  min-width: 0;
}

.drawer-header h2 {
  margin: 0;
}

.drawer-tab-row {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.drawer-tab {
  padding: 0.32rem 0.58rem;
}

.drawer-tab.is-active {
  background: #ff6f3c;
  color: #fff;
}

.drawer-pane {
  padding: 0.85rem 0.9rem 1.2rem;
}

.auth-mode-tabs {
  margin-bottom: 0.65rem;
}

.auth-feedback {
  margin: 0.52rem 0 0.72rem;
  padding: 0.55rem 0.62rem;
  border-radius: 10px;
  border: 1px solid #cdddee;
  background: #eef5fd;
  color: #244666;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.34;
}

.auth-feedback[data-tone="error"] {
  border-color: #e2a9ac;
  background: #fff1f2;
  color: #8b1f2f;
}

.auth-feedback[data-tone="success"] {
  border-color: #abd8be;
  background: #eefaf2;
  color: #1e6141;
}

.editor-feedback {
  margin: 0.45rem 0 0.6rem;
}

.planner-feedback {
  margin: 0 0 0.55rem;
  word-break: break-word;
}

.auth-mode-pane {
  display: grid;
  gap: 0.45rem;
}

.auth-field {
  display: grid;
  gap: 0.24rem;
}

.auth-mode-pane input.is-invalid {
  border: 1px solid #d67584;
  background: #fff6f8;
  box-shadow: 0 0 0 1px rgba(214, 117, 132, 0.16);
}

.auth-mode-pane input.is-invalid:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(200, 70, 93, 0.2);
}

.field-error {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: #8b1f2f;
  line-height: 1.3;
}

.auth-consent-list {
  display: grid;
  gap: 0.34rem;
  margin: 0.18rem 0;
}

.auth-consent-list.is-invalid {
  border: 1px solid #e1aeb8;
  border-radius: 10px;
  background: #fff6f8;
  padding: 0.42rem 0.48rem;
}

.auth-consent-row {
  display: flex;
  align-items: flex-start;
  gap: 0.48rem;
  font-size: 0.82rem;
  color: #3f566e;
  line-height: 1.34;
}

.auth-consent-row input[type="checkbox"] {
  margin-top: 0.11rem;
}

.auth-legal-copy {
  margin: 0.02rem 0 0;
}

.auth-security-note {
  margin: 0.44rem 0 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.72rem 0 0.52rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.68rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #d4e2f1;
}

.social-provider-grid {
  display: grid;
  gap: 0.4rem;
}

.social-provider-btn {
  width: 100%;
  text-align: center;
}

.auth-account-summary {
  margin-bottom: 0.52rem;
}

.account-mode-tabs {
  margin: 0.1rem 0 0.62rem;
}

.account-tab-pane {
  display: block;
}

.account-section {
  border: 1px solid #d9e6f4;
  border-radius: 12px;
  background: #f4f9ff;
  padding: 0.62rem 0.66rem;
  margin-bottom: 0.62rem;
}

.account-section h3 {
  margin: 0 0 0.45rem;
  font-size: 0.94rem;
  color: #17344f;
}

.account-summary-card {
  background: #eef6ff;
}

.account-identity-line {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #17344f;
}

.account-role-row {
  margin-top: 0.52rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.account-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.16rem 0.55rem;
  background: #e5edf7;
  color: #2b4a67;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.account-pill-owner {
  background: #ffe6d6;
  color: #8c3f17;
}

.account-pill-admin {
  background: #e5ecff;
  color: #2c3f81;
}

.account-pill-priority {
  background: #e7f6ea;
  color: #1f6a3b;
}

.account-settings-actions {
  margin-top: 0.45rem;
}

.account-settings-actions button {
  width: 100%;
}

.account-list {
  display: grid;
  gap: 0.42rem;
}

.account-list-item {
  border: 1px solid #d6e4f3;
  border-radius: 10px;
  background: #ffffff;
  padding: 0.46rem 0.52rem;
  display: grid;
  gap: 0.4rem;
}

.account-list-copy p {
  margin: 0.18rem 0 0;
}

.account-list-title {
  color: #183a5b;
  font-weight: 800;
  text-decoration: none;
}

.account-list-title:hover {
  text-decoration: underline;
}

.account-list-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.34rem;
}

.account-list-actions .result-open {
  padding: 0.34rem 0.56rem;
  font-size: 0.8rem;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 17, 27, 0.44);
  z-index: 1100;
}

.callout {
  border: 1px solid #d3e2f1;
  background: #edf5ff;
  border-radius: 12px;
  padding: 0.7rem;
  margin-bottom: 0.85rem;
}

.friend-list {
  display: grid;
  gap: 0.35rem;
}

.friend-item {
  border: 1px solid #d7e4f2;
  border-radius: 10px;
  background: #fff;
  padding: 0.42rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.45rem;
}

.friend-item-title {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: #17344f;
}

.friend-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.friend-item-actions button {
  font-size: 0.76rem;
  padding: 0.26rem 0.46rem;
}

.request-list {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.request-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  background: #eef4fb;
  border: 1px solid #d8e5f4;
  border-radius: 10px;
  padding: 0.35rem 0.45rem;
  font-size: 0.84rem;
}

.request-actions {
  display: flex;
  gap: 0.25rem;
}

.request-actions button {
  font-size: 0.74rem;
  padding: 0.2rem 0.4rem;
}

.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.legend {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.chip {
  font-weight: 700;
  font-size: 0.8rem;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.chip.neutral {
  background: #dbe6f2;
}

.p1 {
  background: #ffd5d4;
}

.p2 {
  background: #ffecb8;
}

.p3 {
  background: #d5e9ff;
}

.timetable {
  display: grid;
  gap: 1rem;
  margin-top: 0.7rem;
}

.day-board {
  border: 1px solid #d2deec;
  border-radius: 12px;
  background: #fcfeff;
  padding: 0.5rem;
  overflow-x: auto;
}

.day-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.day-header-row h3 {
  margin: 0;
}

.time-ruler {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: end;
  margin-bottom: 0.3rem;
}

.hour-strip {
  position: relative;
  width: 100%;
  height: 18px;
}

.hour-tick {
  position: absolute;
  transform: translateX(-50%);
  font-size: 0.75rem;
  color: #4f6278;
  white-space: nowrap;
}

.day-rows {
  display: grid;
  gap: 0.3rem;
}

.stage-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  align-items: stretch;
}

.stage-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: #35526f;
  border-top: 1px solid #e1e9f4;
  display: flex;
  align-items: center;
  padding-left: 0.2rem;
  background: #f3f7fc;
}

.track {
  position: relative;
  width: 100%;
  height: 88px;
  border-top: 1px solid #e1e9f4;
  background: linear-gradient(180deg, #f5f9fd 0%, #f1f6fc 100%);
}

.grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: #d6e0ee;
  transform: translateX(-0.5px);
}

.set-block {
  position: absolute;
  top: 6px;
  bottom: 6px;
  border-radius: 8px;
  border: 1px solid #7b93b0;
  background: #ffffff;
  color: #162a3f;
  padding: 0.22rem 0.3rem;
  display: grid;
  grid-template-rows: auto auto;
  align-content: center;
  text-align: left;
  overflow: hidden;
  font-size: 0.74rem;
  line-height: 1.08;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.set-block .name {
  font-weight: 700;
  white-space: normal;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  word-break: break-word;
  text-wrap: pretty;
}

.set-block .time {
  opacity: 0.8;
  white-space: nowrap;
  font-size: 0.64rem;
}

.set-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 7px 15px rgba(33, 55, 78, 0.2);
}

.set-block.is-p1 {
  border-color: #d53834;
  background: #ffe4e3;
}

.set-block.is-p2 {
  border-color: #c98c00;
  background: #ffefc7;
}

.set-block.is-p3 {
  border-color: #2a78c7;
  background: #dcedff;
}

.set-block.is-overlap {
  box-shadow: inset 0 0 0 2px #2f8f6b;
}

.priority-badge {
  position: absolute;
  right: 4px;
  top: 4px;
  font-size: 0.64rem;
  font-weight: 800;
  border-radius: 999px;
  padding: 0.05rem 0.3rem;
  background: #162a3f;
  color: #fff;
}

.set-block.is-tight .name {
  -webkit-line-clamp: 4;
  font-size: 0.68rem;
}

.set-block.is-tight .time,
.set-block.is-compact .time {
  display: none;
}

.overlap {
  margin: 0.5rem 0 0;
  padding-left: 1rem;
}

@media (max-width: 1100px) {
  .topbar-inner {
    flex-wrap: wrap;
    row-gap: 0.45rem;
  }

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

  .site-footer-inner {
    grid-template-columns: 1fr;
  }

  .site-footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 1rem;
  }

  .editor-row.set {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .editor-set-columns {
    display: none;
  }

  .editor-row.set input[data-field="artist"] {
    grid-column: 1 / -1;
  }

  .editor-row.set input[data-field="start"],
  .editor-row.set input[data-field="end"] {
    width: 100%;
  }

  .editor-row.set button {
    grid-column: 1 / -1;
  }

  .editor-row.stage {
    grid-template-columns: minmax(0, 1fr);
  }

  .editor-row.stage button {
    justify-self: start;
  }

  .topbar-user {
    margin-left: auto;
    width: 100%;
    justify-content: flex-end;
  }

  .header-create-btn {
    min-width: 0;
  }

  .admin-list-item {
    flex-direction: column;
  }

  .admin-role-controls {
    width: 100%;
  }

  .friend-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
