:root {
  --ink: #171817;
  --muted: #6a6c68;
  --line: #dedfd9;
  --surface: #ffffff;
  --canvas: #f4f4f0;
  --accent: #ff5f45;
  --accent-soft: #fff0eb;
  --mint: #cfe9dd;
  --blue: #dce8f5;
  --yellow: #f5df83;
  --rail: #202321;
  --rail-width: 72px;
  --drawer-width: 288px;
  --max-content: 1280px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", Arial, sans-serif;
  letter-spacing: 0;
}

body.is-overlay-open {
  overflow: hidden;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

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

button {
  color: inherit;
}

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

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

[hidden] {
  display: none !important;
}

.prototype-tools {
  position: fixed;
  z-index: 200;
  top: auto;
  right: 18px;
  bottom: 18px;
  width: 218px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #cfd1cb;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(23, 24, 23, 0.1);
}

.prototype-tools:has(details:not([open])) {
  width: 112px;
}

.prototype-tools summary {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.prototype-tools__body {
  padding: 0 12px 12px;
}

.prototype-tools__label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.prototype-segment {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 3px;
  background: #eeefeb;
  border-radius: 6px;
}

.prototype-segment button {
  min-width: 0;
  padding: 7px 3px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
}

.prototype-segment button.is-active {
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(23, 24, 23, 0.12);
  font-weight: 800;
}

.prototype-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
  font-size: 12px;
  cursor: pointer;
}

.prototype-toggle input {
  accent-color: var(--accent);
}

.app-frame {
  display: grid;
  grid-template-columns: var(--rail-width) minmax(0, var(--max-content));
  width: min(calc(var(--max-content) + var(--rail-width)), 100%);
  min-height: 100vh;
  margin: 0 auto;
  background: var(--surface);
  border-inline: 1px solid #d9dad5;
}

.side-rail {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  width: var(--rail-width);
  padding: 18px 0;
  background: var(--rail);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 34px;
}

.rail-button {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #f6f7f3;
  background: transparent;
  border: 0;
  border-radius: 7px;
  font-size: 24px;
  cursor: pointer;
}

.rail-button:hover,
.rail-button:focus-visible {
  background: #373b38;
  outline: none;
}

.rail-button.is-active {
  color: var(--ink);
  background: var(--yellow);
}

.rail-button--menu {
  font-size: 25px;
}

.rail-button::after {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 50;
  padding: 7px 9px;
  color: #fff;
  background: #111;
  border-radius: 4px;
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(4px, -50%);
  transition: 150ms ease;
  white-space: nowrap;
}

.rail-button:hover::after,
.rail-button:focus-visible::after {
  opacity: 1;
  transform: translate(0, -50%);
}

.popular-mark {
  position: relative;
  display: inline-block;
  width: 17px;
  height: 22px;
  color: transparent;
  background: currentColor;
  border-radius: 70% 30% 55% 45%;
  transform: rotate(12deg);
}

.rail-button .popular-mark {
  color: #f6f7f3;
}

.site-column {
  min-width: 0;
  background: var(--surface);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.header-topline {
  display: grid;
  grid-template-columns: 136px minmax(320px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 48px;
}

.wordmark {
  font-size: 21px;
  font-weight: 900;
}

.wordmark-short {
  display: none;
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
  height: 48px;
  background: #f2f3ef;
  border: 1px solid transparent;
  border-radius: 7px;
  transition: border-color 150ms ease, background 150ms ease;
}

.search-form:focus-within {
  background: var(--surface);
  border-color: var(--ink);
}

.search-form input {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 8px 0 16px;
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 14px;
}

.search-form input::placeholder {
  color: #858780;
}

.search-form button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 42px;
  padding: 0;
  background: transparent;
  border: 0;
  font-size: 27px;
  cursor: pointer;
}

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

.notification-button,
.profile-button,
.drawer-close {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

.ticket-mark {
  font-size: 20px;
  transform: rotate(-8deg);
}

.notification-button {
  font-size: 23px;
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  color: #fff;
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
}

.profile-button {
  background: var(--mint);
  border-color: transparent;
  font-weight: 900;
}

.login-label {
  display: none;
}

.nav-scrim {
  position: fixed;
  z-index: 140;
  inset: 0;
  background: rgba(17, 19, 18, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.nav-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}

.navigation-drawer {
  position: fixed;
  z-index: 150;
  top: 0;
  bottom: 0;
  left: max(0px, calc((100vw - (var(--max-content) + var(--rail-width))) / 2));
  width: var(--drawer-width);
  overflow-y: auto;
  color: #f7f7f4;
  background: var(--rail);
  box-shadow: 18px 0 46px rgba(15, 17, 16, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-18px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.navigation-drawer.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 74px;
  padding: 0 18px 0 14px;
  border-bottom: 1px solid #3b3f3c;
}

.drawer-close {
  width: 44px;
  height: 44px;
  color: #fff;
  background: transparent;
  border-color: transparent;
  border-radius: 7px;
  font-size: 24px;
}

.drawer-close:hover,
.drawer-close:focus-visible {
  background: #373b38;
  outline: none;
}

.drawer-header strong {
  font-size: 16px;
}

.drawer-nav {
  padding: 12px 10px 28px;
}

.drawer-group {
  padding: 12px 0;
  border-top: 1px solid #3b3f3c;
}

.drawer-group--primary {
  padding-top: 0;
  border-top: 0;
}

.drawer-group__title {
  display: block;
  padding: 3px 12px 8px;
  color: #aeb3af;
  font-size: 11px;
  font-weight: 800;
}

.drawer-link {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0 12px;
  color: #f6f7f3;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.drawer-link:hover,
.drawer-link:focus-visible {
  background: #373b38;
  outline: none;
}

.drawer-link.is-active {
  color: var(--ink);
  background: var(--yellow);
  font-weight: 800;
}

.drawer-link > span:first-child {
  display: grid;
  place-items: center;
  width: 24px;
  font-size: 19px;
}

.drawer-link .popular-mark {
  width: 14px;
  height: 19px;
  color: currentColor;
}

.drawer-chevron {
  color: #aeb3af;
  font-size: 21px !important;
}

.drawer-badge {
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  color: #fff;
  background: var(--accent);
  border-radius: 10px;
  font-size: 10px;
}

.survey-status {
  padding: 4px 6px;
  color: #272a27;
  background: #dfe2dc;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

body:not([data-taste-state="empty"]) .survey-status {
  display: none;
}

.header-popover {
  position: absolute;
  z-index: 65;
  top: calc(100% + 8px);
  right: 28px;
  width: 300px;
  overflow: hidden;
  background: #fff;
  border: 1px solid #d6d8d2;
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(23, 24, 23, 0.16);
}

.profile-menu {
  width: 220px;
}

.profile-menu button,
.notification-item {
  width: 100%;
  min-height: 42px;
  padding: 0 14px;
  text-align: left;
  background: #fff;
  border: 0;
  cursor: pointer;
}

.profile-menu button:hover,
.profile-menu button:focus-visible,
.notification-item:hover,
.notification-item:focus-visible {
  background: #f2f3ef;
  outline: none;
}

.profile-menu__group {
  padding: 5px 0;
  border-block: 1px solid #e7e8e3;
}

.profile-menu__host {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 800;
}

.popover-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid #e7e8e3;
}

.popover-title button {
  padding: 5px;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 11px;
  cursor: pointer;
}

.notification-item {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-height: 64px;
  border-bottom: 1px solid #eeeeea;
}

.notification-item strong {
  font-size: 12px;
}

.notification-item span {
  color: var(--muted);
  font-size: 10px;
}

.notification-item.is-unread {
  background: #f1f6f2;
}

.mobile-context-header {
  display: none;
}

body.is-logged-out .notification-button {
  display: none;
}

body.is-logged-out .profile-button {
  width: auto;
  padding: 0 14px;
  background: #fff;
  border-radius: 6px;
}

body.is-logged-out .profile-avatar {
  display: none;
}

body.is-logged-out .login-label {
  display: inline;
  font-size: 12px;
  font-weight: 800;
}

body.is-logged-out [data-member-only],
body.is-logged-out .drawer-badge,
body.is-logged-out .rail-invitation .notification-badge,
body.is-logged-out .mobile-ticket b {
  display: none;
}

main {
  padding: 28px 28px 80px;
}

.campaign-section {
  position: relative;
}

.campaign {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(350px, 0.94fr);
  height: 292px;
  overflow: hidden;
  background: #f8eaa7;
  border-radius: 8px;
}

.campaign-copy {
  display: grid;
  grid-template-rows: 30px 104px 48px 28px;
  align-content: center;
  padding: 36px 42px;
  background: #f8eaa7;
}

.campaign-copy--blue {
  background: var(--blue);
}

.campaign-copy--green {
  background: var(--mint);
}

.campaign-label {
  display: inline-flex;
  align-self: start;
  justify-self: start;
  margin: 0;
  padding: 6px 9px;
  color: #fff;
  background: var(--ink);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
}

.campaign h1 {
  align-self: center;
  max-width: 490px;
  margin: 0;
  font-size: 40px;
  line-height: 1.16;
  letter-spacing: 0;
}

.campaign p {
  align-self: center;
  margin: 0;
  color: #4e504c;
  font-size: 14px;
  line-height: 1.6;
}

.text-link {
  align-self: end;
  justify-self: start;
  padding: 0 0 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.campaign-media {
  height: 292px;
  min-height: 0;
}

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

.campaign-controls {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding-top: 10px;
}

.campaign-all-link {
  position: absolute;
  right: 0;
  bottom: 9px;
  color: #555a56;
  font-size: 11px;
  font-weight: 800;
}

.campaign-all-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.campaign-dots {
  display: flex;
  gap: 7px;
}

.campaign-dots button {
  width: 9px;
  height: 9px;
  padding: 0;
  background: #fff;
  border: 1px solid #aeb0aa;
  border-radius: 50%;
  cursor: pointer;
}

.campaign-dots button.is-active {
  width: 9px;
  background: var(--ink);
  border-color: var(--ink);
}

.recommendation-section {
  padding-top: 42px;
}

.recommendation-heading {
  margin-bottom: 15px;
}

.section-kicker {
  color: var(--accent);
  font-size: 11px;
  font-weight: 900;
}

.recommendation-heading h2 {
  margin: 5px 0 0;
  font-size: 28px;
}

.taste-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 66px;
  margin-bottom: 22px;
  padding: 12px 16px;
  background: #f5f6f2;
  border-block: 1px solid #dfe1db;
}

.taste-control__copy {
  min-width: 0;
}

.taste-control__label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.taste-control__copy strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
}

.taste-control__copy p {
  margin: 0;
  color: #555751;
  font-size: 13px;
  line-height: 1.5;
}

.taste-control__edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 13px;
  background: #fff;
  border: 1px solid #bfc2bb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.taste-control--upgrade {
  justify-content: flex-start;
  min-height: 82px;
  background: #edf6f0;
  border: 1px solid #bfd8c8;
  border-radius: 7px;
}

.taste-control__sparkle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  background: var(--yellow);
  border-radius: 50%;
  font-size: 20px;
}

.ai-interview-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  margin-left: auto;
  padding: 0 16px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.empty-taste {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  min-height: 190px;
  padding: 36px 40px;
  background: #eef3ef;
  border: 1px solid #dce6df;
  border-radius: 8px;
}

.empty-taste__copy {
  display: flex;
  align-items: center;
  gap: 18px;
}

.empty-taste__mark {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  background: var(--yellow);
  border-radius: 50%;
  font-size: 27px;
}

.empty-taste h3 {
  margin: 0 0 7px;
  font-size: 20px;
}

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

.primary-button {
  min-height: 46px;
  padding: 0 20px;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.program-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 34px 20px;
}

.program-card {
  position: relative;
  min-width: 0;
}

.program-card--boost {
  padding: 10px 10px 12px;
  background: #fffdf4;
  border: 2px solid #d2ad28;
  border-radius: 8px;
}

.program-card--boost .save-button {
  top: 20px;
  right: 20px;
}

.program-card--boost .card-feedback-control {
  top: 20px;
  right: 64px;
}

.program-image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #e8e9e4;
  border-radius: 7px;
}

.program-image img {
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

.program-card:hover .program-image img {
  transform: scale(1.025);
}

.program-label,
.boost-label,
.strong-match-label {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 8px;
  color: #fff;
  background: rgba(23, 24, 23, 0.88);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}

.program-label--new {
  color: var(--ink);
  background: var(--yellow);
}

.boost-label {
  color: var(--ink);
  background: var(--yellow);
}

.strong-match-label {
  color: #173f67;
  background: #dcecff;
  border: 1px solid #9fc2e6;
}

.save-button {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 50%;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.save-button.is-saved {
  color: #fff;
  background: var(--accent);
}

.card-feedback-control {
  position: absolute;
  z-index: 8;
  top: 10px;
  right: 54px;
}

.card-menu-button {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  padding: 0 0 6px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border: 0;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.card-menu-button:hover,
.card-menu-button[aria-expanded="true"] {
  background: #fff;
  box-shadow: 0 0 0 2px var(--ink);
}

.card-feedback-menu {
  position: absolute;
  z-index: 9;
  top: 43px;
  right: 0;
  width: 178px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(23, 24, 23, 0.18);
}

.card-feedback-menu button {
  display: block;
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.card-feedback-menu button:hover,
.card-feedback-menu button:focus-visible {
  background: #f0f1ed;
}

.card-feedback-menu button:last-child {
  color: #a33c32;
}

.program-card__body {
  padding: 15px 2px 0;
}

.host-name {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.program-card h3 {
  margin: 5px 0 7px;
  font-size: 20px;
  line-height: 1.35;
}

.program-meta {
  margin: 0;
  color: #575955;
  font-size: 13px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag-row span {
  padding: 5px 7px;
  color: #51534f;
  background: #f1f2ee;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.match-reason {
  min-height: 42px;
  margin: 13px 0 0;
  padding: 10px 12px;
  color: #38473f;
  background: #edf4ef;
  border-left: 3px solid #86ad98;
  font-size: 12px;
  line-height: 1.55;
}

.program-card--boost .match-reason {
  color: #594a19;
  background: #fff8d9;
  border-left-color: #d5b438;
}

body[data-taste-state="ai"] .program-card--strong-match .match-reason {
  color: #254d74;
  background: #edf5fd;
  border-left-color: #72a8d8;
}

.program-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
  font-size: 13px;
}

.program-card__footer strong {
  font-size: 15px;
}

.program-card__footer span {
  color: var(--muted);
}

.feed-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 12px;
}

.loading-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #d9dbd5;
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: feed-spin 700ms linear infinite;
}

.feed-loader:not(.is-loading) .loading-spinner,
.feed-loader:not(.is-loading) .feed-loader__text {
  visibility: hidden;
}

.feed-loader.is-complete {
  display: none;
}

.feed-end {
  max-width: 520px;
  margin: 40px auto 0;
  padding: 28px 22px;
  text-align: center;
  background: #f5f6f2;
  border-radius: 8px;
}

.feed-end[hidden] {
  display: none;
}

.feed-end strong {
  display: block;
  font-size: 17px;
}

.feed-end p {
  margin: 7px 0 18px;
  color: var(--muted);
  font-size: 12px;
}

.feed-end a {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  color: #fff;
  background: var(--ink);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.extra-card.is-revealed {
  animation: card-reveal 280ms ease both;
}

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

@keyframes card-reveal {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-footer {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 34px 28px 40px;
  color: #74766f;
  background: #f3f4f0;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.site-footer strong {
  color: var(--ink);
  font-size: 15px;
}

.invite-toast {
  position: fixed;
  z-index: 80;
  right: max(24px, calc((100vw - 1352px) / 2 + 24px));
  bottom: 24px;
  display: flex;
  align-items: center;
  min-width: 320px;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
  border-radius: 7px;
  box-shadow: 0 14px 42px rgba(23, 24, 23, 0.23);
  transition: opacity 180ms ease, transform 180ms ease;
}

.invite-toast.is-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

.invite-toast__main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  padding: 14px 16px;
  color: #fff;
  text-align: left;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.invite-toast__main span:last-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.invite-toast__main strong {
  font-size: 13px;
}

.invite-toast__main small {
  color: #bfc3bd;
  font-size: 11px;
}

.invite-toast__icon {
  color: var(--yellow);
  font-size: 21px;
}

.invite-toast__close {
  width: 44px;
  align-self: stretch;
  color: #bfc3bd;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.toast {
  position: fixed;
  z-index: 120;
  left: 50%;
  bottom: 26px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 15px;
  color: #fff;
  background: #171817;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: 170ms ease;
}

.toast.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.toast button {
  flex: none;
  padding: 2px 0;
  color: var(--yellow);
  background: transparent;
  border: 0;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.mobile-bottom-nav {
  display: none;
}

.detail-action-bar {
  position: fixed;
  z-index: 75;
  right: max(20px, calc((100vw - 1352px) / 2 + 24px));
  bottom: 20px;
  left: max(92px, calc((100vw - 1352px) / 2 + var(--rail-width) + 24px));
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 46px minmax(220px, 340px);
  align-items: center;
  gap: 10px;
  max-width: 760px;
  min-height: 70px;
  margin-left: auto;
  padding: 10px 12px 10px 18px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid #d5d7d0;
  border-radius: 8px;
  box-shadow: 0 16px 44px rgba(23, 24, 23, 0.18);
  backdrop-filter: blur(12px);
}

.detail-action-bar__summary {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-action-bar__summary strong {
  font-size: 17px;
}

.detail-action-bar__summary span {
  color: var(--muted);
  font-size: 11px;
}

.detail-save,
.detail-apply {
  height: 46px;
  cursor: pointer;
}

.detail-save {
  background: #fff;
  border: 1px solid #cfd1cb;
  border-radius: 6px;
  font-size: 22px;
}

.detail-apply {
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: 6px;
  font-weight: 800;
}

body[data-shell="detail"] {
  padding-bottom: 96px;
}

@media (max-width: 1320px) {
  .prototype-tools {
    top: auto;
    right: 16px;
    bottom: 16px;
  }

  .prototype-tools details:not([open]) {
    width: auto;
  }
}

@media (max-width: 1023px) {
  body {
    padding-bottom: calc(68px + env(safe-area-inset-bottom));
    background: #fff;
  }

  .prototype-tools {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .app-frame {
    display: block;
    width: 100%;
    border: 0;
  }

  .side-rail {
    display: none;
  }

  .navigation-drawer {
    left: 0;
    width: min(86vw, 320px);
  }

  .site-header,
  .mobile-context-header {
    transition: transform 180ms ease;
  }

  body.header-hidden:not(.is-overlay-open) .site-header,
  body.header-hidden:not(.is-overlay-open) .mobile-context-header {
    transform: translateY(-105%);
  }

  .header-topline {
    grid-template-columns: 118px minmax(180px, 1fr) auto;
    gap: 14px;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 70;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    height: calc(68px + env(safe-area-inset-bottom));
    padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  .mobile-bottom-nav a,
  .mobile-bottom-nav button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    padding: 0;
    color: #73756f;
    background: transparent;
    border: 0;
    font-size: 10px;
    cursor: pointer;
  }

  .mobile-bottom-nav a > span:first-child,
  .mobile-bottom-nav button > span:first-child {
    min-height: 23px;
    color: currentColor;
    font-size: 21px;
  }

  .mobile-bottom-nav .is-active {
    color: var(--ink);
    font-weight: 800;
  }

  .mobile-bottom-nav .popular-mark {
    width: 14px;
    height: 20px;
    color: #73756f;
  }

  .mobile-ticket {
    position: relative;
  }

  .mobile-ticket b {
    position: absolute;
    top: -5px;
    right: -9px;
    display: grid;
    place-items: center;
    width: 16px;
    height: 16px;
    color: #fff;
    background: var(--accent);
    border-radius: 50%;
    font-size: 9px;
  }

  .detail-action-bar {
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    left: 12px;
    grid-template-columns: minmax(112px, 1fr) 44px minmax(130px, 210px);
    min-height: 64px;
    padding: 8px 8px 8px 14px;
  }

  body[data-shell="detail"] .mobile-bottom-nav {
    display: none;
  }

  body[data-shell="detail"] .site-header {
    display: none;
  }

  body[data-shell="detail"] .mobile-context-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 42px;
    align-items: center;
    min-height: 60px;
    padding: 0 10px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
  }

  .mobile-context-header button {
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    border: 0;
    font-size: 22px;
    cursor: pointer;
  }

  .mobile-context-header strong {
    overflow: hidden;
    font-size: 14px;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .header-popover {
    right: 12px;
  }

  .invite-toast {
    bottom: calc(78px + env(safe-area-inset-bottom));
  }

  body[data-shell="detail"] .invite-toast {
    bottom: calc(84px + env(safe-area-inset-bottom));
  }

  .toast {
    bottom: calc(82px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 767px) {
  body {
    padding-bottom: 68px;
    background: #fff;
  }

  .prototype-tools {
    position: relative;
    inset: auto;
    z-index: 1;
    width: auto;
    margin: 8px 12px;
    box-shadow: none;
  }

  .prototype-tools:has(details:not([open])) {
    width: auto;
  }

  .prototype-tools details:not([open]) .prototype-tools__body {
    display: none;
  }

  .app-frame {
    display: block;
    width: 100%;
    border: 0;
  }

  .side-rail {
    display: none;
  }

  .site-header {
    padding: 8px 12px;
  }

  .header-topline {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 42px;
  }

  .wordmark {
    font-size: 17px;
  }

  .header-topline > .search-form {
    display: flex;
    height: 40px;
  }

  .header-actions {
    gap: 5px;
  }

  .notification-button,
  .profile-button {
    width: 36px;
    height: 36px;
  }

  .search-form input {
    padding: 0 2px 0 11px;
    font-size: 12px;
  }

  .search-form input::placeholder {
    font-size: 0;
  }

  .search-form input::placeholder {
    color: transparent;
  }

  .search-form::before {
    position: absolute;
    left: 0;
    padding-left: 11px;
    color: #858780;
    content: "모임 검색";
    font-size: 12px;
    pointer-events: none;
    white-space: nowrap;
  }

  .search-form:focus-within::before,
  .search-form:has(input:not(:placeholder-shown))::before {
    display: none;
  }

  .search-form button {
    width: 38px;
    font-size: 22px;
  }

  main {
    padding: 16px 16px 58px;
  }

  .campaign-section {
    margin-inline: -16px;
  }

  .campaign {
    display: flex;
    flex-direction: column;
    height: 336px;
    min-height: 0;
    border-radius: 0;
  }

  .campaign-copy {
    grid-template-rows: auto minmax(0, 44px) auto auto;
    align-content: center;
    gap: 4px;
    height: 141px;
    min-height: 0;
    padding: 12px 16px 11px;
    order: 2;
  }

  .campaign h1 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 18px;
    line-height: 1.18;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .campaign p {
    display: block;
    overflow: hidden;
    font-size: 11px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .campaign-label {
    margin: 0;
    padding: 4px 6px;
    font-size: 9px;
  }

  .text-link {
    margin: 0;
    padding-bottom: 2px;
    font-size: 11px;
  }

  .campaign-media {
    flex: 0 0 195px;
    height: 195px;
    min-height: 0;
    aspect-ratio: auto;
    order: 1;
  }

  .campaign-controls {
    min-height: 36px;
    padding: 7px 16px 0;
  }

  .campaign-all-link {
    right: 16px;
    bottom: 7px;
  }

  .recommendation-section {
    padding-top: 18px;
  }

  .taste-control {
    align-items: flex-start;
    gap: 12px;
    padding: 12px 13px;
  }

  .taste-control__copy p {
    font-size: 12px;
    line-height: 1.5;
  }

  .taste-control__edit {
    min-height: 36px;
    padding: 0 10px;
    font-size: 11px;
  }

  .taste-control--upgrade {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    min-height: 0;
    padding: 15px;
  }

  .taste-control__sparkle {
    width: 38px;
    height: 38px;
    font-size: 18px;
  }

  .ai-interview-button {
    grid-column: 1 / -1;
    width: 100%;
    margin: 3px 0 0;
  }

  .empty-taste {
    display: block;
    min-height: 0;
    padding: 28px 22px;
  }

  .empty-taste__copy {
    align-items: flex-start;
  }

  .empty-taste__mark {
    width: 44px;
    height: 44px;
    font-size: 21px;
  }

  .empty-taste h3 {
    font-size: 18px;
  }

  .empty-taste p {
    font-size: 13px;
  }

  .primary-button {
    width: 100%;
    margin-top: 22px;
  }

  .program-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .feed-end {
    margin-top: 24px;
    padding: 22px 18px;
  }

  .site-footer {
    display: block;
    padding: 28px 16px 32px;
  }

  .site-footer span {
    display: block;
    margin-top: 6px;
  }

  .invite-toast {
    right: 12px;
    left: 12px;
    min-width: 0;
  }

  .detail-action-bar {
    grid-template-columns: minmax(92px, 1fr) 42px minmax(112px, 152px);
  }

  .detail-action-bar__summary strong {
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .wordmark-full {
    display: none;
  }

  .wordmark-short {
    display: inline;
  }

  .header-popover {
    right: 8px;
    width: min(300px, calc(100vw - 16px));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
