.guest-page {
  min-height: 100dvh;
  background: #f4f7f5;
}

.guest-header {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px max(24px, calc((100vw - var(--content)) / 2));
  border-bottom: 1px solid rgba(220, 229, 224, .9);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(16px);
}

.guest-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font: 600 22px/1.1 "Noto Serif SC", "Songti SC", SimSun, serif;
}

.guest-brand img { width: 48px; height: 48px; }
.guest-brand span { display: grid; gap: 3px; }
.guest-brand small { color: var(--muted); font: 12px/1.2 system-ui, sans-serif; }
.guest-actions { display: flex; align-items: center; gap: 10px; }
.guest-actions .select { width: auto; min-width: 190px; }

.guest-main {
  width: min(var(--content), calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.guest-home-grid {
  min-height: clamp(320px, 42dvh, 420px);
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
  gap: 20px;
  align-items: stretch;
  margin-bottom: 34px;
}

.guest-hero {
  min-height: 0;
  display: flex;
  align-items: center;
  padding: clamp(28px, 4.5vw, 52px);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
}

.guest-showcase { position: relative; isolation: isolate; overflow: hidden; background: #f4f0e7; }
.guest-home-carousel, .guest-showcase-scrim { position: absolute; inset: 0; }
.guest-home-carousel { z-index: -2; background: #f4f0e7; }
.guest-home-carousel img { width: 100%; height: 100%; display: block; object-fit: cover; }
.guest-showcase-scrim { z-index: -1; background: rgba(246, 242, 232, .8); }
.guest-showcase-content { width: 100%; display: flex; flex-direction: column; align-items: stretch; }
.guest-showcase-copy { min-width: 0; }
.guest-kicker { margin: 0 0 10px; color: var(--accent); font-size: 11px; letter-spacing: .16em; }
.guest-showcase .guest-kicker { margin-bottom: 14px; color: var(--accent-dark); font-size: 13px; font-weight: 700; letter-spacing: 0; }
.guest-hero h1 { display: flex; flex-wrap: wrap; align-items: baseline; margin: 0; font: 600 clamp(36px, 4.2vw, 54px)/1.18 "Noto Serif SC", "Songti SC", SimSun, serif; }
.guest-hero h1 i { font-style: normal; }
.guest-showcase-copy > p:not(.guest-kicker) { max-width: 620px; margin: 18px 0 0; color: #39453f; font-size: 17px; line-height: 1.8; }
.guest-wall-button { width: fit-content; align-self: flex-end; margin-top: 26px; white-space: nowrap; }

.guest-flower-ranking {
  display: flex;
  flex-direction: column;
  padding: clamp(26px, 3.2vw, 40px);
  border: 1px solid var(--line);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .88);
}
.guest-ranking-kicker { margin: 0 0 8px; color: var(--accent-dark); font-size: 12px; font-weight: 700; }
.guest-flower-ranking h2 { margin: 0; font: 600 clamp(24px, 2.4vw, 32px)/1.25 "Noto Serif SC", "Songti SC", SimSun, serif; }
.guest-flower-ranking > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.guest-flower-ranking ol { flex: 1; display: grid; align-content: center; gap: 8px; margin: 20px 0 0; padding: 0; list-style: none; }
.guest-ranking-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; min-height: 56px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.guest-ranking-item:last-child { border-bottom: 0; }
.guest-ranking-number { color: var(--accent-dark); font: 600 24px/1 "Noto Serif SC", "Songti SC", SimSun, serif; }
.guest-ranking-name { overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.guest-ranking-count { color: var(--accent-dark); font-size: 13px; font-weight: 700; white-space: nowrap; }
.guest-ranking-empty { color: var(--muted); font-size: 14px; line-height: 1.7; }

@media (prefers-reduced-motion: no-preference) {
  .guest-home-carousel img { animation: guest-work-enter 900ms ease both; }
}

@keyframes guest-work-enter {
  from { opacity: .2; transform: scale(1.025); }
  to { opacity: 1; transform: scale(1); }
}

.guest-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.guest-card-flower { color: var(--accent-dark); font-size: 13px; }
.guest-card-state { color: var(--muted); font-size: 12px; }
.guest-detail-dialog { width: min(1120px, calc(100vw - 32px)); }
.guest-detail-image { width: 100%; max-height: 420px; object-fit: contain; border-radius: var(--radius); background: var(--surface-soft); }
.guest-options { display: grid; gap: 10px; margin-top: 16px; }
.guest-poem-choice-layout { display: grid; grid-template-columns: minmax(260px, .9fr) minmax(360px, 1.1fr); gap: 16px; align-items: start; }
.guest-option { display: flex; gap: 10px; align-items: flex-start; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius-small); cursor: pointer; }
.guest-option:hover { border-color: #a8bdb3; background: var(--surface-soft); }
.guest-option.correct { border-color: var(--accent); background: var(--accent-soft); }
.guest-option.wrong { border-color: var(--danger); background: var(--danger-soft); }
.guest-prompt-mask { margin-top: 16px; padding: 14px; border-radius: var(--radius-small); background: var(--surface-soft); color: var(--muted); font-size: 13px; }
.guest-answer { margin-top: 16px; padding: 16px; border-left: 3px solid var(--accent); background: var(--accent-soft); }
.guest-answer h3, .guest-answer p { margin: 0; }
.guest-answer p { margin-top: 7px; line-height: 1.7; }
.guest-flower.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }

@media (max-width: 820px) {
  .guest-header { position: static; align-items: flex-start; padding: 12px 16px; }
  .guest-brand span { display: none; }
  .guest-actions { flex-wrap: wrap; justify-content: flex-end; }
  .guest-actions .select { min-width: 150px; }
  .guest-main { width: min(100% - 24px, var(--content)); padding-top: 28px; }
  .guest-home-grid { min-height: 0; grid-template-columns: 1fr; }
  .guest-hero { min-height: 360px; padding: 28px 24px; }
  .guest-flower-ranking { min-height: 300px; }
  .guest-detail-image-link { position: static; }
  .guest-detail-image { max-height: 320px; }
  .guest-poem-choice-layout { grid-template-columns: 1fr; }
  .guest-poem-choice-layout .poem-preview { position: static; order: 2; }
}

@media (max-width: 520px) {
  .guest-header {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 8px;
  }
  .guest-brand { flex: 0 0 auto; align-self: center; }
  .guest-brand img { width: 30px; height: 30px; }
  .guest-actions {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(64px, 1fr) repeat(3, max-content);
    align-items: stretch;
    gap: 4px;
  }
  .guest-actions .select {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    padding: 0 5px;
    font-size: clamp(9px, 2.7vw, 11px);
  }
  .guest-actions .button {
    width: auto;
    min-width: 0;
    min-height: 34px;
    padding: 0 6px;
    font-size: clamp(9px, 2.7vw, 11px);
    white-space: nowrap;
  }
  .guest-hero h1 { font-size: 34px; }
  .guest-showcase-copy > p:not(.guest-kicker) { font-size: 15px; }
  .guest-wall-button { width: 100%; }
}
