:root {
  --primary: #4bbdce;
  --primary-hover: #67cad8;
  --primary-dark: #2fa7bb;
  --gold: #d9c16c;
  --white: #ffffff;
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-xl: 0 28px 80px rgba(0, 0, 0, 0.22);
  --shadow-lg: 0 18px 42px rgba(0, 0, 0, 0.14);
}

body[data-theme="dark"] {
  --bg: #0f1115;
  --bg-alt: #151922;
  --panel: rgba(23, 27, 34, 0.88);
  --panel-strong: rgba(23, 27, 34, 0.96);
  --panel-soft: rgba(30, 36, 44, 0.88);
  --border: #2b333d;
  --text: #f4f8fa;
  --muted: #aab5c1;
  --muted-soft: rgba(170, 181, 193, 0.72);
  --hero-top: rgba(7, 10, 14, 0.14);
  --hero-bottom: rgba(8, 10, 13, 0.92);
  --hero-glow: rgba(75, 189, 206, 0.24);
  --calendar-shell: rgba(30, 36, 44, 0.95);
  --calendar-head: rgba(75, 189, 206, 0.16);
  --calendar-cell: #171b22;
  --calendar-line: rgba(255, 255, 255, 0.06);
  --calendar-empty: rgba(255, 255, 255, 0.02);
  --button-ghost: rgba(255, 255, 255, 0.06);
  color-scheme: dark;
}

body[data-theme="light"] {
  --bg: #eaf7fa;
  --bg-alt: #dff2f5;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: rgba(255, 255, 255, 0.94);
  --panel-soft: rgba(244, 251, 252, 0.96);
  --border: rgba(75, 189, 206, 0.18);
  --text: #0f1115;
  --muted: #637586;
  --muted-soft: rgba(99, 117, 134, 0.72);
  --hero-top: rgba(7, 14, 18, 0.18);
  --hero-bottom: rgba(11, 17, 21, 0.8);
  --hero-glow: rgba(75, 189, 206, 0.28);
  --calendar-shell: rgba(255, 255, 255, 0.94);
  --calendar-head: rgba(75, 189, 206, 0.18);
  --calendar-cell: rgba(255, 255, 255, 0.92);
  --calendar-line: rgba(75, 189, 206, 0.12);
  --calendar-empty: rgba(235, 247, 249, 0.72);
  --button-ghost: rgba(15, 17, 21, 0.05);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, 0.16), transparent 24%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
  color: var(--text);
  font-family: "Noto Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

body {
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 220ms ease, color 220ms ease;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.page-glow {
  position: fixed;
  inset: -10%;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, var(--hero-glow), transparent 26%),
    radial-gradient(circle at 82% 16%, rgba(217, 193, 108, 0.16), transparent 18%),
    radial-gradient(circle at 72% 78%, rgba(75, 189, 206, 0.12), transparent 20%);
  filter: blur(36px);
  opacity: 0.92;
  animation: glow-drift 16s ease-in-out infinite alternate;
}

@keyframes glow-drift {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(2%, 2%, 0) scale(1.04);
  }
}

.topbar {
  position: fixed;
  top: 18px;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 clamp(18px, 4vw, 36px);
}

.brand-mark {
  font-family: "Gugi", "Noto Sans", sans-serif;
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.google-slot {
  display: flex;
  align-items: center;
  min-height: 42px;
}

.top-auth-button {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.icon-button,
.ghost-button,
.pill-link,
.auth-chip,
.hero-link,
.hero-secondary-link,
.note-trigger,
.filter-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
}

.icon-button,
.ghost-button,
.pill-link,
.auth-chip {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-button-small {
  width: 34px;
  height: 34px;
}

.ghost-button,
.pill-link {
  padding: 10px 14px;
}

.ghost-button-compact {
  padding: 8px 12px;
  font-size: 0.86rem;
}

.auth-chip {
  padding: 9px 12px;
  font-size: 0.84rem;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 72px clamp(18px, 5vw, 42px);
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.hero::before {
  inset: -8%;
  background:
    radial-gradient(circle at 50% 50%, rgba(75, 189, 206, 0.12), transparent 40%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.1), transparent 24%);
}

.hero::after {
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  transform: translateY(-50%) scaleY(0);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 0 16px rgba(255, 255, 255, 0.88),
    0 0 44px rgba(75, 189, 206, 0.72);
}

.hero-powering::after {
  animation: power-line 1.05s cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
}

@keyframes power-line {
  0% {
    opacity: 0;
    transform: translateY(-50%) scaleY(0);
  }
  8% {
    opacity: 1;
    transform: translateY(-50%) scaleY(1);
  }
  45% {
    opacity: 0.92;
    transform: translateY(-50%) scaleY(1.2);
  }
  100% {
    opacity: 0;
    transform: translateY(-50%) scaleY(0);
  }
}

.hero-video,
.hero-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  opacity: 0;
  transform: scaleY(0.04) scaleX(1.08);
  filter: brightness(3.2) contrast(1.45) blur(10px) saturate(1.12);
  transform-origin: center center;
}

.hero-video.is-on {
  animation: tv-power-on 1.15s cubic-bezier(0.19, 0.86, 0.22, 1) forwards;
}

.hero-powered .hero-video {
  opacity: 1;
  transform: scale(1.03);
  filter: brightness(0.58) saturate(0.96);
}

@keyframes tv-power-on {
  0% {
    opacity: 0;
    transform: scaleY(0.03) scaleX(0.98);
    filter: brightness(3.4) contrast(1.55) blur(10px) saturate(1.15);
  }
  18% {
    opacity: 1;
    transform: scaleY(0.08) scaleX(1);
    filter: brightness(3.1) contrast(1.48) blur(5px) saturate(1.08);
  }
  44% {
    opacity: 1;
    transform: scaleY(1.02) scaleX(1);
    filter: brightness(1.08) contrast(1.04) blur(0.8px) saturate(1);
  }
  100% {
    opacity: 1;
    transform: scale(1.03);
    filter: brightness(0.58) saturate(0.96);
  }
}

.hero-scrim {
  background:
    linear-gradient(180deg, var(--hero-top) 0%, rgba(9, 13, 18, 0.44) 36%, var(--hero-bottom) 100%),
    radial-gradient(circle at 24% 20%, rgba(255, 255, 255, 0.14), transparent 30%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin: 0 auto;
  text-align: center;
}

.hero-kicker {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.hero h1 {
  margin: 0;
  font-family: "Gugi", "Noto Sans", sans-serif;
  font-size: clamp(3.7rem, 9.3vw, 8.2rem);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.04em;
  color: #f8fdff;
  text-shadow: 0 12px 34px rgba(0, 0, 0, 0.34);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 28px;
}

.hero-link,
.hero-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  padding: 13px 20px;
  color: #f8fdff;
  font-weight: 700;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.hero-link {
  background: rgba(75, 189, 206, 0.18);
}

.hero-link:disabled {
  opacity: 0.5;
  cursor: default;
}

.hero-secondary-link {
  background: rgba(255, 255, 255, 0.08);
}

.hero-link:hover,
.hero-secondary-link:hover,
.icon-button:hover,
.ghost-button:hover,
.pill-link:hover,
.filter-chip:hover,
.note-trigger:hover {
  transform: translateY(-1px);
}

.hero-link:hover {
  background: rgba(75, 189, 206, 0.28);
  border-color: rgba(103, 202, 216, 0.5);
}

.hero-secondary-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

.viewer-shell,
.songbook-shell {
  position: relative;
  z-index: 2;
  scroll-margin-top: 92px;
  padding: 0 clamp(16px, 3vw, 34px) 60px;
}

.viewer-shell {
  margin-top: -42px;
}

.viewer-board,
.songbook-board {
  max-width: 1840px;
  margin: 0 auto;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: var(--panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-xl);
  position: relative;
}

.viewer-board {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 22px;
}

.viewer-left {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.viewer-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.viewer-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
}

.profile-card,
.status-card,
.widget-card,
.calendar-card,
.editor-panel,
.note-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel-strong);
  box-shadow: var(--shadow-lg);
}

.profile-card,
.status-card,
.widget-card,
.calendar-card,
.editor-panel {
  padding: 18px;
}

.profile-card,
.status-card {
  transform-origin: center top;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.profile-card {
  transform: rotate(-1.2deg);
}

.status-card {
  transform: rotate(1deg);
}

.profile-card:hover,
.status-card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow: 0 22px 38px rgba(0, 0, 0, 0.18);
}

.profile-avatar {
  width: 100%;
  border-radius: 20px;
  aspect-ratio: 0.92 / 1.08;
  object-fit: cover;
  object-position: center top;
  background: linear-gradient(180deg, rgba(75, 189, 206, 0.16), rgba(75, 189, 206, 0.04));
}

.profile-card h2,
.card-head h3,
.calendar-head h2,
.editor-head h3,
.note-head h3,
.song-title {
  margin: 0;
  line-height: 1.2;
}

.profile-card h2 {
  margin-top: 14px;
  font-size: 1.42rem;
  font-weight: 900;
}

.calendar-head h2,
.editor-head h3,
.note-head h3 {
  font-size: 1.24rem;
  font-weight: 900;
}

.profile-bio,
.status-copy,
.video-meta,
.song-meta,
.note-meta,
.save-status,
.field-label {
  color: var(--muted);
}

.profile-bio {
  margin: 8px 0 0;
  font-size: 0.92rem;
  line-height: 1.55;
}

.profile-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.profile-meta-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(75, 189, 206, 0.14);
  border: 1px solid rgba(75, 189, 206, 0.22);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
}

.service-row {
  display: flex;
  gap: 12px;
  margin-top: 14px;
}

.service-link {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: #ffffff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease;
}

.service-link:hover {
  transform: translateY(-1px);
  border-color: rgba(75, 189, 206, 0.36);
}

.service-link-youtube {
  background: #ff2f2f;
}

.service-icon {
  width: 28px;
  height: 28px;
  display: block;
  object-fit: contain;
}

.service-icon-youtube {
  width: 24px;
  height: 24px;
}

.card-head,
.calendar-head,
.status-top,
.editor-head,
.note-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.status-card-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 18px;
}

.status-top {
  justify-content: flex-start;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.live-pill.online {
  background: rgba(75, 189, 206, 0.18);
  color: var(--primary);
}

.live-pill.offline {
  background: var(--button-ghost);
  color: var(--muted);
}

.status-live-link {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid rgba(75, 189, 206, 0.28);
  background: rgba(255, 255, 255, 0.94);
  color: var(--primary-dark);
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 8px 16px rgba(13, 19, 31, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.status-live-link:hover {
  transform: translateY(-1px);
  border-color: rgba(75, 189, 206, 0.5);
  background: #ffffff;
}

.status-live-link svg {
  width: 18px;
  height: 18px;
  display: block;
}

.status-live-link rect,
.status-live-link path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.status-copy {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.legend-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.legend-list-inline {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.legend-list-compact {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.legend-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 14px;
  background: var(--panel-soft);
  font-size: 0.82rem;
}

.legend-list-inline .legend-pill {
  justify-content: center;
  padding: 7px 10px;
  font-size: 0.78rem;
}

.legend-list-compact .legend-pill {
  flex: 0 0 auto;
  justify-content: flex-start;
  padding: 6px 9px;
  font-size: 0.75rem;
  border-radius: 999px;
}

.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.calendar-card {
  min-width: 0;
  min-height: 100%;
}

.calendar-nav-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 999px;
  background: var(--panel-soft);
}

.calendar-nav h2 {
  min-width: 64px;
  text-align: center;
}

.weekday-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  margin-top: 16px;
  padding: 12px 10px;
  border-radius: 16px 16px 0 0;
  background: var(--calendar-head);
  color: var(--primary);
  font-size: 0.84rem;
  font-weight: 700;
  text-align: center;
}

.weekday-sun {
  color: #ff6b6b;
}

.weekday-sat {
  color: #5b8cff;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--calendar-line);
  border-top: none;
  border-radius: 0 0 18px 18px;
  overflow: visible;
  background: var(--calendar-shell);
}

.calendar-day,
.calendar-empty {
  min-height: 182px;
  border-right: 1px solid var(--calendar-line);
  border-bottom: 1px solid var(--calendar-line);
  background: var(--calendar-cell);
}

.calendar-grid > :nth-child(7n) {
  border-right: none;
}

.calendar-grid > :nth-last-child(-n + 7) {
  border-bottom: none;
}

.calendar-empty {
  background: var(--calendar-empty);
}

.calendar-day {
  position: relative;
  isolation: isolate;
  padding: 9px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: visible;
  z-index: 0;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.calendar-day.has-status-mark::before {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 8px;
  width: 74px;
  height: 74px;
  background: url("/static/assets/off-day-mark.png") center / contain no-repeat;
  opacity: 1;
  pointer-events: none;
  z-index: 0;
}

.calendar-day.selectable {
  cursor: pointer;
}

.calendar-day:hover {
  z-index: 20;
}

.calendar-day.selectable:hover {
  transform: translateY(-1px);
  z-index: 20;
  box-shadow: inset 0 0 0 1px rgba(75, 189, 206, 0.2);
}

.calendar-day:focus-within {
  z-index: 20;
}

.calendar-day.selected {
  outline: 2px solid rgba(75, 189, 206, 0.42);
  outline-offset: -2px;
}

.day-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: flex-start;
  position: relative;
  z-index: 1;
}

.day-number {
  font-size: 1.18rem;
  font-weight: 900;
  line-height: 1;
}

.day-tools {
  display: flex;
  min-width: 0;
  max-width: 68%;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.time-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(75, 189, 206, 0.16);
  color: var(--primary);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.time-chip.off {
  background: var(--button-ghost);
  color: var(--muted);
}

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 0;
  overflow: visible;
  position: relative;
  z-index: 1;
}

.entry-chip {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 32px;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 10px;
  color: #0f1115;
  font-size: 0.72rem;
  line-height: 1.15;
  z-index: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.entry-chip:hover,
.entry-chip:focus-within {
  z-index: 8;
}

.entry-media {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.42);
  flex: 0 0 auto;
}

.entry-label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-trigger {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  padding: 0;
  background: rgba(255, 255, 255, 0.78);
  color: #111827;
  font-size: 0.82rem;
  line-height: 1;
}

.day-more-trigger {
  width: auto;
  min-width: 38px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.entry-tooltip {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  z-index: 40;
  width: max-content;
  max-width: min(260px, calc(100vw - 40px));
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 17, 21, 0.96);
  color: #f4f8fa;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
  white-space: normal;
  pointer-events: none;
}

.entry-chip:hover .entry-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.calendar-message {
  grid-column: 1 / -1;
  padding: 28px 16px;
  text-align: center;
  color: var(--muted);
}

.calendar-footnote {
  margin: 0 2px 0 auto;
  text-align: right;
  font-size: 0.77rem;
  color: var(--muted-soft);
}

.calendar-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 14px;
  margin-top: 12px;
}

.postit-card {
  position: relative;
  padding: 22px 16px 16px;
  min-height: 280px;
  max-height: none;
  overflow: visible;
  border-radius: 24px;
  border: 1px solid rgba(145, 120, 44, 0.24);
  background: linear-gradient(180deg, #f8edb3 0%, #f0de90 100%);
  color: #2b2413;
  transform: rotate(-1.6deg);
  transform-origin: center top;
  transition: transform 180ms ease, box-shadow 180ms ease;
  box-shadow:
    0 18px 34px rgba(0, 0, 0, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.postit-card:hover {
  transform: rotate(0deg) translateY(-2px);
  box-shadow:
    0 22px 38px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.56);
}

.postit-card-side {
  margin-top: 8px;
}

.postit-card::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 30px;
  height: 30px;
  border-radius: 0 0 22px 0;
  background: linear-gradient(135deg, rgba(176, 142, 48, 0.02) 0%, rgba(176, 142, 48, 0.28) 100%);
}

.postit-tape {
  position: absolute;
  top: -14px;
  left: 50%;
  z-index: 2;
  width: 84px;
  height: 30px;
  transform: translateX(-50%) rotate(-4deg);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.46);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.postit-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.postit-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 900;
  color: #f08b1d;
}

.postit-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.postit-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.postit-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(89, 69, 20, 0.18);
}

.postit-item:last-child {
  border-bottom: 1px dashed rgba(89, 69, 20, 0.18);
}

.postit-item.checked .postit-text,
.postit-item.checked .postit-input {
  text-decoration: line-through;
  opacity: 0.72;
}

.postit-check {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.postit-check input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
}

.postit-check input:not(:disabled) {
  cursor: pointer;
}

.postit-box {
  width: 18px;
  height: 18px;
  display: block;
  border-radius: 6px;
  border: 1.5px solid rgba(53, 41, 12, 0.62);
  background: rgba(255, 255, 255, 0.38);
  position: relative;
}

.postit-check input:checked + .postit-box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 10px;
  border: solid #2b2413;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.postit-text {
  margin: 0;
  min-height: 24px;
  color: #2b2413;
  font-size: 0.88rem;
  line-height: 1.48;
  word-break: break-word;
}

.postit-input {
  width: 100%;
  min-height: 24px;
  max-height: 124px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #2b2413;
  outline: none;
  resize: none;
  box-shadow: none;
  font-size: 0.88rem;
  line-height: 1.48;
}

.postit-input::placeholder {
  color: rgba(55, 47, 22, 0.48);
}

.postit-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  align-self: center;
  justify-items: end;
  margin-top: 0;
}

.postit-row-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 10px;
  padding: 0;
  border-radius: 4px;
  border: 1px solid rgba(75, 63, 27, 0.18);
  background: rgba(255, 255, 255, 0.44);
  color: #2b2413;
  font-size: 0.58rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.postit-row-button:hover {
  transform: translateY(-1px);
}

.postit-row-button.add {
  background: rgba(90, 190, 112, 0.3);
  border-color: rgba(56, 138, 76, 0.38);
}

.postit-row-button.remove {
  background: rgba(224, 88, 88, 0.24);
  border-color: rgba(176, 56, 56, 0.32);
}

.postit-empty {
  margin: 0;
  color: rgba(55, 47, 22, 0.76);
  font-size: 0.86rem;
}

.viewer-youtube {
  padding: 18px;
}

.youtube-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.video-card {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
}

.video-thumb {
  width: 148px;
  height: 84px;
  border-radius: 14px;
  object-fit: cover;
}

.video-card h4 {
  margin: 0 0 4px;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.38;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-meta,
.song-meta,
.field-label {
  font-size: 0.84rem;
}

.songbook-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 18px;
}

.songbook-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.song-random-button {
  min-width: 134px;
  height: 52px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(75, 189, 206, 0.4);
  background: linear-gradient(135deg, rgba(75, 189, 206, 0.22), rgba(47, 167, 187, 0.4));
  color: var(--text);
  font-family: "Gugi", "Noto Sans", sans-serif;
  font-size: 1.08rem;
  letter-spacing: 0.04em;
  box-shadow: var(--shadow-lg);
}

.song-search-button {
  border-color: rgba(217, 193, 108, 0.4);
  background: linear-gradient(135deg, rgba(217, 193, 108, 0.22), rgba(189, 149, 75, 0.4));
}

.song-search-reset-button {
  min-width: 92px;
  height: 42px;
  padding: 0 14px;
  border-color: rgba(131, 151, 172, 0.32);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted-strong);
  font-family: "Pretendard", "Noto Sans KR", sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow: none;
}

.songbook-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.songbook-head h2 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
}

.songbook-editor {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(220px, 1.25fr) minmax(160px, 0.95fr) minmax(180px, 1fr) 130px 88px;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.songbook-editor input,
.songbook-editor select {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  font-size: 0.9rem;
}

.songbook-editor .ghost-button {
  height: 42px;
  padding-inline: 0;
}

.songbook-editor input::placeholder {
  color: var(--muted);
}

.song-editor-status {
  grid-column: 1 / -1;
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  min-height: 1.1em;
}

.song-editor-status.error {
  color: #ff8f8f;
}

.song-undo-bar {
  position: absolute;
  right: -18px;
  top: 116px;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(75, 189, 206, 0.42);
  background: linear-gradient(135deg, rgba(75, 189, 206, 0.97), rgba(47, 167, 187, 0.97));
  color: #071114;
  font-size: 0.88rem;
  box-shadow: var(--shadow-xl);
}

.song-undo-button {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(7, 17, 20, 0.14);
  background: #ffffff;
  color: #0f1115;
  font-weight: 800;
}

.song-undo-close {
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(7, 17, 20, 0.14);
  background: rgba(255, 255, 255, 0.84);
  color: #0f1115;
  font-size: 1rem;
  line-height: 1;
}

.song-results {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.song-tag-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 18px 10px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(75, 189, 206, 0.04));
}

.song-tag-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(75, 189, 206, 0.22);
  background: rgba(255, 255, 255, 0.68);
  color: #355164;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 6px 14px rgba(75, 189, 206, 0.08);
  opacity: 0.56;
  transition: opacity 140ms ease, transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.song-tag-filter-chip:hover {
  opacity: 0.82;
}

.song-tag-filter-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 0.76rem;
  transform: scale(0.8);
  transition: width 140ms ease, opacity 140ms ease, margin-right 140ms ease, transform 140ms ease;
}

.song-tag-filter-chip.active {
  border-color: rgba(75, 189, 206, 0.4);
  background: linear-gradient(135deg, rgba(75, 189, 206, 0.2), rgba(47, 167, 187, 0.34));
  color: #0d2329;
  opacity: 1;
  box-shadow:
    0 10px 22px rgba(75, 189, 206, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  transform: translateY(-1px);
}

.song-tag-filter-chip.active .song-tag-filter-check {
  width: 0.9rem;
  opacity: 1;
  transform: scale(1);
}

.song-table-card {
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel-strong);
  box-shadow: var(--shadow-lg);
}

.song-table-head,
.song-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1.2fr) minmax(0, 1.15fr) minmax(0, 0.95fr) 120px minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
}

.song-table-head {
  padding: 14px 18px;
  background: rgba(75, 189, 206, 0.16);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 800;
}

.song-item {
  position: relative;
  padding: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  min-height: 0;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
  overflow: hidden;
}

.song-item:hover {
  background: var(--panel-soft);
}

.song-item-draggable {
  cursor: grab;
  touch-action: pan-y;
}

.song-item.song-swiping {
  transition: none;
}

.song-item.song-swipe-delete {
  background: rgba(214, 67, 67, 0.12);
  border-color: rgba(214, 67, 67, 0.26);
}

.song-item.song-swipe-edit {
  background: rgba(75, 189, 206, 0.12);
  border-color: rgba(75, 189, 206, 0.24);
}

.song-item-content {
  position: relative;
  z-index: 2;
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: 76px minmax(0, 1.2fr) minmax(0, 1.15fr) minmax(0, 0.95fr) 120px minmax(180px, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  background: inherit;
  transition: transform 160ms ease;
}

.song-action-open-edit .song-item-content {
  transform: translateX(88px);
}

.song-action-open-delete .song-item-content {
  transform: translateX(-88px);
}

.song-swipe-action-wrap {
  position: absolute;
  inset-block: 0;
  width: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 160ms ease;
}

.song-swipe-action-wrap-edit {
  left: 0;
}

.song-swipe-action-wrap-delete {
  right: 0;
}

.song-action-open-edit .song-swipe-action-wrap-edit,
.song-action-open-delete .song-swipe-action-wrap-delete {
  opacity: 1;
}

.song-swipe-action {
  width: 64px;
  height: 34px;
  border-radius: 999px;
  border: 0;
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
}

.song-swipe-action.edit {
  background: #4bbdce;
}

.song-swipe-action.delete {
  background: #de5a5a;
}

.song-item-editing {
  background: rgba(75, 189, 206, 0.08);
  padding: 14px 18px;
  row-gap: 8px;
}

.song-cell {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.song-title-cell {
  display: block;
  font-size: 0.96rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.song-number-cell {
  color: var(--muted);
  font-weight: 700;
}

.song-title-block {
  white-space: normal;
}

.song-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.song-tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(75, 189, 206, 0.16), rgba(47, 167, 187, 0.08));
  border: 1px solid rgba(75, 189, 206, 0.26);
  color: #2d5b68;
  font-size: 0.74rem;
  font-weight: 800;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.song-tag-symbol {
  font-size: 0.82rem;
  line-height: 1;
}

.song-tag-symbol-image {
  width: 0.92rem;
  height: 0.92rem;
  object-fit: contain;
  display: block;
}

.song-tag-text {
  line-height: 1;
}

.song-tag-chip.tag-milestone,
.song-tag-filter-chip.tag-milestone {
  background: linear-gradient(135deg, rgba(255, 233, 173, 0.82), rgba(255, 242, 208, 0.92));
  border-color: rgba(224, 190, 87, 0.34);
  color: #7b5810;
}

.song-tag-chip.tag-homework,
.song-tag-filter-chip.tag-homework {
  background: linear-gradient(135deg, rgba(224, 239, 255, 0.82), rgba(241, 247, 255, 0.94));
  border-color: rgba(122, 155, 216, 0.34);
  color: #35527b;
}

.song-tag-chip.tag-fire,
.song-tag-filter-chip.tag-fire {
  background: linear-gradient(135deg, rgba(255, 223, 195, 0.84), rgba(255, 239, 221, 0.94));
  border-color: rgba(236, 132, 72, 0.34);
  color: #8e4217;
}

.song-tag-chip.tag-youtube,
.song-tag-filter-chip.tag-youtube {
  background: linear-gradient(135deg, rgba(255, 214, 214, 0.84), rgba(255, 236, 236, 0.96));
  border-color: rgba(230, 83, 83, 0.34);
  color: #9d1f1f;
}

.song-tag-chip.tag-gapsea,
.song-tag-filter-chip.tag-gapsea {
  background: linear-gradient(135deg, rgba(250, 244, 255, 0.9), rgba(255, 255, 255, 0.96));
  border-color: rgba(195, 210, 235, 0.42);
  color: #6f7c95;
}

.song-tag-chip.tag-saltline,
.song-tag-filter-chip.tag-saltline {
  background: linear-gradient(135deg, rgba(210, 247, 250, 0.84), rgba(239, 252, 255, 0.96));
  border-color: rgba(75, 189, 206, 0.34);
  color: #216b79;
}

.song-tags-cell {
  white-space: normal;
}

.song-tags-empty {
  color: var(--muted);
}

.song-inline-input {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  font-size: 0.88rem;
}

.song-inline-number {
  text-align: center;
}

.song-inline-select {
  margin-bottom: 0;
}

.song-inline-last {
  white-space: normal;
}

.song-inline-tail {
  display: flex;
  align-items: center;
  gap: 8px;
}

.song-inline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.song-inline-tail .song-inline-select {
  flex: 1 1 auto;
}

.song-inline-button {
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
}

.song-inline-button.save {
  background: rgba(75, 189, 206, 0.2);
  border-color: rgba(75, 189, 206, 0.36);
}

.song-inline-button.cancel {
  background: rgba(255, 255, 255, 0.06);
}

.song-inline-tags-row {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.song-inline-tags-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.song-random-modal {
  position: fixed;
  inset: 0;
  z-index: 62;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 14, 18, 0.44);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.song-random-dialog {
  width: min(100%, 520px);
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 24px;
  background: var(--panel-strong);
  box-shadow: var(--shadow-xl);
}

.song-random-form h3 {
  margin: 0 0 16px;
  font-family: "Gugi", "Noto Sans", sans-serif;
  font-size: 1.5rem;
}

.song-random-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.song-random-fields label {
  display: grid;
  gap: 8px;
}

.song-random-fields span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.song-random-fields select,
.song-random-fields input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.song-random-submit {
  margin-top: 14px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(75, 189, 206, 0.36);
  background: linear-gradient(135deg, rgba(75, 189, 206, 0.28), rgba(47, 167, 187, 0.42));
  color: var(--text);
  font-weight: 900;
}

.song-random-results {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.song-random-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
}

.song-random-item strong,
.song-random-item p {
  margin: 0;
}

.song-random-item p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
}

.editor-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(7, 11, 15, 0.4);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.editor-panel {
  width: min(100%, 900px);
  max-height: min(88vh, 960px);
  margin: 0;
  padding: 20px;
  overflow: auto;
}

.editor-form {
  margin-top: 14px;
}

.editor-head {
  display: flex;
  justify-content: center;
  margin-bottom: 2px;
}

.editor-inline-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.editor-time-grid {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.editor-form label,
.editor-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.editor-day-note {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}

.editor-form label > span,
.editor-field-title {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.slot-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.editor-slot {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(75, 189, 206, 0.08), var(--panel-soft));
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, opacity 140ms ease;
}

.editor-slot.dragging {
  opacity: 0.72;
  transform: scale(0.992);
}

.editor-slot.drag-over {
  border-color: rgba(75, 189, 206, 0.68);
  box-shadow:
    0 0 0 2px rgba(75, 189, 206, 0.18),
    0 14px 28px rgba(75, 189, 206, 0.12);
}

.editor-slot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.editor-slot-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.editor-slot-head strong {
  font-size: 1.04rem;
  color: var(--text);
}

.editor-slot-drag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px dashed rgba(75, 189, 206, 0.42);
  border-radius: 10px;
  background: rgba(75, 189, 206, 0.12);
  color: var(--primary);
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1;
  cursor: grab;
  user-select: none;
}

.editor-slot-drag:active {
  cursor: grabbing;
}

.editor-slot-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-form input,
.editor-form select,
.editor-form textarea {
  width: 100%;
  margin-top: 8px;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel-soft);
  color: var(--text);
  outline: none;
  font-size: 0.95rem;
  font-weight: 600;
}

.editor-form select {
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.editor-slot textarea {
  min-height: 42px;
  resize: none;
}

#editor-day-note {
  min-height: 42px;
  resize: none;
}

.editor-head h3 {
  font-family: "Gugi", "Noto Sans", sans-serif;
  font-size: clamp(1.8rem, 2.6vw, 2.35rem);
  font-weight: 400;
  letter-spacing: -0.04em;
  text-align: center;
  color: var(--text);
}

.editor-row-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.editor-row-button.add {
  background: rgba(75, 189, 206, 0.18);
  border-color: rgba(75, 189, 206, 0.34);
}

.editor-row-button.remove {
  background: rgba(255, 112, 112, 0.14);
  border-color: rgba(255, 112, 112, 0.28);
}

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.save-button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #071114;
  font-weight: 900;
}

.save-status {
  margin: 0 2px 0 auto;
  min-height: 1.2em;
  text-align: right;
  font-size: 0.82rem;
}

.note-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(10, 14, 18, 0.44);
}

.note-dialog {
  width: min(100%, 560px);
  padding: 18px;
}

.note-meta {
  margin: 12px 0 0;
  font-size: 0.88rem;
}

.note-content {
  margin: 14px 0 0;
  white-space: pre-wrap;
  font-family: inherit;
  color: var(--text);
  line-height: 1.6;
}

@media (max-width: 1520px) {
  .youtube-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 1360px) {
  .viewer-board {
    grid-template-columns: 232px minmax(0, 1fr);
  }

  .calendar-day,
  .calendar-empty {
    min-height: 172px;
  }
}

@media (max-width: 1220px) {
  .viewer-board {
    grid-template-columns: 1fr;
  }

  .viewer-left {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
  }
}

@media (max-width: 1080px) {
  .legend-list-inline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .postit-card {
    min-height: 220px;
  }
}

@media (max-width: 960px) {
  .viewer-left {
    grid-template-columns: 1fr;
  }

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

  .youtube-cards {
    grid-template-columns: 1fr;
  }

  .video-card {
    grid-template-columns: 132px minmax(0, 1fr);
  }

  .video-thumb {
    width: 132px;
    height: 78px;
  }
}

@media (max-width: 860px) {
  .topbar {
    top: 12px;
    padding: 0 14px;
  }

  .brand-mark {
    font-size: 0.94rem;
  }

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

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    width: min(420px, 100%);
    margin-inline: auto;
  }

  .hero-link,
  .hero-secondary-link {
    width: 100%;
  }

  .calendar-head {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-nav-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .songbook-head {
    flex-direction: column;
    align-items: stretch;
  }

  .songbook-head-actions {
    justify-content: flex-start;
  }

  .songbook-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .song-undo-bar {
    right: -10px;
    top: 108px;
  }

  .song-table-head,
  .song-item-content,
  .song-item {
    grid-template-columns: 64px minmax(0, 1.05fr) minmax(0, 1fr) minmax(0, 0.9fr) 112px minmax(150px, 1fr);
  }

  .editor-inline-fields {
    grid-template-columns: 1fr;
  }

  .editor-time-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .viewer-shell,
  .songbook-shell {
    padding: 0 10px 44px;
  }

  .viewer-shell {
    margin-top: -24px;
  }

  .viewer-board,
  .songbook-board {
    padding: 16px;
    border-radius: 24px;
  }

  .profile-card,
  .status-card,
  .postit-card {
    transform: none;
  }

  .profile-card:hover,
  .status-card:hover,
  .postit-card:hover {
    transform: none;
  }

  .service-row {
    justify-content: center;
  }

  .status-copy {
    white-space: normal;
  }

  .calendar-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .weekday-row,
  .calendar-grid {
    grid-template-columns: repeat(7, minmax(92px, 1fr));
    min-width: 644px;
  }

  .calendar-empty {
    display: block;
  }

  .calendar-day,
  .calendar-empty {
    min-height: 148px;
  }

  .calendar-bottom {
    flex-direction: column;
    align-items: stretch;
  }

  .calendar-footnote {
    margin: 0;
    text-align: left;
  }

  .songbook-head-actions {
    flex-wrap: wrap;
    gap: 8px;
  }

  .song-random-button {
    flex: 1 1 140px;
    min-width: 0;
  }

  .songbook-editor {
    grid-template-columns: 1fr;
  }

  .song-inline-tags-row {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .song-undo-bar {
    position: static;
    margin: 0 0 14px;
  }

  .song-random-fields {
    grid-template-columns: 1fr;
  }

  .song-table-head,
  .song-item-content,
  .song-item {
    grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr);
  }

  .song-table-head > :nth-child(4),
  .song-table-head > :nth-child(5),
  .song-table-head > :nth-child(6),
  .song-item-content > :nth-child(4),
  .song-item-content > :nth-child(5),
  .song-item-content > :nth-child(6) {
    display: none;
  }
}

html.force-desktop-mobile .topbar {
  top: 18px;
  padding: 0 clamp(18px, 4vw, 36px);
}

html.force-desktop-mobile .brand-mark {
  font-size: clamp(1rem, 1.35vw, 1.12rem);
}

html.force-desktop-mobile .hero h1 {
  font-size: clamp(3.7rem, 9.3vw, 8.2rem);
}

html.force-desktop-mobile .hero-actions {
  flex-direction: row;
  align-items: center;
  width: auto;
}

html.force-desktop-mobile .hero-link,
html.force-desktop-mobile .hero-secondary-link {
  width: auto;
}

html.force-desktop-mobile .viewer-shell,
html.force-desktop-mobile .songbook-shell {
  padding: 0 clamp(16px, 3vw, 34px) 60px;
}

html.force-desktop-mobile .viewer-shell {
  margin-top: -42px;
}

html.force-desktop-mobile .viewer-board,
html.force-desktop-mobile .songbook-board {
  padding: 28px;
  border-radius: var(--radius-xl);
}

html.force-desktop-mobile .viewer-board {
  grid-template-columns: 248px minmax(0, 1fr);
}

html.force-desktop-mobile .viewer-left {
  display: flex;
  grid-template-columns: none;
}

html.force-desktop-mobile .profile-card {
  transform: rotate(-1.2deg);
}

html.force-desktop-mobile .status-card {
  transform: rotate(1deg);
}

html.force-desktop-mobile .postit-card {
  transform: rotate(-1.8deg);
}

html.force-desktop-mobile .profile-card:hover,
html.force-desktop-mobile .status-card:hover,
html.force-desktop-mobile .postit-card:hover {
  transform: rotate(0deg) translateY(-2px);
}

html.force-desktop-mobile .service-row {
  justify-content: flex-start;
}

html.force-desktop-mobile .status-copy {
  white-space: nowrap;
}

html.force-desktop-mobile .calendar-head {
  flex-direction: row;
  align-items: center;
}

html.force-desktop-mobile .calendar-nav-wrap {
  width: auto;
  justify-content: flex-start;
}

html.force-desktop-mobile .calendar-card {
  overflow-x: visible;
}

html.force-desktop-mobile .weekday-row,
html.force-desktop-mobile .calendar-grid {
  grid-template-columns: repeat(7, minmax(0, 1fr));
  min-width: 0;
}

html.force-desktop-mobile .calendar-day,
html.force-desktop-mobile .calendar-empty {
  min-height: 182px;
}

html.force-desktop-mobile .calendar-bottom {
  flex-direction: row;
  align-items: flex-end;
}

html.force-desktop-mobile .calendar-footnote {
  margin: 0 2px 0 auto;
  text-align: right;
}

html.force-desktop-mobile .songbook-head {
  flex-direction: row;
  align-items: flex-end;
}

html.force-desktop-mobile .songbook-head-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 10px;
}

html.force-desktop-mobile .song-random-button {
  flex: 0 0 auto;
  min-width: 134px;
}

html.force-desktop-mobile .songbook-editor {
  grid-template-columns: minmax(220px, 1.3fr) minmax(220px, 1.25fr) minmax(160px, 0.95fr) minmax(180px, 1fr) 130px 88px;
}

html.force-desktop-mobile .song-table-head,
html.force-desktop-mobile .song-item-content,
html.force-desktop-mobile .song-item {
  grid-template-columns: 76px minmax(0, 1.2fr) minmax(0, 1.15fr) minmax(0, 0.95fr) 120px minmax(180px, 1fr);
}

html.force-desktop-mobile .song-table-head > :nth-child(4),
html.force-desktop-mobile .song-table-head > :nth-child(5),
html.force-desktop-mobile .song-table-head > :nth-child(6),
html.force-desktop-mobile .song-item-content > :nth-child(4),
html.force-desktop-mobile .song-item-content > :nth-child(5),
html.force-desktop-mobile .song-item-content > :nth-child(6) {
  display: block;
}
