/* ==========================================================
   01. 테마 / 기본 스타일
   ========================================================== */

:root {
  --text: #37304b;
  --muted: #696177;

  --primary: #7450b5;
  --primary-dark: #59368e;

  --pink: #ffe1ee;
  --purple: #eee4ff;
  --yellow: #fff2bb;

  --background: #fff9fc;
  --surface: #ffffff;
  --border: #e7ddec;

  --radius: 24px;
  --shadow: 0 8px 0 #eee4f2;
  --page-width: 760px;

  /* 이미지 영역 높이 */
  --story-height: 320px;
  --profile-height: 320px;

  /* 클릭 후 이미지와 설명 배경의 불투명도 */
  --story-image-opacity: 0.45;
  --story-overlay-background: rgba(149, 149, 149, 0.528);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  color: var(--text);
  background-color: var(--background);

  background-image: radial-gradient(
    #ddcce4 1px,
    transparent 1px
  );
  background-size: 22px 22px;

  font-family:
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    sans-serif;

  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

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

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h2 {
  margin-top: 12px;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.4;
  letter-spacing: -1px;
}

img {
  display: block;
  max-width: 100%;
}

.skip {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 100;

  padding: 12px 20px;
  border-radius: 12px;

  color: white;
  background: var(--primary);
}

.skip:focus {
  top: 12px;
}

.visually-hidden {
  position: absolute;

  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;

  overflow: hidden;
  clip-path: inset(50%);

  white-space: nowrap;
  border: 0;
}

/* ==========================================================
   02. 본문 / 명함형 카드
   ========================================================== */

#main {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 24px;
}

.section,
.hero {
  width: min(var(--page-width), calc(100% - 28px));
  margin: 0 auto;
}

.section {
  padding: 28px;

  border: 2px solid var(--border);
  border-radius: var(--radius);

  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;

  gap: 10px;
  margin-bottom: 28px;
}

.section-caption,
.muted {
  color: var(--muted);
}

.section-caption {
  font-size: 14px;
}

.eyebrow {
  display: inline-block;

  padding: 4px 13px;
  border-radius: 999px;

  color: var(--primary-dark);
  background: var(--purple);

  font-size: 14px;
  font-weight: 700;
}

.sample-note {
  margin-top: 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ==========================================================
   03. 상단 로고 / 전체 카테고리 메뉴
   ========================================================== */

.header {
  position: sticky;
  top: 0;
  z-index: 30;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  min-height: 80px;

  padding: 14px max(
    20px,
    calc((100% - var(--page-width)) / 2)
  );

  border-bottom: 2px solid #efb2ce;
  background: #ffcee2;
}

.brand {
  color: var(--primary-dark);

  font-size: 24px;
  font-weight: 900;
  line-height: 1.4;
  letter-spacing: -1px;
}

.brand small {
  display: block;
  margin-top: 3px;

  color: var(--muted);

  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0;
}

.header .brand {
  min-width: 0;
  font-size: 22px;
}

.header .menu-toggle {
  display: grid;
  place-items: center;
  flex-shrink: 0;

  width: 48px;
  height: 48px;
  padding: 0;

  border: 1px solid #efb2ce;
  border-radius: 14px;

  background: white;
  font-size: 16px;
}

.menu-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.menu-icon span {
  display: block;

  width: 23px;
  height: 3px;
  border-radius: 999px;

  background: var(--primary-dark);
}

.menu-toggle[aria-expanded="true"] .menu-icon {
  position: relative;
  width: 23px;
  height: 19px;
}

.menu-toggle[aria-expanded="true"] .menu-icon span {
  position: absolute;
  top: 8px;
  left: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(1) {
  transform: rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-icon span:nth-child(3) {
  transform: rotate(-45deg);
}

.header #navigation {
  position: absolute;
  top: calc(100% + 10px);

  right: max(
    14px,
    calc((100% - var(--page-width)) / 2)
  );

  display: grid;
  grid-template-columns: minmax(0, 1fr);

  width: min(260px, calc(100vw - 28px));
  max-height: calc(100dvh - 110px);
  overflow-y: auto;

  gap: 10px;
  padding: 20px;

  border: 2px solid var(--border);
  border-radius: 22px;

  background: white;
  box-shadow: 0 12px 32px #59368e26;
}

.category-title {
  grid-column: 1 / -1;
  margin-bottom: 4px;

  color: var(--primary-dark);
  font-size: 17px;
  font-weight: 800;
}

.header #navigation a {
  display: flex;
  align-items: center;
  justify-content: center;

  min-height: 58px;
  padding: 12px;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--background);

  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.header #navigation a:hover,
.header #navigation a.active {
  color: var(--primary-dark);
  background: var(--pink);
}

/* ==========================================================
   04. TOP / 버튼
   ========================================================== */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;

  gap: 24px;
  padding: 28px;

  border: 2px solid var(--border);
  border-radius: 36px;

  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-copy h1 {
  margin: 22px 0;

  font-size: clamp(34px, 7vw, 48px);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -2px;
}

.hero-copy h1 em {
  color: var(--primary-dark);
  font-style: normal;
  box-shadow: inset 0 -14px var(--pink);
}

.hero-copy p {
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 18px;
  margin: 28px 0 20px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 46px;
  padding: 11px 22px;
  border-radius: 999px;

  font-size: 14px;
  font-weight: 700;

  transition:
    transform 0.2s,
    background-color 0.2s;
}

.dark {
  color: white;
  background: var(--primary);
  box-shadow: 0 4px 0 var(--primary-dark);
}

.dark:hover {
  transform: translateY(-2px);
  background: var(--primary-dark);
}

.text-link {
  border-bottom: 2px dashed var(--primary);
  color: var(--primary-dark);
  font-size: 14px;
}

.hero-bottom {
  grid-column: 1;

  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: 12px;
  padding-top: 20px;

  border-top: 2px dashed var(--border);
  color: var(--muted);
  font-size: 13px;
}

.hero-bottom a {
  color: var(--primary-dark);
  font-weight: 700;
}

/* ==========================================================
   05. 프로필 / 채널 링크
   ========================================================== */

.profile-section {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.profile-art {
  position: relative;

  min-width: 0;
  height: var(--profile-height);

  overflow: hidden;
  border-radius: 24px;
  background: transparent;
}

/* 높이에 맞춘 뒤 좌우로 넘치는 부분 자르기 */
.profile-art img {
  position: absolute;
  top: 0;
  left: 50%;

  width: auto;
  height: 100%;
  max-width: none;

  transform: translateX(-50%);
}

.profile-copy > p {
  margin-top: 20px;
}

.profile-copy dl {
  margin: 24px 0;
}

.profile-copy dl div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);

  gap: 12px;
  padding: 10px 0;

  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}

.profile-copy dt {
  color: var(--muted);
}

.profile-copy dd {
  margin: 0;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-links a,
.social-links button {
  display: inline-flex;
  align-items: center;
  gap: 8px;

  min-height: 44px;
  padding: 8px 16px;

  border: 1px solid var(--border);
  border-radius: 999px;

  background: var(--purple);
  font-size: 14px;
}

.social-links a:hover,
.social-links button:hover {
  background: var(--pink);
}

.social-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

/* ==========================================================
   06. 공지 목록
   ========================================================== */

.notice-list {
  display: grid;
  gap: 12px;
}

.notice-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 100px 24px;
  align-items: center;

  gap: 14px;
  width: 100%;
  padding: 20px;

  border: 1px solid var(--border);
  border-radius: 16px;

  background: var(--background);
  text-align: left;

  transition: background-color 0.2s;
}

.notice-row:hover {
  background: var(--purple);
}

.notice-row strong {
  font-size: 16px;
  font-weight: 700;
}

.notice-row time {
  color: var(--muted);
  font-size: 13px;
}

.notice-row {
  grid-template-columns: max-content minmax(0, 1fr) 100px 24px;
}

.notice-row .tag {
  box-sizing: content-box;
  min-width: 4em;
  white-space: nowrap;
  text-align: center;
}

.notice-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* 공지 플래그 — 4글자까지 한 줄로 표시 */
.notice-row .tag {
  box-sizing: content-box;
  min-width: 4em;
  white-space: nowrap;
  flex-shrink: 0;
  text-align: center;
}

.tag {
  width: fit-content;
  padding: 3px 10px;
  border-radius: 8px;

  color: var(--primary-dark);
  background: var(--pink);
  font-size: 13px;
}

.plus {
  color: var(--primary);
  font-size: 24px;
  text-align: center;
}

/* ==========================================================
   07. 음악 / 굿즈 카드
   ========================================================== */

.content-card {
  display: block;

  min-width: 0;
  width: 100%;
  padding: 12px 12px 18px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: white;
  text-align: left;

  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px #7450b51a;
}

.cover {
  position: relative;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  aspect-ratio: 1;

  overflow: hidden;
  border-radius: 14px;

  color: var(--primary-dark);
  background: var(--pink);
}

.cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-title,
.goods-placeholder {
  max-width: 100%;
  padding: 42px 14px;

  font-size: clamp(20px, 4vw, 30px);
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.cover-title small,
.goods-placeholder small {
  display: block;
  margin-top: 14px;

  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
}

.cover-two {
  background: var(--purple);
}

.cover-three {
  background: var(--yellow);
}

.card-label {
  position: absolute;
  top: 14px;
  left: 14px;

  padding: 3px 8px;
  border-radius: 999px;

  color: var(--primary-dark);
  background: #ffffffed;
  font-size: 12px;
}

.play {
  position: absolute;
  right: 14px;
  bottom: 14px;

  display: grid;
  place-items: center;

  width: 44px;
  height: 44px;
  border-radius: 50%;

  color: var(--primary);
  background: white;
}

.content-card h3 {
  margin: 16px 4px 4px;
  font-size: 17px;
  line-height: 1.5;
}

.content-card p {
  margin-inline: 4px;
  color: var(--muted);
  font-size: 14px;
}

.goods-section {
  background: #fffdf4;
}

.goods-cover {
  aspect-ratio: 1.15;
  background: #fff3d8;
}

.goods-cover img {
  object-fit: contain;
}

/* ==========================================================
   08. 방송 캘린더
   ========================================================== */

.schedule-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.calendar {
  min-width: 0;
  padding: 20px;

  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;

  gap: 12px;
  margin-bottom: 24px;
}

.calendar-toolbar h3 {
  font-size: 21px;
}

.calendar-toolbar > div {
  display: flex;
  gap: 6px;
}

.calendar-toolbar button {
  min-width: 40px;
  min-height: 44px;

  padding: 6px 12px;
  border-radius: 12px;

  background: var(--purple);
  font-size: 14px;
}

.calendar-toolbar button:hover {
  background: var(--pink);
}

.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekdays span {
  padding-bottom: 12px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.weekdays span:first-child {
  color: #ac375b;
}

.weekdays span:last-child {
  color: #4764a0;
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 5px;
  min-width: 0;
  min-height: 82px;
  padding: 8px 3px;

  border-top: 1px solid var(--border);
  background: white;
  font-size: 14px;
}

.day:hover {
  background: var(--background);
}

.day.other {
  color: var(--muted);
  background: #faf7fc;
}

.day > span {
  display: grid;
  place-items: center;

  width: 30px;
  height: 30px;
  border-radius: 50%;
}

.day.today > span {
  border: 2px solid var(--primary);
  font-weight: 700;
}

.day.selected {
  border-radius: 12px;
  color: var(--primary-dark);
  background: var(--purple);
}

.event-dot {
  flex-shrink: 0;

  width: 6px;
  height: 6px;
  border-radius: 50%;

  background: var(--primary);
}

.event-name {
  width: 100%;
  overflow: hidden;

  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.legend {
  display: flex;
  flex-wrap: wrap;

  gap: 16px;
  margin-top: 16px;

  color: var(--muted);
  font-size: 12px;
}

.legend span:first-child {
  color: var(--primary-dark);
}

.event-panel {
  min-width: 0;
  padding: 24px;

  border: 1px solid var(--border);
  border-radius: 20px;

  background: var(--background);
}

.event-panel h3 {
  margin: 16px 0 22px;
  font-size: 22px;
}

.event-item {
  padding: 16px 0;
  border-top: 2px dashed var(--border);
}

.event-item time {
  color: var(--primary-dark);
  font-size: 14px;
  font-weight: 700;
}

.event-item h4 {
  margin: 8px 0;
  font-size: 17px;
}

.event-item p,
.empty {
  color: var(--muted);
  font-size: 14px;
}

/* ==========================================================
   09. 최근 이야기 / 고정 크기 이미지
   ========================================================== */

.stories {
  grid-column: 1 / -1;

  min-width: 0;
  padding: 24px;

  border: 2px solid var(--border);
  border-radius: 24px;

  background: white;
}

.stories-heading {
  margin-bottom: 20px;
}

.stories-heading h2 {
  font-size: 25px;
}

.stories-viewport {
  height: var(--story-height);

  overflow: hidden;
  border-radius: 16px;

  touch-action: pan-y;
}

.stories-viewport:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 4px;
}

.stories .story-slide {
  position: relative;
  display: block;

  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;

  overflow: hidden;
  border-radius: 16px;
  background: var(--purple);
}

.story-image-button {
  position: absolute;
  inset: 0;

  display: block;
  width: 100%;
  height: 100%;
  padding: 0;

  overflow: hidden;
  border-radius: inherit;
  background: var(--purple);
}

.story-image-fallback {
  position: absolute;
  inset: 0;

  display: grid;
  place-items: center;

  padding: 20px;
  color: var(--primary-dark);
  font-size: 16px;
}

/* 常に同じ領域を埋め、はみ出す画像を切り取る */
.story-image {
  position: relative;

  width: 100%;
  height: 100%;
  max-width: none;

  object-fit: cover;
  object-position: center;

  transition: opacity 0.2s;
}

.description-open .story-image {
  opacity: var(--story-image-opacity);
}

.story-image-hint {
  position: absolute;
  right: 14px;
  bottom: 14px;

  padding: 6px 12px;
  border-radius: 999px;

  color: white;
  background: #00000080;
  font-size: 13px;
}

.description-open .story-image-hint {
  visibility: hidden;
}

.story-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;

  padding: 52px 24px 24px;

  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;

  color: var(--text);
  background: var(--story-overlay-background);
}

.story-overlay-content {
  width: 100%;
}

.story-description-close {
  position: absolute;
  top: 10px;
  right: 10px;

  width: 36px;
  height: 36px;
  padding: 0;

  border-radius: 50%;

  color: var(--primary-dark);
  background: white;

  font-size: 25px;
  line-height: 1;
}

.story-image-button:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -4px;
}

.story-category {
  display: inline-block;

  margin-bottom: 14px;
  padding: 3px 12px;
  border-radius: 999px;

  color: var(--primary-dark);
  background: #ffffffd9;

  font-size: 14px;
  font-weight: 700;
}

.story-slide h3 {
  margin-bottom: 12px;
  font-size: 23px;
  line-height: 1.4;
}

.story-description {
  color: var(--text);
  white-space: pre-line;
}

.story-meta {
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

.story-timeline {
  display: grid;
  gap: 12px;

  width: 100%;
  margin: 16px 0 0;
  padding: 0;

  list-style: none;
}

.story-timeline li {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);

  gap: 12px;
  padding-bottom: 10px;

  border-bottom: 1px dashed #c9b2e3;
}

.story-timeline time {
  color: var(--primary-dark);
  font-weight: 700;
}

.story-link {
  display: inline-flex;
  align-items: center;

  min-height: 44px;
  margin-top: 20px;
  padding: 8px 16px;

  border-radius: 999px;

  color: var(--primary-dark);
  background: white;

  font-size: 14px;
  font-weight: 700;
}

.stories-controls {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 12px;
  margin-top: 20px;
}

.story-arrow {
  display: grid;
  place-items: center;
  flex-shrink: 0;

  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;

  color: white;
  background: var(--primary);

  font-size: 30px;
  line-height: 1;
}

.story-arrow:hover {
  background: var(--primary-dark);
}

.story-dots {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.story-dot {
  display: grid;
  place-items: center;

  width: 32px;
  height: 44px;
  padding: 0;

  background: transparent;
}

.story-dot::before {
  content: "";

  width: 9px;
  height: 9px;
  border-radius: 999px;

  background: #cbbcdc;

  transition:
    width 0.2s,
    background-color 0.2s;
}

.story-dot.active::before {
  width: 22px;
  background: var(--primary);
}

/* ==========================================================
   10. 푸터 / 상세창
   ========================================================== */

footer {
  margin-top: 48px;
  padding: 40px 24px;

  border-top: 2px dashed var(--border);

  background: #ffcee2;
  text-align: center;
}

footer p {
  margin: 16px 0 8px;
  font-size: 14px;
}

footer small {
  color: var(--muted);
  font-size: 12px;
}

dialog {
  width: min(540px, calc(100% - 32px));
  max-height: 85vh;

  padding: 28px;
  overflow-y: auto;

  border: 2px solid var(--border);
  border-radius: 24px;

  color: var(--text);
  background: white;
}

dialog::backdrop {
  background: #37264780;
  backdrop-filter: blur(5px);
}

.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

#close-dialog {
  flex-shrink: 0;

  width: 44px;
  height: 44px;
  border-radius: 50%;

  background: var(--pink);

  font-size: 26px;
  line-height: 1;
}

dialog h2 {
  margin: 20px 0 12px;
  font-size: 25px;
}

#dialog-meta {
  font-size: 13px;
}

#dialog-body {
  margin: 20px 0;
  white-space: pre-line;
}

dialog .button {
  margin-top: 8px;
}

noscript {
  display: block;
  padding: 20px;
  text-align: center;
}

/* ==========================================================
   11. 모바일
   ========================================================== */

@media (max-width: 640px) {
  .notice-row {
    grid-template-columns: 58px minmax(0, 1fr) 18px;
    gap: 8px;
    padding: 16px 12px;
  }

  .notice-row strong {
    font-size: 15px;
  }

  .notice-row time {
    grid-column: 2;
    grid-row: 2;
  }

  .notice-row .plus {
    grid-column: 3;
    grid-row: 1 / 3;
  }

  .cover {
    aspect-ratio: 1.15;
  }

  .calendar {
    padding: 16px 8px;
  }

  .calendar-toolbar {
    padding-inline: 4px;
  }

  .calendar-toolbar h3 {
    font-size: 18px;
  }

  .calendar-toolbar button {
    min-width: 36px;
    padding-inline: 9px;
  }

  .day {
    min-height: 62px;
  }

  .event-name {
    display: none;
  }

  .event-panel {
    padding: 20px;
  }

  dialog {
    padding: 22px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 12px 16px;
  }

  .header .brand {
    font-size: 20px;
  }

  .hero,
  .section {
    padding: 20px;
  }

  .cover-title,
  .goods-placeholder {
    font-size: 30px;
  }

  .stories {
    padding: 16px;
  }

  .story-slide h3 {
    font-size: 21px;
  }

  .stories-controls {
    gap: 8px;
  }
}

/* 모션 감소 설정 */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ==========================================================
   플레이리스트 / 굿즈 — 가로 스크롤 카드
   ========================================================== */

.card-grid {
  display: flex;
  gap: 18px;

  overflow-x: auto;
  padding: 8px 4px 20px;

  scroll-snap-type: x mandatory;
  scroll-padding-inline: 4px;

  /* 가로 이동이 페이지 전체로 전달되지 않도록 설정 */
  overscroll-behavior-x: contain;

  scrollbar-width: thin;
  scrollbar-color: var(--primary) var(--purple);
}

/* 한 카드의 너비를 고정하고 줄어들지 않도록 설정 */
.card-grid .content-card {
  flex: 0 0 260px;
  min-width: 0;
  width: 260px;

  scroll-snap-align: start;
}

/* 키보드 포커스 시 카드 테두리 표시 */
.card-grid .content-card:focus-visible {
  outline-offset: -3px;
}

/* 스크롤바 */
.card-grid::-webkit-scrollbar {
  height: 8px;
}

.card-grid::-webkit-scrollbar-track {
  border-radius: 999px;
  background: var(--purple);
}

.card-grid::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--primary);
}

/* 모바일에서는 다음 카드가 살짝 보이도록 배치 */
@media (max-width: 480px) {
  .card-grid {
    gap: 14px;
  }

  .card-grid .content-card {
    flex-basis: 82%;
    width: 82%;
  }
}

/* 플레이리스트 / 굿즈 — 마우스 드래그 */
.card-grid,
.card-grid .content-card {
  cursor: grab;
}

.card-grid.is-dragging,
.card-grid.is-dragging * {
  cursor: grabbing;
}

.card-grid.is-dragging {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.card-grid .content-card {
  user-select: none;
  -webkit-user-select: none;
}

.card-grid img {
  -webkit-user-drag: none;
}

/* 자동 정렬 없이 놓은 위치에서 멈추기 */
.card-grid {
  scroll-snap-type: none;
  scroll-behavior: auto;
}

.card-grid .content-card {
  scroll-snap-align: none;
}

/* 공지 노트 — 플래그와 제목 겹침 방지 */
.notice-row {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) 100px 24px;
  gap: 10px 14px;
}

.notice-row .tag {
  grid-column: 1;
  grid-row: 1;

  box-sizing: border-box;
  width: max-content;
  min-width: calc(4em + 24px);
  max-width: none;
  padding-inline: 12px;
  margin: 0;

  justify-self: start;
  white-space: nowrap;
  text-align: center;
}

.notice-row strong {
  grid-column: 2;
  grid-row: 1;

  min-width: 0;
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.notice-row time {
  grid-column: 3;
  grid-row: 1;
}

.notice-row .plus {
  grid-column: 4;
  grid-row: 1;
}

/* 작은 화면: 날짜를 제목 아래로 배치 */
@media (max-width: 600px) {
  .notice-row {
    grid-template-columns: max-content minmax(0, 1fr) 24px;
    padding: 16px;
    gap: 8px 12px;
  }

  .notice-row .tag {
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .notice-row strong {
    grid-column: 2;
    grid-row: 1;
  }

  .notice-row time {
    grid-column: 2;
    grid-row: 2;
  }

  .notice-row .plus {
    grid-column: 3;
    grid-row: 1 / 3;
  }
}
/* 관리자가 입력한 카드 플래그가 카드 안에서 줄바꿈되도록 표시 */
.card-label {
  max-width: calc(100% - 28px);
  overflow-wrap: anywhere;
  text-align: left;
}

.profile-image-fallback{display:grid;place-items:center;width:100%;height:100%;background:var(--purple);color:var(--muted);font-size:14px;}

/* 근황: 모바일 네이티브 가로 스크롤과 부드러운 버튼 이동 */
.stories-viewport{display:flex;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;overscroll-behavior-x:contain;touch-action:pan-x pan-y pinch-zoom;-webkit-overflow-scrolling:touch;scroll-behavior:smooth}
.stories-viewport::-webkit-scrollbar{display:none}.stories .story-slide{flex:0 0 100%;scroll-snap-align:start;scroll-snap-stop:always}.story-image-button img{user-select:none;-webkit-user-drag:none}
@media(prefers-reduced-motion:reduce){.stories-viewport{scroll-behavior:auto}}

.hero-copy p,.profile-copy p,.section-caption,footer p{white-space:pre-line}

.event-item p{white-space:pre-wrap;overflow-wrap:anywhere}
