/* ==========================================================================
   Real&Chill 第十周年 MemoryParty — 交流站
   色票完全取自主視覺：深藍 / 橘 / 白，不引入第四個色相。
   ========================================================================== */

:root {
  /* 主視覺三色 */
  --navy:        #2F3C63;  /* 海報底色 */
  --navy-deep:   #24304F;  /* 更深的層，用於頁首與彈窗底 */
  --navy-ink:    #1B2440;  /* 最深，用於陰影與遮罩 */
  --navy-soft:   #3A487239; /* 半透明抬升面 */
  --navy-line:   #4A5883;  /* 分隔線 */
  --orange:      #DE5A2A;  /* 海報橘 */
  --orange-hi:   #F26A33;  /* hover */
  --orange-dim:  #DE5A2A26;
  --white:       #FFFFFF;
  --white-70:    #FFFFFFB3;
  --white-45:    #FFFFFF73;
  --white-14:    #FFFFFF24;
  --white-08:    #FFFFFF14;

  /* 字級 */
  --fs-display: clamp(38px, 6.4vw, 78px);
  --fs-h1: clamp(26px, 3.2vw, 38px);
  --fs-h2: 20px;
  --fs-body: 15px;
  --fs-sm: 13px;
  --fs-xs: 11.5px;

  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 20px;

  --shell: 1180px;
  --bar-h: 62px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--navy);
  color: var(--white);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-y: scroll;
}

/* 海報上那種細密的雜訊感，用極淡的雙層徑向漸層做出空氣感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 620px at 78% -8%, #3A4874 0%, transparent 62%),
    radial-gradient(820px 520px at 4% 4%, #35426C 0%, transparent 58%);
}

#app { position: relative; z-index: 1; }

a { color: inherit; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--orange-hi);
  outline-offset: 2px;
  border-radius: 3px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding: 0 24px;
}

/* 拉丁字的標籤／數字統一用 Archivo，字距放開 */
.lat {
  font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  font-family: "Archivo", sans-serif;
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-45);
}

/* ============================ 頁首 ============================ */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--bar-h);
  background: #24304FF2;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--navy-line);
}

.topbar .shell {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.brand b {
  font-family: "Archivo Black", "Archivo", sans-serif;
  font-size: 19px;
  letter-spacing: -0.02em;
  font-weight: 400;
}

.brand b i { font-style: normal; color: var(--orange); }

.brand span {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--white-45);
  letter-spacing: 0.1em;
}

.nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.nav button {
  background: none;
  border: 0;
  padding: 8px 15px;
  border-radius: 999px;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--white-70);
  cursor: pointer;
  transition: background .15s, color .15s;
  display: flex;
  align-items: center;
  gap: 7px;
}

.nav button:hover { background: var(--white-08); color: var(--white); }

.nav button[aria-current="true"] {
  background: var(--orange);
  color: var(--white);
}

.nav .tally {
  font-family: "Archivo", sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--white-14);
  font-variant-numeric: tabular-nums;
}

.countdown {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 20px;
  border-left: 1px solid var(--navy-line);
  white-space: nowrap;
}

.countdown b {
  font-family: "Archivo Black", sans-serif;
  font-size: 22px;
  line-height: 1;
  color: var(--orange);
  font-weight: 400;
}

.countdown span {
  font-size: var(--fs-xs);
  color: var(--white-45);
  line-height: 1.25;
}

/* ============================ Hero ============================ */

.hero { padding: 44px 0 30px; }

/* 來賓牆與佈告欄用精簡版 Hero，讓內容直接進到第一屏 */
.hero.compact { padding: 22px 0 4px; }
.hero.compact p:not(.eyebrow),
.hero.compact .facts { display: none; }
.hero.compact h1 { font-size: clamp(30px, 3.6vw, 46px); margin-top: 6px; }
.hero.compact .zh-mark { font-size: clamp(15px, 1.7vw, 19px); }
.hero.compact .hero-blobs svg { width: 52px; height: 64px; }
.hero.compact .hero-blobs svg:nth-child(2) { width: 44px; height: 55px; }
.hero.compact .hero-blobs svg:nth-child(3) { width: 58px; height: 71px; }
.hero.compact .hero-blobs svg:nth-child(4) { width: 42px; height: 52px; }
.hero.compact .hero-blobs svg:nth-child(5) { width: 50px; height: 62px; }

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

.hero h1 {
  margin: 12px 0 0;
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  font-size: var(--fs-display);
  line-height: 0.92;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero h1 i { font-style: normal; color: var(--orange); }

.hero .zh-mark {
  display: block;
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 900;
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: 0.06em;
  color: var(--orange);
  line-height: 1.2;
  margin-bottom: 2px;
}

.hero p {
  margin: 16px 0 0;
  max-width: 46ch;
  color: var(--white-70);
  font-size: 15.5px;
}

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 24px;
}

.fact {
  padding: 0 22px;
  border-left: 1px solid var(--navy-line);
}

.fact:first-child { padding-left: 0; border-left: 0; }

.fact dt {
  font-size: var(--fs-xs);
  letter-spacing: 0.12em;
  color: var(--white-45);
  font-weight: 700;
}

.fact dt i { font-style: normal; color: var(--orange); }

.fact dd {
  margin: 3px 0 0;
  font-weight: 700;
  font-size: 15px;
}

.hero-blobs {
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.hero-blobs svg {
  width: 78px;
  height: 96px;
  animation: bob 3.4s ease-in-out infinite;
}

.hero-blobs svg:nth-child(2) { animation-delay: -.5s; width: 66px; height: 82px; }
.hero-blobs svg:nth-child(3) { animation-delay: -1.1s; width: 88px; height: 106px; }
.hero-blobs svg:nth-child(4) { animation-delay: -1.7s; width: 62px; height: 78px; }
.hero-blobs svg:nth-child(5) { animation-delay: -2.3s; width: 74px; height: 92px; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-9px) rotate(1.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-blobs svg { animation: none; }
  * { transition-duration: .01ms !important; }
}

/* ============================ 共用元件 ============================ */

.panel {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 26px 28px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin: 34px 0 18px;
}

.section-head h2 {
  margin: 4px 0 0;
  font-size: var(--fs-h1);
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

.section-head h2 i { font-style: normal; color: var(--orange); }

.section-head .wcard { color: var(--white-45); font-size: var(--fs-sm); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  padding: 11px 22px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  background: var(--orange);
  color: var(--white);
  transition: background .15s, transform .08s;
}

.btn:hover { background: var(--orange-hi); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

.btn.ghost {
  background: transparent;
  border: 1px solid var(--navy-line);
  color: var(--white-70);
  font-weight: 700;
}

.btn.ghost:hover { border-color: var(--white-45); color: var(--white); background: var(--white-08); }

.btn.sm { padding: 7px 14px; font-size: 13px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 700;
  background: var(--white-08);
  color: var(--white-70);
  border: 1px solid transparent;
  white-space: nowrap;
}

.chip.accent { background: var(--orange-dim); color: #FFB392; border-color: #DE5A2A55; }

/* ============================ 表單 ============================ */

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

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }

.field label {
  font-size: var(--fs-sm);
  font-weight: 800;
  letter-spacing: 0.02em;
}

.field label em {
  font-style: normal;
  color: var(--orange);
  margin-left: 3px;
}

.field .hint {
  font-size: var(--fs-xs);
  color: var(--white-45);
  font-weight: 400;
  margin-left: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  border-radius: var(--r-md);
  padding: 11px 13px;
  color: var(--white);
  transition: border-color .15s, background .15s;
}

.field textarea { resize: vertical; min-height: 84px; line-height: 1.6; }

.field input::placeholder,
.field textarea::placeholder { color: #7C88AC; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--orange);
  background: #1B2440;
  outline: none;
}

.field select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--white-45) 50%), linear-gradient(135deg, var(--white-45) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 13px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.field .counter {
  align-self: flex-end;
  font-size: var(--fs-xs);
  color: var(--white-45);
  font-family: "Archivo", sans-serif;
}

.seg { display: flex; gap: 8px; }

.seg button {
  flex: 1;
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  border-radius: var(--r-md);
  padding: 10px;
  font-weight: 700;
  font-size: 14px;
  color: var(--white-70);
  cursor: pointer;
}

.seg button[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.form-err {
  border-color: var(--orange) !important;
}

.err-msg {
  font-size: var(--fs-xs);
  color: #FF9E77;
  font-weight: 700;
}

/* 照片上傳 */

.photo-drop {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1.5px dashed var(--navy-line);
  border-radius: var(--r-md);
  background: #1F2A4880;
  transition: border-color .15s, background .15s;
}

.photo-drop.over { border-color: var(--orange); background: var(--orange-dim); }

.photo-drop .preview {
  width: 96px;
  height: 96px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy-deep);
  border: 2px solid var(--navy-line);
  display: grid;
  place-items: center;
}

.photo-drop .preview img,
.photo-drop .preview svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.photo-drop .copy { min-width: 0; }
.photo-drop .copy p { margin: 0 0 8px; font-size: var(--fs-sm); color: var(--white-45); }
.photo-drop .copy .row { display: flex; gap: 8px; flex-wrap: wrap; }

/* 名片預覽 */

.preview-col { position: sticky; top: calc(var(--bar-h) + 24px); }

/* ============================ 來賓牆 ============================ */

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px 16px;
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  position: sticky;
  top: calc(var(--bar-h) + 10px);
  z-index: 40;
  backdrop-filter: blur(10px);
}

.search {
  position: relative;
  flex: 1 1 240px;
  min-width: 200px;
}

.search input {
  width: 100%;
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  border-radius: 999px;
  padding: 10px 16px 10px 38px;
  color: var(--white);
}

.search input:focus { border-color: var(--orange); outline: none; }

.search svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  opacity: .5;
}

.toolbar select {
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  border-radius: 999px;
  padding: 10px 32px 10px 14px;
  font-size: var(--fs-sm);
  font-weight: 700;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--white-45) 50%), linear-gradient(135deg, var(--white-45) 50%, transparent 50%);
  background-position: calc(100% - 17px) 50%, calc(100% - 11px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  cursor: pointer;
}

.toolbar .result-count {
  font-size: var(--fs-sm);
  color: var(--white-45);
  font-family: "Archivo", sans-serif;
  margin-left: auto;
  white-space: nowrap;
}

.toolbar .result-count b { color: var(--white); font-weight: 800; }

.guest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.gcard {
  position: relative;
  text-align: left;
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 18px 16px 14px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .16s, transform .16s, background .16s;
  font: inherit;
  color: inherit;
}

.gcard:hover {
  border-color: var(--orange);
  transform: translateY(-3px);
  background: #3A4872;
}

.gcard .av {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy-deep);
  border: 2px solid var(--navy-line);
  flex: none;
}

.gcard:hover .av { border-color: var(--orange); }
.gcard .av img, .gcard .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.gcard .nick {
  font-family: "Noto Sans TC", sans-serif;
  font-weight: 900;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.gcard .realname {
  font-size: var(--fs-xs);
  color: var(--white-45);
  font-weight: 500;
}

.gcard .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.gcard .skill {
  font-size: var(--fs-sm);
  color: var(--white-70);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
}

.gcard .skill b { color: var(--orange); font-weight: 800; }

.gcard .foot {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--navy-line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--white-45);
  font-family: "Archivo", sans-serif;
  font-weight: 600;
}

.gcard .foot .me {
  color: var(--orange);
  font-weight: 800;
  letter-spacing: .06em;
}

.gcard .cbadge { display: inline-flex; align-items: center; gap: 4px; }
.gcard .cbadge svg { width: 13px; height: 13px; opacity: .6; }

.load-more { display: flex; justify-content: center; margin: 26px 0 6px; }

.empty {
  text-align: center;
  padding: 56px 20px;
  color: var(--white-45);
}

.empty svg { width: 74px; height: 90px; opacity: .5; margin-bottom: 10px; }
.empty p { margin: 0 0 4px; font-weight: 700; color: var(--white-70); }

/* ============================ 來賓詳情 ============================ */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #1B2440D9;
  backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 20px;
  overflow-y: auto;
  animation: fade .16s ease;
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

.sheet {
  width: 100%;
  max-width: 680px;
  background: var(--navy-deep);
  border: 1px solid var(--navy-line);
  border-radius: 24px;
  overflow: hidden;
  animation: rise .2s cubic-bezier(.2,.8,.3,1);
}

@keyframes rise { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.sheet-head {
  display: flex;
  gap: 20px;
  padding: 26px 28px 22px;
  background: linear-gradient(180deg, #35426C, var(--navy-deep));
  border-bottom: 1px solid var(--navy-line);
  position: relative;
}

.sheet-head .av {
  width: 104px;
  height: 104px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--orange);
  background: var(--navy);
}

.sheet-head .av img, .sheet-head .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.sheet-head h3 {
  margin: 0;
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.sheet-head .sub { color: var(--white-45); font-size: var(--fs-sm); margin-top: 2px; }
.sheet-head .meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

.x-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--navy-line);
  background: #1F2A48;
  color: var(--white-70);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 17px;
  line-height: 1;
}

.x-btn:hover { background: var(--orange); color: var(--white); border-color: var(--orange); }

.sheet-body { padding: 24px 28px 8px; }

.detail-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid #3A487280;
}

.detail-row dt {
  font-size: var(--fs-sm);
  font-weight: 800;
  color: var(--white-45);
  letter-spacing: .04em;
}

.detail-row dd { margin: 0; overflow-wrap: anywhere; }

.quote {
  margin: 18px 0 4px;
  padding: 16px 18px;
  border-left: 3px solid var(--orange);
  background: var(--orange-dim);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 15.5px;
  font-weight: 500;
}

.quote .eyebrow { margin-bottom: 4px; }

/* ============================ 留言 ============================ */

.cmt-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 26px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--navy-line);
}

.cmt-head h4 { margin: 0; font-size: var(--fs-h2); font-weight: 900; }
.cmt-head span { color: var(--white-45); font-size: var(--fs-sm); }

.cmt-list { display: flex; flex-direction: column; gap: 12px; }

.cmt {
  display: flex;
  gap: 11px;
  align-items: flex-start;
}

.cmt .av {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy);
  border: 1px solid var(--navy-line);
}

.cmt .av img, .cmt .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.cmt .bubble {
  background: #35426C;
  border-radius: 4px 14px 14px 14px;
  padding: 9px 14px 10px;
  min-width: 0;
  /* 讓氣泡貼合內容寬度，短留言不要拉成一整條 */
  flex: 0 1 auto;
  max-width: 100%;
}

.cmt.mine .bubble { background: #DE5A2A2E; border: 1px solid #DE5A2A55; }

.cmt .who {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.cmt .who b { font-size: 14px; font-weight: 900; }
.cmt .who .t { font-size: var(--fs-xs); color: var(--white-45); font-family: "Archivo", sans-serif; }
.cmt .who .self { font-size: var(--fs-xs); color: var(--orange); font-weight: 800; }
.cmt p { margin: 2px 0 0; font-size: 14.5px; overflow-wrap: anywhere; white-space: pre-wrap; }

.cmt .del {
  background: none;
  border: 0;
  color: var(--white-45);
  font-size: var(--fs-xs);
  cursor: pointer;
  padding: 2px 4px;
}

.cmt .del:hover { color: var(--orange); }

.cmt-empty { color: var(--white-45); font-size: var(--fs-sm); padding: 6px 0 2px; }

.cmt-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  margin-top: 16px;
  padding: 14px 0 24px;
  position: sticky;
  bottom: 0;
  background: var(--navy-deep);
}

.cmt-form textarea {
  flex: 1;
  min-height: 44px;
  max-height: 140px;
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  border-radius: var(--r-md);
  padding: 11px 13px;
  resize: none;
  line-height: 1.5;
}

.cmt-form textarea:focus { border-color: var(--orange); outline: none; }

/* ============================ 佈告欄 ============================ */

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

.composer .tagpick { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.tagpick button {
  border: 1px solid var(--navy-line);
  background: #1F2A48;
  color: var(--white-70);
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 800;
  font-size: var(--fs-sm);
  cursor: pointer;
}

.tagpick button[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.composer textarea {
  width: 100%;
  min-height: 92px;
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  border-radius: var(--r-md);
  padding: 13px;
  resize: vertical;
  line-height: 1.6;
}

.composer textarea:focus { border-color: var(--orange); outline: none; }

.composer .row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
}

.composer .as {
  font-size: var(--fs-sm);
  color: var(--white-45);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
}

.composer .as .av {
  width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
  background: var(--navy); border: 1px solid var(--navy-line);
}

.composer .as .av img, .composer .as .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.composer .as b { color: var(--white); font-weight: 900; }

.board-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 14px; }

.post-list { display: flex; flex-direction: column; gap: 14px; }

.post {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 18px 20px 14px;
}

.post.pinned { border-color: var(--orange); background: #DE5A2A14; }

.post-top { display: flex; align-items: center; gap: 11px; }

.post-top .av {
  width: 40px; height: 40px; flex: none; border-radius: 50%;
  overflow: hidden; background: var(--navy); border: 1px solid var(--navy-line);
  cursor: pointer;
}

.post-top .av img, .post-top .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-top .who { min-width: 0; }

.post-top .who b {
  font-size: 16px; font-weight: 900; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}

.post-top .who b:hover { color: var(--orange); }
.post-top .who div { font-size: var(--fs-xs); color: var(--white-45); font-family: "Archivo", sans-serif; }
.post-top .tag { margin-left: auto; }

.post .text {
  margin: 12px 0 0;
  font-size: 15.5px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.post .actions {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 14px;
  padding-top: 11px;
  border-top: 1px solid #3A487280;
}

.act {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  color: var(--white-45);
  font-weight: 700;
  font-size: var(--fs-sm);
  cursor: pointer;
  font-family: "Noto Sans TC", sans-serif;
}

.act svg { width: 16px; height: 16px; }
.act:hover { background: var(--white-08); color: var(--white); }
.act .n { font-family: "Archivo", sans-serif; font-variant-numeric: tabular-nums; }

.act.liked { color: var(--orange); }
.act.liked svg { fill: var(--orange); stroke: var(--orange); }

.act.del { margin-left: auto; }
.act.del:hover { color: var(--orange); }

.post .cmt-zone {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid #3A487280;
}

.post .cmt-form { position: static; padding: 12px 0 0; background: none; }

/* 側欄 */

.side { position: sticky; top: calc(var(--bar-h) + 24px); display: flex; flex-direction: column; gap: 14px; }

.side .panel { padding: 20px; border-radius: var(--r-md); }

.side h3 {
  margin: 0 0 12px;
  font-size: var(--fs-sm);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-family: "Archivo", sans-serif;
  font-weight: 700;
  color: var(--white-45);
}

.stat-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #3A487280;
  font-size: var(--fs-sm);
}

.stat-row:last-child { border-bottom: 0; }
.stat-row b { font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 19px; color: var(--orange); }

.rank { display: flex; flex-direction: column; gap: 9px; }

.rank button {
  display: flex;
  align-items: center;
  gap: 9px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
}

.rank .av {
  width: 30px; height: 30px; flex: none; border-radius: 50%;
  overflow: hidden; background: var(--navy); border: 1px solid var(--navy-line);
}

.rank .av img, .rank .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank b { font-size: 14px; font-weight: 800; }
.rank button:hover b { color: var(--orange); }
.rank small { display: block; color: var(--white-45); font-size: var(--fs-xs); }
.rank .n { margin-left: auto; font-family: "Archivo", sans-serif; font-weight: 700; color: var(--white-45); font-size: var(--fs-sm); }

/* ============================ Demo 條 & Toast ============================ */

.demobar {
  background: var(--orange);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 700;
}

.demobar .shell {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 8px;
  padding-bottom: 8px;
}

.demobar .tagline { display: flex; align-items: center; gap: 8px; }

.demobar .lab {
  background: var(--white);
  color: var(--orange);
  border-radius: 4px;
  padding: 1px 7px;
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  font-size: var(--fs-xs);
  letter-spacing: .08em;
}

.demobar .acts { margin-left: auto; display: flex; gap: 8px; }

.demobar button {
  background: #FFFFFF2E;
  border: 1px solid #FFFFFF66;
  color: var(--white);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: var(--fs-xs);
  font-weight: 800;
  cursor: pointer;
}

.demobar button:hover { background: var(--white); color: var(--orange); }

.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: var(--white);
  color: var(--navy-deep);
  font-weight: 800;
  font-size: var(--fs-sm);
  padding: 11px 20px;
  border-radius: 999px;
  box-shadow: 0 10px 30px #1B244080;
  animation: pop .22s cubic-bezier(.2,.9,.3,1);
}

.toast.warn { background: var(--orange); color: var(--white); }

@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ============================ 頁尾 ============================ */

/* 頁尾。注意不要叫 .foot —— 會撞到名片底部那列 .gcard .foot */
.page-foot {
  margin-top: 60px;
  padding: 28px 0 46px;
  border-top: 1px solid var(--navy-line);
  color: var(--white-45);
  font-size: var(--fs-sm);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.page-foot .lat { font-family: "Archivo Black", sans-serif; color: var(--white-70); }
.page-foot span:last-child { margin-left: auto; }

.view { padding-bottom: 20px; }
[hidden] { display: none !important; }

/* ============================ RWD ============================ */

@media (max-width: 940px) {
  .board-layout { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; flex-direction: row; flex-wrap: wrap; }
  .side .panel { flex: 1 1 240px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-blobs { justify-content: flex-start; }
  .preview-col { position: static; }
}

@media (max-width: 720px) {
  .shell { padding: 0 16px; }
  .countdown { display: none; }
  .nav { gap: 2px; }
  .nav button { padding: 8px 11px; font-size: 12.5px; }
  .brand span { display: none; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .guest-grid { grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 10px; }
  .gcard { padding: 14px 12px 11px; }
  .gcard .nick { font-size: 16px; }
  .sheet-head { flex-direction: column; padding: 22px 20px; }
  .sheet-body { padding: 20px 20px 8px; }
  .detail-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .overlay { padding: 0; }
  .sheet { border-radius: 0; min-height: 100%; }
  .toolbar { position: static; }
}

/* ============================ Dress Code 欄位 ============================ */

.dup-note {
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: #FFB392;
}

/* ============================ 生活照上傳 ============================ */

.shots-edit {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.shot-slot {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #1F2A48;
  border: 1.5px dashed var(--navy-line);
  display: grid;
  place-items: center;
  gap: 2px;
  color: var(--white-45);
  font-size: var(--fs-xs);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}

.shot-slot.add:hover { border-color: var(--orange); color: var(--white); background: var(--orange-dim); }
.shot-slot.add .plus { font-size: 20px; line-height: 1; }
.shot-slot.muted { opacity: .4; cursor: not-allowed; }
.shot-slot.filled { border-style: solid; cursor: default; padding: 0; }
.shot-slot.filled img, .shot-slot.filled svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.shot-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: #1B2440CC;
  color: var(--white);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.shot-x:hover { background: var(--orange); }

/* ============================ 詳情頁的相簿 ============================ */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 22px;
}

.gallery .shot {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--navy);
  border: 1px solid var(--navy-line);
  cursor: zoom-in;
  transition: border-color .15s;
}

.gallery .shot:hover { border-color: var(--orange); }
.gallery .shot img, .gallery .shot svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.overlay.lightbox { align-items: center; padding: 28px; z-index: 120; }

.lb-frame {
  position: relative;
  max-width: 760px;
  width: 100%;
  background: var(--navy-deep);
  border: 1px solid var(--navy-line);
  border-radius: 18px;
  overflow: hidden;
}

.lb-img {
  background: var(--navy-ink);
  display: grid;
  place-items: center;
  max-height: 72vh;
}

.lb-img img, .lb-img svg { max-width: 100%; max-height: 72vh; display: block; object-fit: contain; }

.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  font-size: var(--fs-sm);
  color: var(--white-70);
}

.lb-bar b { color: var(--white); font-weight: 900; }
.lb-nav { display: flex; align-items: center; gap: 10px; }

.lb-nav button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--navy-line);
  background: #1F2A48;
  color: var(--white);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.lb-nav button:hover { background: var(--orange); border-color: var(--orange); }

/* 名片底部多了照片數，改用 gap + 最後一項推到右邊 */
.gcard .foot { justify-content: flex-start; gap: 10px; }
.gcard .foot .last { margin-left: auto; }

/* ============================ RC 許願池 ============================ */

.wish-composer { padding: 20px 22px; }

.wc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.wc-row .as { display: flex; align-items: center; gap: 9px; font-size: var(--fs-sm); color: var(--white-45); }
.wc-row .as b { color: var(--white); font-weight: 900; }
.wc-row .as .av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--navy); border: 1px solid var(--navy-line); }
.wc-row .as .av img, .wc-row .as .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.wc-row .hint { font-size: var(--fs-xs); color: var(--white-45); margin-right: auto; }

.wish-composer textarea {
  width: 100%;
  min-height: 74px;
  margin: 11px 0;
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  border-radius: var(--r-md);
  padding: 12px 13px;
  resize: vertical;
  line-height: 1.6;
  font-size: 15.5px;
}

.wish-composer textarea:focus { border-color: var(--orange); outline: none; }

.pool-stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 22px 2px 4px;
  font-size: var(--fs-sm);
  color: var(--white-45);
}

.pool-stats b { color: var(--white); font-weight: 800; font-size: 17px; margin-right: 3px; }
.pool-stats .tip { margin-left: auto; font-size: var(--fs-xs); }

.pool {
  /* 不用格線。多欄流排版讓高矮不同的泡泡自己錯開，看起來才像漂在池子裡 */
  column-width: 190px;
  column-gap: 12px;
  margin-top: 14px;
  padding-bottom: 10px;
}

/* 泡泡跟主人一起飄：位移用 translate、漂浮用 transform，兩個屬性互不干擾 */
.wish-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  translate: var(--jx, 0) var(--jy, 0);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}

@keyframes driftA {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(5px, -12px); }
}

@keyframes driftB {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-6px, -9px); }
}

.drift-a { animation-name: driftA; }
.drift-b { animation-name: driftB; }

.bubble {
  position: relative;
  flex: none;
  /* 寬度由 JS 給，高度跟著寬度走；欄位太窄時整顆等比縮小，不會撐破格子 */
  aspect-ratio: 1;
  height: auto;
  max-width: 100%;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 15px 14px;
  text-align: center;
  color: var(--white);
  cursor: pointer;
  background:
    radial-gradient(circle at 34% 26%, #FFFFFF33, #FFFFFF0D 46%, #FFFFFF08 100%);
  border: 1.5px solid #FFFFFF4D;
  box-shadow: inset 0 -12px 24px #FFFFFF0F, 0 10px 28px #1B244059;
  transition: border-color .18s, scale .18s, box-shadow .18s;
}

.bubble:hover, .bubble:focus-visible {
  border-color: var(--orange);
  scale: 1.07;
  box-shadow: inset 0 -12px 24px #FFFFFF14, 0 14px 34px #1B244080;
  z-index: 5;
}

.bubble.hot {
  background: radial-gradient(circle at 34% 26%, #F58455, #DE5A2A 68%);
  border-color: #F26A33;
  box-shadow: inset 0 -12px 24px #FFFFFF1F, 0 10px 28px #1B244073;
}

.bubble.mine {
  border-width: 2.5px;
  border-color: var(--orange);
  background: radial-gradient(circle at 34% 26%, #DE5A2A6B, #DE5A2A29 60%, #DE5A2A14 100%);
}

.bub-text {
  margin: 0;
  line-height: 1.4;
  font-weight: 700;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.bub-likes {
  font-size: 11px;
  color: #FFFFFFA6;
  font-weight: 700;
  font-family: "Archivo", sans-serif;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.bubble.hot .bub-likes { color: #FFFFFFD9; }
.bub-likes i { font-style: normal; }
.bubble.liked .bub-likes i { color: var(--orange); }
.bubble.hot.liked .bub-likes i { color: var(--white); }

/* 許願的人站在泡泡下面，像拎著一顆氣球。
   大小固定不隨泡泡縮放，每個人才一樣認得出來 */
.bub-by {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bub-by .face {
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy-deep);
  border: 2px solid var(--navy-line);
  box-shadow: 0 4px 12px #1B244066;
}

.bub-by .face img, .bub-by .face svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.wish-cell:hover .bub-by { color: var(--white); }
.wish-cell:hover .bub-by .face { border-color: var(--orange); }

.bub-dot {
  position: absolute;
  top: 11%;
  left: 12%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--orange);
  border: 2px solid var(--navy);
}

.bubble.hot .bub-dot { background: var(--white); border-color: var(--orange); }

/* 只有自己許的願望才有。放在綽號旁邊而不是泡泡上，才不會蓋到願望文字 */
.bub-del {
  width: 21px;
  height: 21px;
  flex: none;
  border-radius: 50%;
  border: 0;
  background: #FFFFFF1F;
  color: var(--white-45);
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background .15s, color .15s, scale .15s;
}

.bub-del:hover, .bub-del:focus-visible {
  background: var(--orange);
  color: var(--white);
  scale: 1.15;
}

@media (prefers-reduced-motion: reduce) {
  .wish-cell { animation: none; }
}

/* 願望彈窗 */

.wish-sheet .sheet-head .av { width: 56px; height: 56px; border-width: 2px; cursor: pointer; }
.wish-sheet .sheet-head h3 { font-size: 22px; }
.wish-sheet .linky { cursor: pointer; }
.wish-sheet .linky:hover { color: var(--orange); }

.wish-text {
  margin: 4px 0 20px;
  font-size: 24px;
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: .01em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.wish-sheet .actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

/* 下面緊接著就是「回應」那條分隔線，這裡不用再畫一條 */
.wish-sheet .cmt-head { margin-top: 18px; }

/* ============================ 人情味排行榜 ============================ */

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.pod {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 22px 16px 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  transition: border-color .16s, transform .16s;
}

.pod:hover { border-color: var(--orange); transform: translateY(-3px); }
.pod.p1 { border-color: var(--orange); background: #DE5A2A1A; }

.pod-rank {
  font-family: "Archivo Black", sans-serif;
  font-size: 22px;
  color: var(--orange);
  line-height: 1;
}

.pod .av {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--navy-line);
  background: var(--navy);
  margin: 4px 0 2px;
}

.pod.p1 .av { width: 92px; height: 92px; border-color: var(--orange); }
.pod .av img, .pod .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.pod b { font-size: 19px; font-weight: 900; }
.pod small { color: var(--white-45); font-size: var(--fs-xs); }

.pod-n { margin-top: 6px; font-size: var(--fs-sm); color: var(--white-70); }
.pod-n b { font-family: "Archivo Black", sans-serif; font-size: 20px; color: var(--orange); font-weight: 400; }

.my-rank {
  margin: 0 0 16px;
  padding: 11px 16px;
  border-radius: var(--r-md);
  background: var(--orange-dim);
  border: 1px solid #DE5A2A55;
  font-size: var(--fs-sm);
  font-weight: 700;
}

.my-rank b { color: var(--orange); font-size: 17px; }

.rank-table {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  overflow: hidden;
}

.rank-row {
  display: grid;
  grid-template-columns: 42px 36px minmax(0, 1fr) 110px 80px 76px;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid #3A487259;
  cursor: pointer;
  transition: background .14s;
}

.rank-row:last-child { border-bottom: 0; }
.rank-row:hover { background: #3A4872; }
.rank-row.me { background: #DE5A2A1F; }

.rank-row .rk { font-weight: 700; color: var(--white-45); font-size: 15px; }
.rank-row:nth-child(-n+3) .rk { color: var(--orange); font-weight: 800; }

.rank-row .av { width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--navy); border: 1px solid var(--navy-line); }
.rank-row .av img, .rank-row .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }

.rank-row .who { min-width: 0; }
.rank-row .who b { font-size: 15px; font-weight: 800; display: block; }
.rank-row .who small { color: var(--white-45); font-size: var(--fs-xs); }

.rank-row .bar { height: 7px; border-radius: 99px; background: #1F2A48; overflow: hidden; }
.rank-row .bar i { display: block; height: 100%; background: var(--orange); }

.rank-row .n { font-size: var(--fs-sm); color: var(--white-70); text-align: right; }
.rank-row .n b { font-family: "Archivo Black", sans-serif; font-weight: 400; font-size: 17px; color: var(--white); margin-right: 3px; }
.rank-row .n2 { font-size: var(--fs-xs); color: var(--white-45); text-align: right; }
.rank-row .n2 b { color: var(--white-70); font-weight: 700; }

/* ============================ 贊助天使 ============================ */

.sub-head {
  margin: 30px 0 14px;
  font-size: var(--fs-h2);
  font-weight: 900;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.sub-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--navy-line);
}

.angel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
}

.angel-card {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: border-color .16s, transform .16s;
}

.angel-card:hover { border-color: var(--orange); transform: translateY(-3px); }

.angel-card .av {
  width: 52px; height: 52px; border-radius: 50%; overflow: hidden;
  background: var(--navy); border: 2px solid var(--orange);
}

.angel-card .av img, .angel-card .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.angel-card .who b { font-size: 17px; font-weight: 900; display: block; }
.angel-card .who small { color: var(--white-45); font-size: var(--fs-xs); }

.angel-card .deed {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--white-70);
  padding-top: 10px;
  border-top: 1px solid #3A487280;
}

.sponsor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 12px;
}

.sponsor-card {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sp-top b { font-size: 17px; font-weight: 900; }
.sp-top a { color: var(--orange); font-size: var(--fs-xs); font-weight: 700; text-decoration: none; font-family: "Archivo", sans-serif; }
.sp-top a:hover { text-decoration: underline; }
.sp-items { display: flex; flex-wrap: wrap; gap: 5px; }
.sp-note { margin: 0; font-size: var(--fs-sm); color: var(--white-70); }

.admin-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 26px 28px;
}

.admin-cols h4 {
  margin: 0 0 14px;
  font-size: var(--fs-sm);
  letter-spacing: .1em;
  text-transform: uppercase;
  font-family: "Archivo", sans-serif;
  color: var(--orange);
}

.admin-cols .field { margin-bottom: 12px; }
.admin-cols .form-actions { display: flex; gap: 8px; }

.admin-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #3A487259;
  font-size: var(--fs-sm);
  color: var(--white-70);
}

.admin-list li span { min-width: 0; overflow-wrap: anywhere; }

.admin-list button {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--white-45);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  flex: none;
}

.admin-list button:hover { color: var(--orange); }

/* ============================ 新分頁的 RWD ============================ */

@media (max-width: 940px) {
  .podium { grid-template-columns: minmax(0, 1fr); }
  .admin-cols { grid-template-columns: minmax(0, 1fr); }
  .rank-row { grid-template-columns: 34px 34px minmax(0, 1fr) 74px; }
  .rank-row .bar, .rank-row .n2 { display: none; }
}

@media (max-width: 720px) {
  /* 分頁太多時讓它橫向捲動，而不是把每個字擠成直書 */
  .nav { overflow-x: auto; scrollbar-width: none; margin-left: 0; }
  .nav::-webkit-scrollbar { display: none; }
  .nav button { flex: none; white-space: nowrap; }
  .topbar .shell { gap: 12px; }
  /* 欄位變窄，左右偏移就關掉，泡泡才不會碰在一起 */
  .pool { column-width: 158px; column-gap: 10px; }
  .wish-cell { --jx: 0px; }
  .bubble { padding: 12px; }
  .shots-edit { gap: 7px; }
  .gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wish-text { font-size: 20px; }
}

/* ============================ 入場登記 ============================ */

.gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 8px 0 30px;
}

.gate-panel {
  width: 100%;
  max-width: 520px;
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: 24px;
  padding: 30px 34px 28px;
  text-align: center;
}

.gate-blobs {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  margin-bottom: 12px;
}

.gate-blobs svg { width: 54px; height: 66px; animation: bob 3.4s ease-in-out infinite; }
.gate-blobs svg:nth-child(2) { width: 66px; height: 80px; animation-delay: -1.1s; }
.gate-blobs svg:nth-child(3) { width: 48px; height: 59px; animation-delay: -2.2s; }

@media (prefers-reduced-motion: reduce) {
  .gate-blobs svg { animation: none; }
}

.gate-panel h3 {
  margin: 0 0 6px;
  font-size: 23px;
  font-weight: 900;
  letter-spacing: .01em;
}

.gate-panel .lead {
  margin: 0 0 22px;
  font-size: var(--fs-sm);
  color: var(--white-70);
  max-width: 38ch;
  margin-left: auto;
  margin-right: auto;
}

.gate-form {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 12px;
  text-align: left;
}

.gate-form .btn { grid-column: 1 / -1; width: 100%; padding: 13px; font-size: 15px; }

.gate-form input {
  width: 100%;
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  border-radius: var(--r-md);
  padding: 0 13px;
  height: 46px;
  color: var(--white);
  font-family: "Archivo", "Noto Sans TC", sans-serif;
  font-variant-numeric: tabular-nums;
}

.gate-form input:focus { border-color: var(--orange); outline: none; }
.gate-form input::-webkit-calendar-picker-indicator { filter: invert(1); opacity: .5; cursor: pointer; }

.gate .err-msg { margin: 12px 0 0; text-align: left; }

.gate-note {
  margin: 18px 0 0;
  font-size: var(--fs-xs);
  color: var(--white-45);
}

.demo-hint {
  margin: 0;
  max-width: 520px;
  text-align: center;
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: var(--white-45);
  background: var(--orange-dim);
  border: 1px dashed #DE5A2A66;
  border-radius: var(--r-md);
  padding: 11px 16px;
}

.demo-hint b { color: #FFB392; font-family: "Archivo", sans-serif; }

/* 名片表單頂端的已驗證帳號 */

.field.verified {
  flex-direction: row;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--orange-dim);
  border: 1px solid #DE5A2A55;
  border-radius: var(--r-md);
  padding: 12px 16px;
}

.v-badge {
  background: var(--orange);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  letter-spacing: .04em;
  flex: none;
}

.v-info { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.v-info b { font-size: 16px; font-weight: 700; letter-spacing: .02em; }
.v-info small { color: var(--white-45); font-size: var(--fs-xs); }
.v-note { margin-left: auto; font-size: var(--fs-xs); color: var(--white-45); }
.field.verified .btn { margin-left: auto; }

/* 還沒完成名片時，其他分頁是鎖住的 */

.nav button[disabled] {
  opacity: .35;
  cursor: not-allowed;
}

.nav button[disabled]:hover { background: none; color: var(--white-70); }

@media (max-width: 560px) {
  .gate-panel { padding: 24px 20px 22px; }
  .gate-form { grid-template-columns: minmax(0, 1fr); }
}

/* ============================ 管理者後台 ============================ */

/* 後台入口在導覽列裡用外框標出來，跟一般分頁區隔 */
#nav-admin {
  border: 1px solid var(--orange);
  color: #FFB392;
}

#nav-admin:hover { background: var(--orange-dim); color: var(--white); }
#nav-admin[aria-current="true"] { background: var(--orange); color: var(--white); }

.admin-stats {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0 2px 18px;
  font-size: var(--fs-sm);
  color: var(--white-45);
}

.admin-stats b { color: var(--white); font-weight: 800; font-size: 18px; margin-right: 4px; }

.admin-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

.admin-tabs button {
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  color: var(--white-70);
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 800;
  font-size: var(--fs-sm);
  cursor: pointer;
}

.admin-tabs button:hover { border-color: var(--white-45); color: var(--white); }

.admin-tabs button[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

.admin-search { flex: 0 1 300px; margin-left: auto; min-width: 200px; }

.table-scroll {
  overflow-x: auto;
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-sm);
  white-space: nowrap;
}

.admin-table th {
  text-align: left;
  font-size: var(--fs-xs);
  letter-spacing: .08em;
  color: var(--white-45);
  font-weight: 700;
  padding: 12px 14px;
  border-bottom: 1px solid var(--navy-line);
  position: sticky;
  top: 0;
  background: #35426C;
}

.admin-table td {
  padding: 9px 14px;
  border-bottom: 1px solid #3A487259;
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: #3A487259; }
.admin-table tr.me { background: #DE5A2A14; }
.admin-table .num { text-align: right; }
.admin-table .dim { color: var(--white-45); }
.admin-table .act-col { text-align: right; }

.admin-table .who {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.admin-table .who .av {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  overflow: hidden; background: var(--navy); border: 1px solid var(--navy-line);
}

.admin-table .who .av img, .admin-table .who .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-table .who b { font-size: 14px; font-weight: 800; display: block; }
.admin-table .who small { color: var(--white-45); font-size: var(--fs-xs); }
.admin-table .who:hover b { color: var(--orange); }

.tag-admin {
  font-style: normal;
  font-size: 10px;
  font-weight: 800;
  background: var(--orange);
  color: var(--white);
  border-radius: 3px;
  padding: 1px 5px;
  margin-left: 5px;
  letter-spacing: .04em;
}

/* 願望欄位讓它換行，不要把表格撐到天邊 */
.admin-table .wish-col {
  white-space: normal;
  min-width: 260px;
  max-width: 420px;
}

.btn-danger {
  background: transparent;
  border: 1px solid #DE5A2A66;
  color: #FFB392;
  border-radius: 999px;
  padding: 5px 14px;
  font-size: var(--fs-xs);
  font-weight: 800;
  cursor: pointer;
  font-family: inherit;
  transition: background .15s, color .15s;
}

.btn-danger:hover { background: var(--orange); border-color: var(--orange); color: var(--white); }

.admin-empty {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 40px;
  text-align: center;
  color: var(--white-45);
  margin: 0;
}

@media (max-width: 940px) {
  .admin-search { margin-left: 0; flex-basis: 100%; }
}

/* ============================ 許願池 · 風格切換 ============================ */

.style-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 16px 2px 2px;
  font-size: var(--fs-xs);
  color: var(--white-45);
}

.style-switch button {
  background: #1F2A48;
  border: 1px solid var(--navy-line);
  color: var(--white-70);
  border-radius: 999px;
  padding: 5px 15px;
  font-weight: 800;
  font-size: var(--fs-sm);
  cursor: pointer;
  font-family: inherit;
}

.style-switch button:hover { border-color: var(--white-45); color: var(--white); }

.style-switch button[aria-pressed="true"] {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}

/* ============================ 風格二：天燈 ============================ */

/* 天燈的池子當成夜空，灑一點很淡的星星 */
.pool-lantern {
  background:
    radial-gradient(1.6px 1.6px at 12% 14%, #FFFFFF59, transparent),
    radial-gradient(1.4px 1.4px at 68% 9%, #FFFFFF40, transparent),
    radial-gradient(1.8px 1.8px at 34% 42%, #FFFFFF4D, transparent),
    radial-gradient(1.3px 1.3px at 87% 33%, #FFFFFF38, transparent),
    radial-gradient(1.6px 1.6px at 22% 68%, #FFFFFF45, transparent),
    radial-gradient(1.4px 1.4px at 76% 78%, #FFFFFF40, transparent),
    radial-gradient(1.7px 1.7px at 52% 88%, #FFFFFF38, transparent);
  border-radius: var(--r-lg);
  padding: 22px 14px 8px;
  margin-top: 12px;
}

@keyframes riseA {
  0%, 100% { transform: translateY(0) rotate(-1.4deg); }
  50%      { transform: translateY(-19px) rotate(1.6deg); }
}

@keyframes riseB {
  0%, 100% { transform: translateY(0) rotate(1.6deg); }
  50%      { transform: translateY(-15px) rotate(-1.2deg); }
}

.rise-a { animation-name: riseA; }
.rise-b { animation-name: riseB; }

.lantern {
  position: relative;
  flex: none;
  max-width: 100%;
  aspect-ratio: 1 / 1.28;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: scale .18s, filter .18s;
}

.lantern:hover, .lantern:focus-visible { scale: 1.06; filter: brightness(1.12); }

/* 上緣那圈燈框 */
.lan-cap {
  width: 78%;
  height: 5px;
  border-radius: 3px;
  background: #FFFFFF59;
  flex: none;
}

.lan-body {
  position: relative;
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 12px 13px;
  text-align: center;
  color: var(--white);
  /* 上寬下窄的燈身 */
  clip-path: polygon(4% 0%, 96% 0%, 84% 88%, 68% 100%, 32% 100%, 16% 88%);
  background: linear-gradient(180deg, #F8A277 0%, #E9713F 42%, #D0491C 100%);
  box-shadow: 0 0 44px 4px #DE5A2A47;
}

.lantern.mine .lan-body {
  background: linear-gradient(180deg, #FFFFFF 0%, #F3D9CC 40%, #E9A688 100%);
  color: var(--navy-deep);
  box-shadow: 0 0 46px 5px #FFFFFF3D;
}

.lantern.hot .lan-body {
  background: linear-gradient(180deg, #FFD0A8 0%, #F98B4E 38%, #DE5A2A 100%);
  box-shadow: 0 0 60px 8px #DE5A2A73;
}

.lan-text {
  margin: 0;
  line-height: 1.42;
  font-weight: 700;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow-wrap: anywhere;
}

.lantern .bub-likes { color: #FFFFFFC9; }
.lantern.mine .bub-likes { color: #24304FA6; }
.lantern.mine .bub-likes i { color: var(--orange); }
.lantern .bub-dot { top: 8%; left: 10%; border-color: #C2461A; background: var(--white); }
.lantern.mine .bub-dot { background: var(--orange); border-color: var(--white); }

/* 底下那點火光 */
.lan-flame {
  width: 9px;
  height: 11px;
  margin-top: -3px;
  border-radius: 50% 50% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #FFF3D6, #FFC46B 45%, #F26A33 100%);
  box-shadow: 0 0 16px 4px #F9A85C8C;
  flex: none;
}

/* ============================ 風格三：許願卡 ============================ */

.pool-wcard { column-gap: 14px; }

.wcard-cell { rotate: var(--rot, 0deg); transition: rotate .2s; }
.wcard-cell:hover { rotate: 0deg; z-index: 4; position: relative; }

.wcard {
  position: relative;
  width: 100%;
  background: var(--white);
  color: var(--navy-deep);
  border-radius: 3px;
  padding: 22px 18px 14px;
  cursor: pointer;
  box-shadow: 0 8px 22px #1B244066;
  transition: box-shadow .18s, translate .18s;
}

.wcard:hover, .wcard:focus-visible { box-shadow: 0 16px 34px #1B244099; translate: 0 -4px; }

.wcard.hot { background: var(--orange); color: var(--white); }
.wcard.mine { background: #FFF1E9; box-shadow: 0 8px 22px #1B244066, 0 0 0 2.5px var(--orange); }

/* 上面那截紙膠帶 */
.wcard-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 62px;
  height: 18px;
  translate: -50% 0;
  rotate: -2deg;
  background: #DE5A2AC4;
  border-radius: 1px;
}

.wcard.hot .wcard-tape { background: #24304FBF; }

.wcard-text {
  margin: 0 0 14px;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.wcard-foot {
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid #24304F26;
  font-size: var(--fs-xs);
}

.wcard.hot .wcard-foot { border-top-color: #FFFFFF4D; }

.wcard-foot .face {
  width: 26px;
  height: 26px;
  flex: none;
  border-radius: 50%;
  overflow: hidden;
  background: var(--navy);
  border: 1.5px solid #24304F26;
}

.wcard.hot .wcard-foot .face { border-color: #FFFFFF59; }
.wcard-foot .face img, .wcard-foot .face svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.wcard-foot b { font-weight: 800; font-size: 12.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wcard-n, .wcard-c {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 800;
  font-family: "Archivo", sans-serif;
  color: #24304F8C;
}

.wcard-n { margin-left: auto; }
.wcard.hot .wcard-n, .wcard.hot .wcard-c { color: #FFFFFFC4; }
.wcard-n i { font-style: normal; }
.wcard.liked .wcard-n i { color: var(--orange); }
.wcard.hot.liked .wcard-n i { color: var(--white); }
.wcard-c svg { width: 13px; height: 13px; }

.wcard-del {
  width: 20px;
  height: 20px;
  flex: none;
  border-radius: 50%;
  border: 0;
  background: #24304F14;
  color: #24304F8C;
  font-size: 10px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
}

.wcard-del:hover { background: var(--orange); color: var(--white); }

@media (max-width: 720px) {
  .pool-wcard { column-width: 150px; }
  .wcard { padding: 20px 14px 12px; }
  .wcard-text { font-size: 14px; }
}

/* ============================ 後台頁面（admin.html） ============================ */

.admin-page .topbar .shell { gap: 16px; }

.admin-who {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
  font-size: var(--fs-sm);
}

.admin-who .av {
  width: 32px; height: 32px; flex: none; border-radius: 50%;
  overflow: hidden; background: var(--navy); border: 2px solid var(--orange);
}

.admin-who .av img, .admin-who .av svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.admin-who b { display: block; font-weight: 800; line-height: 1.2; }
.admin-who small { color: var(--white-45); font-size: var(--fs-xs); }
.admin-page #btn-logout { padding: 6px 14px; }

.admin-head { padding: 34px 0 22px; }
.admin-head h2 {
  margin: 6px 0 8px;
  font-size: var(--fs-h1);
  font-family: "Archivo Black", sans-serif;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.admin-head h2 i { font-style: normal; color: var(--orange); }
.admin-head .wcard { margin: 0; color: var(--white-45); font-size: var(--fs-sm); }

.demobar a {
  color: var(--white);
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid #FFFFFF80;
}

.demobar a:hover { border-bottom-color: var(--white); }

.foot-admin {
  color: var(--orange) !important;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.foot-admin:hover { border-bottom-color: var(--orange); }
.page-foot a { color: var(--white-45); text-decoration: none; }
.page-foot a:hover { color: var(--white); }

/* ============================ 後台 · 印製物 ============================ */

.print-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 14px;
}

.print-card {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-decoration: none;
  color: inherit;
  transition: border-color .16s, transform .16s, background .16s;
}

.print-card:hover { border-color: var(--orange); transform: translateY(-3px); background: #3A4872; }

.print-card .spec {
  font-family: "Archivo", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--orange);
}

.print-card h4 { margin: 0; font-size: 19px; font-weight: 900; }
.print-card p { margin: 0; font-size: var(--fs-sm); color: var(--white-70); line-height: 1.7; }
.print-card .go { margin-top: auto; padding-top: 10px; font-size: var(--fs-sm); font-weight: 800; color: var(--orange); }

.print-note {
  margin: 18px 0 0;
  background: var(--orange-dim);
  border: 1px dashed #DE5A2A66;
  border-radius: var(--r-md);
  padding: 14px 18px;
  font-size: var(--fs-sm);
  color: var(--white-70);
  line-height: 1.8;
}

.print-note b { color: #FFB392; }

/* Demo 條上的資料來源切換 */
.demobar select {
  background: #FFFFFF2E;
  border: 1px solid #FFFFFF66;
  color: var(--white);
  border-radius: 999px;
  padding: 4px 26px 4px 13px;
  font-family: inherit;
  font-size: var(--fs-xs);
  font-weight: 800;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #FFFFFFCC 50%), linear-gradient(135deg, #FFFFFFCC 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.demobar select:hover { background-color: #FFFFFF47; }
.demobar select option { background: var(--navy-deep); color: var(--white); }

/* ============================ 後台 · 幫人開帳號 ============================ */

.add-account {
  background: var(--navy-soft);
  border: 1px solid var(--navy-line);
  border-radius: var(--r-lg);
  padding: 18px 22px 20px;
  margin-bottom: 14px;
}

.aa-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.aa-head b { font-size: 16px; font-weight: 900; }
.aa-head span { font-size: var(--fs-xs); color: var(--white-45); }

.aa-form {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.aa-form .field { margin: 0; }
.aa-form .btn { white-space: nowrap; padding: 11px 22px; }
.add-account .err-msg { margin: 10px 0 0; }

@media (max-width: 940px) {
  .aa-form { grid-template-columns: minmax(0, 1fr); }
  .aa-form .btn { width: 100%; }
}
