html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  background: var(--body-outer-bg);
  display: block;
  min-height: 100dvh;
}

.app-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  position: relative;
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 183, 210, 0.24), transparent 38%),
    radial-gradient(circle at 85% 12%, rgba(191, 220, 255, 0.22), transparent 32%),
    var(--app-surface-base);
  box-shadow: none;
  padding-bottom: 0;
}

.app-container::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
    radial-gradient(rgba(255, 216, 233, 0.25) 1px, transparent 1px);
  background-size: 24px 24px, 36px 36px;
  background-position: 0 0, 12px 10px;
  opacity: 0.45;
}

.page-home .app-container {
  padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
}

.site-brand-bar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  justify-content: center;
  padding: 14px 16px 8px;
  pointer-events: none;
}

.site-brand-logo {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 14px 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: var(--radius-pill);
  color: var(--brand-deep);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 245, 250, 0.8)),
    rgba(255, 255, 255, 0.88);
  box-shadow:
    0 12px 30px rgba(83, 42, 97, 0.1),
    inset 0 0 0 1px rgba(255, 255, 255, 0.5);
  text-decoration: none;
  backdrop-filter: blur(16px);
}

.site-brand-logo__mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: var(--app-surface-base);
  background: linear-gradient(145deg, var(--purple-start), var(--pink-soft));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-shadow: 0 8px 18px rgba(157, 91, 166, 0.28);
}

.site-brand-logo__text {
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--brand-deep), var(--violet-mid) 56%, var(--rose-accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 16px 0;
  max-width: none;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.top-bar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: flex-start;
}

.top-bar form {
  flex: 0 0 auto;
}

.top-bar__avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid rgba(201, 161, 210, 0.5);
  background: rgba(255, 255, 255, 0.9);
}

.top-bar__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.top-bar__copy strong,
.top-bar__copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-bar__copy strong {
  font-size: 13px;
  color: var(--brand-mid);
}

.top-bar__copy span {
  font-size: 12px;
  color: var(--muted);
}

.top-bar__logout {
  border: 1px solid rgba(186, 130, 188, 0.5);
  background: rgba(255, 255, 255, 0.82);
  color: var(--label-muted);
  border-radius: var(--radius-pill);
  min-height: 48px;
  padding: 12px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: none;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 4px;
  padding: 10px max(8px, env(safe-area-inset-right, 0px)) calc(10px + env(safe-area-inset-bottom, 0px))
    max(8px, env(safe-area-inset-left, 0px));
  transform: none;
  backdrop-filter: blur(12px);
  background: var(--app-surface-base);
  border-top: 1px solid rgba(225, 182, 208, 0.35);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 28px rgba(83, 42, 97, 0.12);
  z-index: 40;
}

.nav-item {
  flex: 1;
  min-height: 52px;
  margin: 0;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 12px;
  font-weight: 650;
  color: var(--text-nav);
  transition: var(--transition-ui);
}

.nav-item.active {
  color: var(--ink-plum);
  font-weight: 850;
  background: rgba(233, 213, 241, 0.78);
  box-shadow: inset 0 0 0 1px rgba(157, 91, 166, 0.12);
}

.version-badge {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 50;
  font-size: 10px;
  color: var(--text-nav-dim);
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(184, 143, 170, 0.22);
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  backdrop-filter: blur(6px);
  pointer-events: none;
}

:where(
  button,
  a,
  [role="button"],
  .calendar-cell,
  .feed-upload,
  .speak-word-btn,
  .speak-example-btn,
  .toggle-meaning-btn
) {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: var(--transition-ui);
}

:where(
  button,
  a,
  [role="button"],
  .calendar-cell,
  .feed-upload,
  .feed-card__delete,
  .speak-word-btn,
  .speak-example-btn,
  .toggle-meaning-btn
):not(:disabled):active {
  filter: brightness(0.96);
  transform: scale(0.98);
}

.page-wrap {
  flex: 1 0 auto;
  padding: 16px 16px calc(104px + env(safe-area-inset-bottom, 0px));
  max-width: none;
  margin: 0 auto;
  width: 100%;
}

.card {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: var(--transition-ui);
}

.page-title {
  margin: 0 0 16px;
  font-size: 24px;
  color: var(--heading);
  font-weight: 850;
  letter-spacing: -0.02em;
}

.submit-button {
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(118, 67, 131, 0.6);
  background: linear-gradient(140deg, var(--purple-start) 0%, var(--violet-accent) 100%);
  color: var(--app-surface-base);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(118, 67, 131, 0.2);
  transition: var(--transition-ui);
}

.submit-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 24px rgba(118, 67, 131, 0.26);
}

.submit-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.submit-button--icon {
  min-width: 48px;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  padding: 0;
}

.secondary-button {
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(154, 102, 170, 0.45);
  background: var(--app-surface-base);
  color: var(--primary-strong);
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: var(--transition-ui);
}

.secondary-button:hover {
  background: rgba(248, 237, 252, 0.9);
}

.error-box {
  margin-top: 16px;
  color: var(--error-text);
  font-size: 13px;
  line-height: 1.5;
  border: 1px solid var(--error-border);
  border-radius: 12px;
  background: var(--error-surface);
  padding: 12px 16px;
}

.error-box:empty {
  display: none;
}

.error-box:not(:empty) {
  display: block;
}

.ai-error__title {
  display: block;
  margin-bottom: 8px;
  color: var(--error-text-strong);
  font-size: 14px;
}

.ai-error__row {
  margin: 6px 0 0;
  color: var(--error-row-text);
  line-height: 1.55;
  word-break: break-word;
}

.ai-error__row strong {
  color: var(--error-text-strong);
  margin-right: 4px;
}

.input-row {
  display: grid;
  gap: 16px;
  align-items: center;
  margin-top: 16px;
}

.text-input {
  flex: 1 1 auto;
  min-width: 240px;
  min-height: 48px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(190, 155, 201, 0.55);
  outline: none;
  font-size: 16px;
  background: rgba(255, 255, 255, 0.92);
  transition: var(--transition-ui);
}

.text-input:focus {
  border-color: var(--violet-mid);
  box-shadow: 0 0 0 3px rgba(157, 91, 166, 0.14);
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

.login-card {
  width: min(100%, 420px);
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.login-card__eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-kicker);
}

.login-page__title {
  margin-bottom: 8px;
}

.login-card__error {
  margin-top: 16px;
  border-radius: 12px;
  padding: 12px 16px;
  background: rgba(254, 226, 226, 0.9);
  color: var(--danger-bright);
  font-size: 14px;
  line-height: 1.6;
}

.login-card__google-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(118, 67, 131, 0.6);
  background: linear-gradient(140deg, var(--purple-start) 0%, var(--violet-accent) 100%);
  color: var(--app-surface-base);
  font-weight: 800;
  font-size: 16px;
}

.hero {
  text-align: center;
  padding: 92px 18px 0;
  position: relative;
}

.hero-kicker {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-kicker);
}

.hero-dday {
  margin: 18px 0 8px;
  font-size: clamp(40px, 12vw, 78px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--brand-hero);
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.hero-dday-line {
  display: inline-flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.12em;
  flex-wrap: wrap;
}

.hero-dday-label {
  font-size: 0.42em;
  font-weight: 750;
  letter-spacing: 0.02em;
  opacity: 0.88;
}

.hero-dday-num {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  background: linear-gradient(135deg, var(--violet-deep) 0%, var(--violet-mid) 45%, var(--brand-hero) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-dday--dev-trigger {
  cursor: pointer;
}

.hero-couple {
  margin: 0;
  font-size: 18px;
  font-weight: 850;
  color: var(--heading);
}

.hero-message {
  margin: 12px auto 0;
  max-width: 480px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 13px;
}

.home-quote {
  width: min(920px, calc(100% - 32px));
  margin: 16px auto 8px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow-soft);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-ui);
}

.home-quote:hover,
.home-quote:focus-visible {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.home-quote:focus-visible {
  outline: 3px solid rgba(157, 91, 166, 0.18);
  outline-offset: 3px;
}

.home-quote__text {
  margin: 0;
  color: var(--text-quote);
  line-height: 1.65;
  font-size: 15px;
}

.home-quote__text.is-in {
  animation: fadeSlideIn 0.32s ease;
}

.home-cat-stage {
  position: relative;
  width: min(100% - 32px, 398px);
  min-height: 164px;
  margin: 16px auto 16px;
  padding: 20px 16px 16px;
  overflow: hidden;
  border: 1px solid rgba(190, 155, 201, 0.32);
  border-radius: 24px;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 214, 232, 0.62), transparent 34%),
    radial-gradient(circle at 82% 26%, rgba(218, 233, 255, 0.58), transparent 34%),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.home-cat-stage::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 42px;
  height: 18px;
  border-radius: 999px;
  background: rgba(120, 88, 126, 0.06);
}

.home-cat {
  --cat-x: 0px;
  --cat-y: 0px;
  --cat-facing: 1;
  position: absolute;
  z-index: 1;
  left: calc(50% - 32px);
  top: 34px;
  width: 64px;
  height: 64px;
  border: 0;
  padding: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
  transform: translate(var(--cat-x), var(--cat-y)) scaleX(var(--cat-facing));
  transition: transform 0.55s cubic-bezier(0.2, 0.85, 0.22, 1), filter 0.2s ease-in-out;
}

.home-cat:not(:disabled):active {
  filter: brightness(0.96);
  transform: translate(var(--cat-x), var(--cat-y)) scaleX(var(--cat-facing)) scale(0.98);
}

.home-cat__emoji {
  display: block;
  font-size: 52px;
  line-height: 1;
  filter: drop-shadow(0 10px 16px rgba(45, 35, 48, 0.14));
  animation: catIdle 2.4s ease-in-out infinite;
}

.home-cat.is-running .home-cat__emoji {
  animation: catHop 0.42s ease-in-out;
}

.home-cat__message {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.home-cat--slot-0 {
  --cat-x: -72px;
  --cat-y: 0px;
  --cat-facing: -1;
}

.home-cat--slot-1 {
  --cat-x: -40px;
  --cat-y: 12px;
  --cat-facing: -1;
}

.home-cat--slot-2 {
  --cat-x: -16px;
  --cat-y: 20px;
  --cat-facing: -1;
}

.home-cat--slot-3 {
  --cat-x: 0px;
  --cat-y: 24px;
  --cat-facing: 1;
}

.home-cat--slot-4 {
  --cat-x: 32px;
  --cat-y: 8px;
  --cat-facing: 1;
}

.home-cat--slot-5 {
  --cat-x: 56px;
  --cat-y: 0px;
  --cat-facing: 1;
}

.home-cat--slot-6 {
  --cat-x: 24px;
  --cat-y: 18px;
  --cat-facing: 1;
}

.home-cat--slot-7 {
  --cat-x: -56px;
  --cat-y: 16px;
  --cat-facing: -1;
}

@media (max-height: 740px) {
  .hero {
    padding: 20px 16px 0;
  }

  .hero-dday {
    margin: 10px 0 4px;
    font-size: clamp(36px, 11vw, 54px);
  }

  .hero-message {
    margin-top: 8px;
    line-height: 1.45;
  }

  .home-quote {
    margin: 12px auto 8px;
    padding: 12px 14px;
  }

  .home-quote__text {
    font-size: 14px;
    line-height: 1.45;
  }

  .home-cat-stage {
    min-height: 132px;
    margin: 12px auto 12px;
    padding: 14px 14px 12px;
  }

  .home-cat-stage::before {
    bottom: 36px;
  }

  .home-cat {
    top: 24px;
  }

  .home-cat__emoji {
    font-size: 46px;
  }

  .home-cat__message {
    bottom: 12px;
    font-size: 12px;
  }
}

.home-cat-heart {
  position: absolute;
  left: 50%;
  top: 64px;
  width: 22px;
  height: 22px;
  pointer-events: none;
  transform: translate(var(--heart-x), var(--heart-y));
  animation: catHeartFloat 1.1s ease-out forwards;
}

.home-cat-heart::before {
  content: "\2665";
  color: var(--rose-accent);
  font-size: 22px;
  filter: drop-shadow(0 8px 12px rgba(217, 75, 138, 0.18));
}

.home-cat-heart--slot-0 {
  --heart-x: -72px;
  --heart-y: 0px;
}

.home-cat-heart--slot-1 {
  --heart-x: -40px;
  --heart-y: 12px;
}

.home-cat-heart--slot-2 {
  --heart-x: -16px;
  --heart-y: 20px;
}

.home-cat-heart--slot-3 {
  --heart-x: 0px;
  --heart-y: 24px;
}

.home-cat-heart--slot-4 {
  --heart-x: 32px;
  --heart-y: 8px;
}

.home-cat-heart--slot-5 {
  --heart-x: 56px;
  --heart-y: 0px;
}

.home-cat-heart--slot-6 {
  --heart-x: 24px;
  --heart-y: 18px;
}

.home-cat-heart--slot-7 {
  --heart-x: -56px;
  --heart-y: 16px;
}

.ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.ai-camera-open {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 13px;
}

.ai-camera-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid rgba(190, 155, 201, 0.32);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.ai-camera-panel[hidden] {
  display: none;
}

.ai-camera-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  border: 1px solid rgba(184, 143, 198, 0.36);
  background:
    radial-gradient(circle at 50% 40%, rgba(255, 255, 255, 0.08), transparent 34%),
    var(--surface-camera);
}

.ai-camera-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-camera-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ai-camera-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.ai-input-row {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.ai-input {
  width: 100%;
  min-width: 0;
  resize: vertical;
  font-family: inherit;
  line-height: 1.55;
}

.ai-thread {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 56vh;
  overflow-y: auto;
  padding-right: 2px;
}

.ai-empty {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.ai-message {
  max-width: 100%;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-ui);
}

.ai-message--assistant {
  align-self: flex-start;
}

.ai-message__role {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-message__body {
  color: var(--text-soft);
  font-size: 15px;
  line-height: 1.65;
  word-break: break-word;
}

.ai-message__body > :first-child {
  margin-top: 0;
}

.ai-message__body > :last-child {
  margin-bottom: 0;
}

.ai-md {
  overflow-wrap: anywhere;
}

.ai-md > :first-child {
  margin-top: 0;
}

.ai-md > :last-child {
  margin-bottom: 0;
}

.ai-md h1,
.ai-md h2,
.ai-md h3 {
  margin: 0.85em 0 0.45em;
  font-weight: 800;
  line-height: 1.35;
  color: var(--text-soft);
}

.ai-md h1 {
  font-size: 1.35em;
}

.ai-md h2 {
  font-size: 1.2em;
}

.ai-md h3 {
  font-size: 1.08em;
}

.ai-md p {
  margin: 0.55em 0;
}

.ai-md ul,
.ai-md ol {
  margin: 0.55em 0;
  padding-left: 1.35em;
}

.ai-md li {
  margin: 0.25em 0;
}

.ai-md li > p {
  margin: 0.2em 0;
}

.ai-md blockquote {
  margin: 0.65em 0;
  padding: 0.35em 0 0.35em 0.85em;
  border-left: 3px solid rgba(157, 91, 166, 0.45);
  color: var(--text-warm);
  background: rgba(255, 255, 255, 0.45);
  border-radius: 0 10px 10px 0;
}

.ai-md code {
  font-family: ui-monospace, "Cascadia Code", "Segoe UI Mono", monospace;
  font-size: 0.9em;
  padding: 0.12em 0.38em;
  border-radius: 6px;
  background: rgba(157, 91, 166, 0.12);
  border: 1px solid rgba(157, 91, 166, 0.18);
}

.ai-md pre {
  margin: 0.65em 0;
  padding: 12px 14px;
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(63, 43, 71, 0.06);
  border: 1px solid rgba(184, 143, 198, 0.35);
}

.ai-md pre code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 0.86em;
  line-height: 1.5;
  white-space: pre;
}

.ai-md a {
  color: var(--violet-mid);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-md hr {
  margin: 1em 0;
  border: 0;
  border-top: 1px solid rgba(184, 143, 198, 0.45);
}

.ai-md table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.65em 0;
  font-size: 0.95em;
}

.ai-md th,
.ai-md td {
  border: 1px solid rgba(184, 143, 198, 0.45);
  padding: 8px 10px;
  text-align: left;
}

.ai-md th {
  background: rgba(157, 91, 166, 0.1);
}

/* Code blocks with copy control (markdownDom.attachCodeCopyButtons) */
.pc-ai-code-wrap {
  position: relative;
  margin: 0.65em 0;
}

.pc-ai-code-copy {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  padding: 6px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(32, 33, 36, 0.92);
  color: var(--pc-code-foreground);
  font-size: 12px;
  font-weight: 650;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.pc-ai-code-copy:hover {
  background: rgba(60, 64, 67, 0.98);
  border-color: rgba(255, 255, 255, 0.28);
}

.pc-ai-code-copy:focus-visible {
  outline: 2px solid var(--pc-focus-outline);
  outline-offset: 2px;
}

.ai-md .pc-ai-code-wrap pre {
  margin: 0;
  padding: 44px 14px 14px;
  overflow-x: auto;
  border-radius: 12px;
  background: var(--pc-code-block-bg);
  color: var(--pc-bg);
  border: 1px solid rgba(60, 64, 67, 0.18);
}

.ai-md .pc-ai-code-wrap pre code {
  display: block;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0.86em;
  line-height: 1.5;
  white-space: pre;
}

.ai-loading {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 100%;
  border: 1px solid rgba(184, 143, 198, 0.38);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-soft);
}

.ai-loading__spinner {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(157, 91, 166, 0.18);
  border-top-color: rgba(157, 91, 166, 0.86);
  border-radius: 50%;
  animation: aiSpin 0.8s linear infinite;
  flex: 0 0 auto;
}

.ai-loading strong,
.ai-loading span {
  display: block;
}

.ai-loading strong {
  color: var(--primary-strong);
  font-size: 15px;
}

.ai-loading span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

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

.ai-trace-shell {
  align-self: stretch;
  display: grid;
  gap: 12px;
}

.ai-trace-toggle {
  width: 100%;
}

.ai-trace {
  align-self: center;
  width: min(92%, 720px);
  border: 1px solid rgba(184, 143, 198, 0.38);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-ui);
  animation: aiTraceIn 0.32s ease both;
}

.ai-trace[hidden] {
  display: none;
}

.ai-trace__title {
  color: var(--heading);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ai-trace__subtitle {
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.ai-trace__tools {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.ai-trace-tool {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.76);
  opacity: 0.72;
}

.ai-trace-tool.is-selected {
  border-color: rgba(157, 91, 166, 0.56);
  background: linear-gradient(145deg, rgba(246, 235, 250, 0.96), rgba(255, 244, 250, 0.96));
  opacity: 1;
}

.ai-trace-tool strong,
.ai-trace-tool span {
  display: block;
}

.ai-trace-tool strong {
  color: var(--heading);
  font-size: 13px;
  font-weight: 850;
}

.ai-trace-tool span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.ai-trace__steps {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.ai-trace__steps li {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 8px;
  border-left: 3px solid rgba(157, 91, 166, 0.42);
  padding-left: 8px;
  opacity: 0;
  transform: translateY(6px);
  animation: aiTraceStep 0.28s ease both;
  animation-delay: 0s;
}

.ai-trace__steps li.ai-trace__step--delay-0 {
  animation-delay: 0s;
}

.ai-trace__steps li.ai-trace__step--delay-1 {
  animation-delay: 0.14s;
}

.ai-trace__steps li.ai-trace__step--delay-2 {
  animation-delay: 0.28s;
}

.ai-trace__steps li.ai-trace__step--delay-3 {
  animation-delay: 0.42s;
}

.ai-trace__steps li.ai-trace__step--delay-4 {
  animation-delay: 0.56s;
}

.ai-trace__steps li.ai-trace__step--delay-5 {
  animation-delay: 0.7s;
}

.ai-trace__steps li.ai-trace__step--delay-6 {
  animation-delay: 0.84s;
}

.ai-trace__steps li.ai-trace__step--delay-7 {
  animation-delay: 0.98s;
}

.ai-trace__steps li.ai-trace__step--delay-8 {
  animation-delay: 1.12s;
}

.ai-trace__steps li.ai-trace__step--delay-9 {
  animation-delay: 1.26s;
}

.ai-trace__steps li.ai-trace__step--delay-10 {
  animation-delay: 1.4s;
}

.ai-trace__steps li.ai-trace__step--delay-11 {
  animation-delay: 1.54s;
}

.ai-trace__steps li.ai-trace__step--delay-12 {
  animation-delay: 1.68s;
}

.ai-trace__steps li.ai-trace__step--delay-13 {
  animation-delay: 1.82s;
}

.ai-trace__steps li.ai-trace__step--delay-14 {
  animation-delay: 1.96s;
}

.ai-trace__steps li.ai-trace__step--delay-15 {
  animation-delay: 2.1s;
}

.ai-trace__steps li.ai-trace__step--delay-16 {
  animation-delay: 2.24s;
}

.ai-trace__steps li.ai-trace__step--delay-17 {
  animation-delay: 2.38s;
}

.ai-trace__steps li.ai-trace__step--delay-18 {
  animation-delay: 2.52s;
}

.ai-trace__steps li.ai-trace__step--delay-19 {
  animation-delay: 2.66s;
}

.ai-trace__steps li.ai-trace__step--delay-20 {
  animation-delay: 2.8s;
}

.ai-trace__steps li.ai-trace__step--delay-21 {
  animation-delay: 2.94s;
}

.ai-trace__steps li.ai-trace__step--delay-22 {
  animation-delay: 3.08s;
}

.ai-trace__steps li.ai-trace__step--delay-23 {
  animation-delay: 3.22s;
}

.ai-trace__steps li.ai-trace__step--delay-24 {
  animation-delay: 3.36s;
}

.ai-trace__steps li.ai-trace__step--delay-25 {
  animation-delay: 3.5s;
}

.ai-trace__steps li.ai-trace__step--delay-26 {
  animation-delay: 3.64s;
}

.ai-trace__steps li.ai-trace__step--delay-27 {
  animation-delay: 3.78s;
}

.ai-trace__steps li.ai-trace__step--delay-28 {
  animation-delay: 3.92s;
}

.ai-trace__steps li.ai-trace__step--delay-29 {
  animation-delay: 4.06s;
}

.ai-trace__steps li.ai-trace__step--delay-30 {
  animation-delay: 4.2s;
}

.ai-trace__steps li.ai-trace__step--delay-31 {
  animation-delay: 4.34s;
}

.ai-trace__steps li.ai-trace__step--delay-32 {
  animation-delay: 4.48s;
}

.ai-trace__steps li.ai-trace__step--delay-33 {
  animation-delay: 4.62s;
}

.ai-trace__steps li.ai-trace__step--delay-34 {
  animation-delay: 4.76s;
}

.ai-trace__steps li.ai-trace__step--delay-35 {
  animation-delay: 4.9s;
}

.ai-trace__steps li.ai-trace__step--delay-36 {
  animation-delay: 5.04s;
}

.ai-trace__steps li.ai-trace__step--delay-37 {
  animation-delay: 5.18s;
}

.ai-trace__steps li.ai-trace__step--delay-38 {
  animation-delay: 5.32s;
}

.ai-trace__steps li.ai-trace__step--delay-39 {
  animation-delay: 5.46s;
}

.ai-trace__steps li.ai-trace__step--delay-40 {
  animation-delay: 5.6s;
}

.ai-trace__steps strong {
  color: var(--text-mauve);
  font-size: 13px;
}

.ai-trace__steps span {
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.ai-trace__token-usage {
  margin: 10px 0 0;
  color: var(--text-dusty);
  font-size: 11px;
  line-height: 1.45;
}

@keyframes aiTraceIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes aiTraceStep {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes catIdle {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-3px) rotate(2deg);
  }
}

@keyframes catHop {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-6px);
  }
}

@keyframes catHeartFloat {
  0% {
    opacity: 0;
    transform: translate(var(--heart-x), var(--heart-y)) scale(0.72);
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(calc(var(--heart-x) - 10px), calc(var(--heart-y) - 64px)) scale(1.18);
  }
}

.ai-structured-card {
  display: grid;
  gap: 16px;
}

.ai-structured-card h2 {
  margin: 0;
  color: var(--heading);
  font-size: 18px;
  font-weight: 850;
}

.ai-structured__field {
  margin: 0;
}

.ai-structured__field strong {
  display: inline-block;
  min-width: 78px;
  margin-right: 8px;
  color: var(--text-mauve);
}

.ai-course-steps {
  margin: 2px 0 0;
  padding-left: 22px;
}

.ai-course-steps li {
  margin-top: 8px;
}

.ai-course-steps strong,
.ai-course-steps span {
  display: block;
}

.ai-course-steps strong {
  color: var(--text-plum-dark);
}

.ai-image-caption {
  margin: 0;
  color: var(--text-soft);
}

.ai-image-result {
  display: block;
  max-width: 100%;
  border-radius: 16px;
  border: 1px solid rgba(184, 143, 198, 0.38);
  box-shadow: 0 12px 28px rgba(110, 66, 99, 0.12);
}

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

.qa-item {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.qa-item__question {
  display: flex;
  gap: 8px;
  color: var(--text-plum-deep);
  font-size: 14px;
  line-height: 1.5;
}

.qa-item__meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.qa-item__answer {
  margin-top: 10px;
  color: var(--text-soft);
}

.qa-item__answer strong {
  display: inline-block;
  margin-bottom: 6px;
}

.markdown-box {
  margin-top: 18px;
  border: 1px solid rgba(205, 174, 216, 0.48);
  border-radius: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow);
  display: none;
  overflow-x: hidden;
}

.markdown-box table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
  table-layout: fixed;
}

.markdown-box th,
.markdown-box td {
  border: 1px solid rgba(182, 139, 194, 0.35);
  padding: 8px 10px;
  vertical-align: top;
  text-align: left;
  line-height: 1.5;
  white-space: normal;
}

.markdown-box th {
  background: rgba(245, 233, 249, 0.8);
  color: var(--text-plum-deep);
  font-weight: 700;
}

.markdown-box tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.5);
}

.cell-scroll-wrap {
  width: 100%;
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
}

.cell-scroll-wrap > * {
  white-space: nowrap;
}

.speak-word-btn,
.speak-example-btn {
  border: 0;
  background: transparent;
  cursor: pointer;
  min-height: 48px;
  padding: 12px 0;
}

.speak-word-btn {
  color: var(--primary-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.speak-example-btn {
  color: var(--text-soft);
  text-align: left;
  line-height: 1.5;
  white-space: nowrap;
}

.example-cell-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.toggle-meaning-btn {
  border: 1px solid rgba(157, 91, 166, 0.45);
  background: rgba(255, 255, 255, 0.9);
  color: var(--primary);
  border-radius: var(--radius-pill);
  min-height: 48px;
  padding: 12px 16px;
  font-size: 12px;
  cursor: pointer;
}

.example-meaning-text {
  display: none;
  color: var(--text-example);
  font-size: 12px;
  white-space: normal;
}

.example-meaning-text.show {
  display: inline;
}

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

.calendar-title {
  margin: 0;
  flex: 1;
  text-align: center;
  font-size: 22px;
  color: var(--heading);
  font-weight: 850;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
  text-align: center;
  min-width: 0;
}

.calendar-weekdays span {
  min-width: 0;
  padding: 2px 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 0;
  min-width: 0;
}

.calendar-grid--shift {
  animation: fadeSlideIn 0.28s ease;
}

.calendar-cell {
  position: relative;
  border: 1px solid rgba(190, 155, 201, 0.45);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.88);
  min-height: 48px;
  padding: 8px 4px;
  cursor: pointer;
  font: inherit;
  color: var(--ink-plum);
  transition: var(--transition-ui);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.calendar-cell:not(.calendar-cell--empty):hover {
  border-color: rgba(157, 91, 166, 0.55);
  background: rgba(255, 252, 255, 0.95);
  box-shadow: 0 6px 14px rgba(118, 67, 131, 0.1);
}

.calendar-cell--empty {
  border: none;
  background: transparent;
  pointer-events: none;
}

.calendar-cell__num {
  font-size: 13px;
  font-weight: 700;
}

.calendar-cell__badge {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 10px;
  background: var(--calendar-badge);
  color: var(--app-surface-base);
  border-radius: var(--radius-pill);
  min-width: 16px;
  padding: 0 4px;
}

.calendar-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  color: var(--label-muted);
}

.feed-form__tag-caption.calendar-label {
  margin: 0;
}

.calendar-date-input {
  max-width: 200px;
}

.calendar-tags {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.calendar-radio {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 750;
  color: var(--ink-plum);
  min-height: 48px;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(190, 155, 201, 0.5);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(110, 66, 99, 0.08);
}

.calendar-radio input {
  accent-color: var(--violet-accent);
}

.dev-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.dev-head .page-title {
  margin-bottom: 0;
}

.dev-back-button {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 14px;
}

.dev-row {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dev-row__key {
  color: var(--label-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dev-row__value {
  font-size: 13px;
  color: var(--ink-border);
  background: rgba(245, 233, 249, 0.7);
  border-radius: 10px;
  padding: 8px 10px;
  white-space: pre-wrap;
  word-break: break-word;
}

.reconcile-card {
  margin-top: 18px;
  border: 1px solid rgba(190, 155, 201, 0.45);
  border-radius: 18px;
  padding: 16px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(252, 240, 248, 0.86));
  box-shadow: var(--shadow-soft);
}

.reconcile-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.reconcile-card__title {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--ink-plum);
}

.reconcile-card__hint {
  font-size: 11px;
  color: var(--text-lilac);
  font-weight: 800;
}

.reconcile-card__status {
  margin: 10px 0 0;
  color: var(--text-warm);
  font-size: 13px;
  line-height: 1.55;
}

.reconcile-card__actions {
  margin-top: 14px;
}

.reconcile-card__respond {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.reconcile-card__reject {
  display: grid;
  gap: 10px;
}

.reconcile-card__label {
  font-size: 12px;
  font-weight: 800;
  color: var(--label-muted);
}

@keyframes fadeSlideIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes todoCelebrate {
  0% { transform: scale(1); }
  35% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

@keyframes burstOut {
  0% { opacity: 0.85; transform: scale(0.8); }
  100% { opacity: 0; transform: translateY(-8px) scale(1.6); }
}

.feed-page {
  display: flex;
  flex-direction: column;
  gap: var(--layout-gap-lg);
}

.feed-composer {
  overflow: hidden;
  box-shadow: var(--shadow-raised);
}

.feed-composer__head {
  display: grid;
  gap: 16px;
}

.feed-composer__head .page-title {
  margin-bottom: 0;
}

.feed-new-button {
  justify-self: stretch;
}

.feed-form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}

.feed-upload {
  position: relative;
  min-height: 138px;
  border: 1.5px dashed rgba(157, 91, 166, 0.45);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(252, 240, 248, 0.72));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-strong);
  font-weight: 800;
  cursor: pointer;
  transition: var(--transition-ui);
}

.feed-upload:hover {
  border-color: rgba(157, 91, 166, 0.65);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94), rgba(252, 245, 252, 0.88));
}

.feed-upload input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.feed-preview {
  display: none;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.feed-preview.is-visible {
  display: block;
}

.feed-form__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
}

.feed-comment-input {
  resize: vertical;
  min-height: 88px;
  font-family: inherit;
}

.feed-list {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: block;
  min-width: 0;
}

.feed-empty {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  padding: 16px;
  color: var(--muted);
  text-align: center;
  box-shadow: var(--shadow);
}

.feed-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  min-width: 0;
}

.feed-tile {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(190, 155, 201, 0.38);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 1 / 1;
  transition: var(--transition-ui);
}

.feed-tile:hover {
  border-color: rgba(157, 91, 166, 0.45);
  box-shadow: var(--shadow);
}

.feed-tile__open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
  border-radius: inherit;
  -webkit-tap-highlight-color: transparent;
}

.feed-tile__loading,
.feed-tile__load-error {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.feed-tile__load-error {
  color: var(--error-text);
}

.feed-tile__open:focus-visible {
  outline: 3px solid rgba(157, 91, 166, 0.45);
  outline-offset: 2px;
}

.feed-tile__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  background: var(--surface-blush);
  pointer-events: none;
}

.feed-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
}

.feed-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  padding: 0;
  margin: 0;
  background: rgba(32, 24, 36, 0.55);
  backdrop-filter: blur(6px);
  cursor: pointer;
}

.feed-lightbox__panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-height: min(92dvh, 100%);
  overflow: auto;
  border-radius: 22px 22px 0 0;
  background: var(--app-surface-base);
  box-shadow: 0 -12px 40px rgba(43, 38, 47, 0.22);
  padding: 0 16px calc(20px + env(safe-area-inset-bottom, 0px));
  -webkit-overflow-scrolling: touch;
}

.feed-lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0 10px;
  position: sticky;
  top: 0;
  background: var(--app-surface-base);
  border-bottom: 1px solid rgba(190, 155, 201, 0.25);
  margin: 0 -16px 12px;
  padding-left: 16px;
  padding-right: 16px;
  z-index: 2;
}

.feed-lightbox__title {
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  color: var(--heading);
  letter-spacing: -0.02em;
}

.feed-lightbox__icon-close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(190, 155, 201, 0.4);
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink-plum);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.feed-lightbox__image-wrap {
  margin: 0 auto 16px;
  max-height: min(52dvh, 520px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(63, 43, 71, 0.06);
  border-radius: 16px;
  overflow: hidden;
}

.feed-lightbox__image {
  display: block;
  max-width: 100%;
  max-height: min(52dvh, 520px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.feed-lightbox__meta {
  margin: 0 0 16px;
}

.feed-lightbox__row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 8px 12px;
  margin: 0 0 10px;
  font-size: 14px;
  line-height: 1.45;
}

.feed-lightbox__row--block {
  grid-template-columns: 1fr;
}

.feed-lightbox__row--block dt {
  margin-bottom: 4px;
}

.feed-lightbox__row dt {
  margin: 0;
  font-weight: 800;
  color: var(--text-lilac);
  font-size: 12px;
}

.feed-lightbox__row dd {
  margin: 0;
  color: var(--text);
  font-weight: 650;
  word-break: break-word;
}

.feed-lightbox__actions {
  display: flex;
  justify-content: stretch;
}

.feed-lightbox__delete {
  flex: 1;
  min-height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(195, 66, 104, 0.45);
  background: rgba(255, 245, 248, 0.95);
  color: var(--error-text);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
}

.feed-lightbox__delete:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.feed-modal-loading {
  position: fixed;
  left: 50%;
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 95;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(190, 155, 201, 0.5);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
  box-shadow: var(--shadow-soft);
}

.feed-card {
  overflow: hidden;
  border: 1px solid rgba(190, 155, 201, 0.42);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-raised);
  transition: var(--transition-ui);
}

.feed-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 16px;
}

.feed-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--app-surface-base);
  font-size: 12px;
  font-weight: 800;
  background: linear-gradient(140deg, var(--warm-gradient-start), var(--warm-gradient-end));
}

.feed-card__head strong {
  display: block;
  color: var(--heading);
  font-size: 14px;
  font-weight: 850;
}

.feed-card__head time {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.feed-card__delete {
  border: 0;
  background: transparent;
  color: var(--danger);
  min-height: 48px;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.feed-card__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--surface-blush);
}

.feed-card__body {
  padding: 16px;
}

.feed-card__actions {
  display: flex;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.feed-card__body p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.55;
}
