/* 182 懷舊服分頁共用框架；不修改主頁定稿樣式。 */

.subpage-body {
  color: #f6ebd1;
  background-position: center 66px;
  background-attachment: fixed;
}

.subpage-header-links {
  position: absolute;
  right: 22px;
  display: flex;
  gap: 1.35rem;
}

.subpage-header-links a {
  color: #e6d6b7;
  font-size: 1rem;
  text-decoration: none;
}

.subpage-header-links a:hover,
.subpage-header-links a:focus-visible {
  color: #ffd776;
}

.subpage-main {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 130px);
  margin: 0 auto;
  padding: clamp(54px, 7vw, 90px) 0 72px;
}

.subpage-title {
  position: relative;
  width: min(760px, calc(100% - 30px));
  margin: 0 auto 30px;
  padding: 24px 28px 22px;
  overflow: hidden;
  border: 1px solid rgba(225, 170, 63, 0.78);
  border-radius: 18px;
  background:
    linear-gradient(110deg, rgba(47, 12, 5, 0.94), rgba(12, 7, 5, 0.86) 54%, rgba(67, 21, 8, 0.9));
  box-shadow:
    inset 0 0 0 3px rgba(255, 217, 128, 0.08),
    0 16px 40px rgba(0, 0, 0, 0.58);
  text-align: center;
}

.subpage-title::after {
  position: absolute;
  right: 7%;
  bottom: -42px;
  width: 150px;
  height: 100px;
  border-radius: 50%;
  content: "";
  background: radial-gradient(ellipse, rgba(235, 91, 16, 0.45), transparent 68%);
  filter: blur(12px);
}

.subpage-title p,
.panel-heading p,
.board-title p {
  margin: 0 0 4px;
  color: #dc9e35;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.subpage-title h1 {
  margin: 0;
  color: #fff4d8;
  font-family: var(--seal-font);
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.08;
  text-shadow:
    0 2px 0 #682008,
    0 0 18px rgba(255, 121, 26, 0.55),
    0 5px 12px rgba(0, 0, 0, 0.9);
}

.subpage-title span {
  display: block;
  margin-top: 8px;
  color: #dcc8a5;
}

.fantasy-frame {
  position: relative;
  padding: 14px;
  border: 2px solid #9f7630;
  border-radius: 19px;
  background:
    linear-gradient(90deg, #272521, #545049 2.5%, #26231f 5%, #181613 95%, #4c4941 97.5%, #25231f);
  box-shadow:
    inset 0 0 0 4px #111,
    inset 0 0 0 6px rgba(192, 151, 71, 0.54),
    0 24px 55px rgba(0, 0, 0, 0.72);
}

.fantasy-frame::before,
.fantasy-frame::after {
  position: absolute;
  top: 43px;
  z-index: 3;
  width: 30px;
  height: 30px;
  border: 2px solid #d3a752;
  content: "";
  background: linear-gradient(135deg, #6b4311, #efc76d 48%, #3b2107 52%);
  box-shadow: 0 0 0 4px #24211d, 0 0 14px rgba(236, 174, 55, 0.6);
  transform: rotate(45deg);
}

.fantasy-frame::before { left: -10px; }
.fantasy-frame::after { right: -10px; }

.frame-ornament {
  position: absolute;
  top: -12px;
  left: 50%;
  z-index: 4;
  width: 88px;
  height: 22px;
  border: 1px solid #c99942;
  border-radius: 50% 50% 10px 10px;
  background: linear-gradient(#b27a20, #33200a 48%, #c8953a);
  transform: translateX(-50%);
}

.red-gold-nav {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  overflow: hidden;
  border: 1px solid #d09a39;
  border-radius: 10px;
  background: #3a1006;
  box-shadow: inset 0 0 0 3px rgba(255, 206, 111, 0.12);
}

.red-gold-nav a {
  position: relative;
  padding: 14px 8px 12px;
  border-right: 1px solid rgba(236, 171, 62, 0.42);
  color: #ffe39d;
  background: linear-gradient(#7f2d15, #4d1609 60%, #7a2b12);
  font-size: clamp(0.9rem, 1.7vw, 1.15rem);
  text-align: center;
  text-decoration: none;
  text-shadow: 0 2px 2px #200500;
}

.red-gold-nav a:last-child { border-right: 0; }

.red-gold-nav a:hover,
.red-gold-nav a:focus-visible,
.red-gold-nav a.active {
  color: #fff8d9;
  background: linear-gradient(#aa481d, #661b08 60%, #9c3c15);
  box-shadow: inset 0 -3px 0 #f0b942, inset 0 1px 0 rgba(255, 239, 184, 0.6);
}

.breadcrumb {
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 15px 18px 12px;
  color: #9e9484;
  font-size: 0.92rem;
}

.breadcrumb a { color: #d5ad60; text-decoration: none; }
.breadcrumb strong { color: #f2dbac; }

.board-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 22px;
  border-block: 1px solid rgba(189, 139, 50, 0.64);
  background: linear-gradient(90deg, rgba(80, 29, 7, 0.84), rgba(8, 7, 6, 0.94) 58%);
}

.board-title h2 {
  margin: 0;
  color: #ffcf69;
  font-size: 1.72rem;
}

.back-button {
  padding: 9px 15px;
  border: 1px solid #c39951;
  border-radius: 7px;
  color: #fff1c3;
  background: linear-gradient(#8b6d3f, #5a3b18);
  text-decoration: none;
  box-shadow: inset 0 0 0 2px rgba(255, 239, 184, 0.18);
}

.support-content {
  padding: clamp(18px, 3vw, 34px);
  border-radius: 0 0 8px 8px;
  background: rgba(4, 4, 3, 0.91);
}

.support-notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid rgba(226, 166, 57, 0.57);
  border-radius: 10px;
  background: linear-gradient(100deg, rgba(97, 38, 6, 0.6), rgba(28, 15, 7, 0.72));
}

.notice-icon {
  display: grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #e5b558;
  border-radius: 50%;
  color: #2c1603;
  background: linear-gradient(#ffdc7c, #b56d10);
  font-family: Georgia, serif;
  font-size: 1.45rem;
  font-weight: 800;
}

.support-notice h3,
.content-panel h3 { margin: 0; color: #fff0c6; font-size: 1.35rem; }
.support-notice p { margin: 6px 0 0; color: #d8c7a9; line-height: 1.8; }

.content-panel {
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid rgba(160, 117, 44, 0.72);
  border-radius: 11px;
  background: rgba(14, 11, 8, 0.84);
  box-shadow: inset 0 1px rgba(255, 219, 134, 0.06);
}

.panel-heading {
  display: flex;
  gap: 13px;
  align-items: center;
  padding: 13px 17px;
  border-bottom: 1px solid rgba(163, 119, 45, 0.52);
  background: linear-gradient(90deg, rgba(73, 31, 8, 0.85), rgba(20, 15, 10, 0.6));
}

.panel-heading .owner-controls { margin-left: auto; }

[data-owner-only] { display: none; }

.owner-mode [data-owner-only] { display: flex; }

.owner-mode-banner {
  gap: 10px;
  align-items: center;
  margin-bottom: 18px;
  padding: 10px 14px;
  border: 1px solid rgba(99, 214, 128, 0.55);
  border-radius: 8px;
  color: #cae8cf;
  background: rgba(9, 54, 21, 0.75);
  line-height: 1.5;
}

.owner-mode-banner strong { color: #7bed99; white-space: nowrap; }

.content-export-button {
  margin-left: auto;
  padding: 8px 14px;
  border: 1px solid #dca646;
  border-radius: 999px;
  color: #fff2c2;
  background: linear-gradient(180deg, #713510, #351507);
  box-shadow: inset 0 0 0 1px rgba(255, 221, 135, 0.2);
  cursor: pointer;
}

.content-export-button:hover { filter: brightness(1.14); }

.owner-controls {
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.panel-heading > span {
  color: #d89a32;
  font-family: Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
}

.panel-heading p { font-size: 0.68rem; }

.support-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: support-step;
}

.support-steps li {
  position: relative;
  min-height: 122px;
  padding: 24px 20px 20px;
  border-right: 1px solid rgba(176, 132, 58, 0.26);
  counter-increment: support-step;
}

.support-steps li:last-child { border-right: 0; }
.support-steps b { display: block; margin-bottom: 8px; color: #f2c768; font-size: 1.1rem; }
.support-steps span { color: #c6b79e; font-size: 0.94rem; line-height: 1.65; }

.support-table-wrap { overflow-x: auto; }
.support-table { width: 100%; border-collapse: collapse; }
.support-table th,
.support-table td { padding: 15px 18px; border-bottom: 1px solid rgba(151, 111, 44, 0.28); text-align: left; }
.support-table th { color: #deb35d; background: rgba(26, 19, 12, 0.72); }
.support-table td { color: #d7c7aa; }
.support-table tbody tr:last-child td { border-bottom: 0; }
.support-table td:first-child { color: #fff0c4; font-weight: 700; }
.support-table td span {
  display: inline-block;
  padding: 5px 9px;
  border: 1px solid rgba(211, 155, 54, 0.56);
  border-radius: 99px;
  color: #f2cb74;
  background: rgba(99, 51, 10, 0.34);
}

.ratio-table th,
.ratio-table td {
  width: 50%;
  text-align: center;
}

.ratio-table tbody tr:nth-child(even),
.milestone-table tbody tr:nth-child(even) {
  background: rgba(111, 58, 15, 0.12);
}

.ratio-table td strong {
  color: #ffd371;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}

.table-note,
.milestone-intro,
.gift-note,
.edit-hint {
  margin: 0;
  padding: 13px 18px;
  color: #bfae92;
  background: rgba(48, 30, 13, 0.38);
  line-height: 1.7;
}

.gift-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.78fr) minmax(360px, 1.45fr);
  gap: 0;
}

.gift-summary {
  padding: 26px 24px;
  border-right: 1px solid rgba(163, 119, 45, 0.42);
  background:
    radial-gradient(circle at 50% 0, rgba(203, 120, 24, 0.18), transparent 52%),
    rgba(37, 22, 10, 0.44);
}

.gift-badge {
  display: inline-block;
  margin-bottom: 15px;
  padding: 6px 11px;
  border: 1px solid rgba(230, 178, 76, 0.66);
  border-radius: 99px;
  color: #f2c665;
  background: rgba(94, 46, 7, 0.56);
  font-size: 0.86rem;
}

.gift-summary h4 {
  margin: 0;
  color: #fff0c7;
  font-size: 1.45rem;
  line-height: 1.5;
}

.gift-summary p {
  margin: 9px 0 0;
  color: #c7b89e;
  line-height: 1.7;
}

.gift-items {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gift-items li {
  display: flex;
  gap: 13px;
  align-items: center;
  min-height: 51px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(154, 113, 44, 0.26);
  color: #dfcfb3;
}

.gift-items li:last-child { border-bottom: 0; }
.gift-items li span { flex: 0 0 22px; color: #d8962b; font-family: Georgia, serif; font-size: 0.84rem; }
.gift-items li b { color: inherit; font-weight: 400; line-height: 1.6; }

.gift-note {
  border-top: 1px solid rgba(163, 119, 45, 0.32);
  color: #e1bd72;
}

.edit-gift-button {
  padding: 8px 12px;
  border: 1px solid #d2a04a;
  border-radius: 7px;
  color: #ffe7a7;
  background: linear-gradient(#773216, #3d1208);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 225, 145, 0.12);
}

.edit-gift-button.compact {
  padding-inline: 10px;
  font-size: 0.86rem;
}

.edit-gift-button.danger {
  border-color: #a86a42;
  color: #f1c3a4;
  background: linear-gradient(#63301e, #30120a);
}

[data-gift-field].is-editing,
[data-gift-item].is-editing,
[data-milestone-amount].is-editing,
[data-milestone-reward].is-editing {
  border-radius: 5px;
  outline: 2px dashed rgba(255, 199, 82, 0.7);
  outline-offset: 4px;
  background: rgba(110, 56, 11, 0.32);
}

.edit-hint {
  border-top: 1px dashed rgba(216, 157, 48, 0.44);
  color: #f4d184;
}

.milestone-intro { border-bottom: 1px solid rgba(151, 111, 44, 0.28); }
.milestone-table th:first-child,
.milestone-table td:first-child { width: 26%; text-align: center; }
.milestone-table td:first-child { color: #ffd474; font-family: Georgia, serif; font-size: 1.25rem; }
.milestone-table ul { margin: 0; padding-left: 1.2rem; line-height: 1.75; }
.milestone-table li::marker { color: #d59a34; }

.statement-copy {
  padding: 22px 26px 24px;
  color: #d6c6aa;
  line-height: 1.85;
}

.statement-copy > p {
  margin: 0 0 15px;
  color: #f0d69d;
  font-size: 1.05rem;
}

.statement-copy ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 1.35rem;
}

.statement-copy li::marker { color: #d79b35; }

.line-contact {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 24px;
  align-items: center;
  margin-top: 18px;
  padding: 24px 28px;
  overflow: hidden;
  border: 1px solid rgba(95, 211, 120, 0.58);
  border-radius: 12px;
  background:
    radial-gradient(circle at 100% 50%, rgba(41, 184, 75, 0.2), transparent 38%),
    linear-gradient(100deg, rgba(11, 42, 19, 0.86), rgba(10, 12, 8, 0.9));
  box-shadow: inset 0 0 0 3px rgba(157, 241, 172, 0.04);
}

.line-copy > p {
  margin: 0 0 4px;
  color: #61dc80;
  font-family: Georgia, serif;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.2em;
}

.line-copy h3 { margin: 0; color: #f4ffe9; font-size: 1.7rem; }
.line-copy > span { display: block; margin-top: 8px; color: #c5d8c6; line-height: 1.7; }

.line-button {
  display: inline-block;
  margin-top: 17px;
  padding: 11px 19px;
  border: 1px solid #8ff0a6;
  border-radius: 8px;
  color: #04270d;
  background: linear-gradient(#8af49f, #37bd59);
  font-weight: 700;
  text-decoration: none;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.65), 0 6px 16px rgba(0, 0, 0, 0.36);
}

.line-editor {
  width: min(100%, 620px);
  gap: 12px;
  margin-top: 20px;
  padding: 15px;
  border: 1px solid rgba(131, 225, 151, 0.42);
  border-radius: 9px;
  background: rgba(2, 22, 8, 0.72);
}

.owner-mode .line-editor {
  display: grid;
}

.line-editor label {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 10px;
  align-items: center;
}

.line-editor label > span {
  color: #cfe8d3;
  font-size: 0.9rem;
}

.line-editor input {
  width: 100%;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid rgba(121, 207, 140, 0.52);
  border-radius: 6px;
  color: #f2fff4;
  background: rgba(0, 0, 0, 0.55);
}

.line-editor input[type="file"] { padding: 6px; }

.line-editor-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.line-editor-actions button {
  padding: 8px 12px;
  border: 1px solid #7edf93;
  border-radius: 6px;
  color: #073111;
  background: #65d77f;
  cursor: pointer;
}

.line-editor-actions button.danger {
  border-color: #aa7356;
  color: #f4d0bc;
  background: #572719;
}

.line-editor > small { color: #8ebd98; line-height: 1.5; }

.line-qr-placeholder {
  display: grid;
  width: 156px;
  height: 156px;
  place-content: center;
  border: 8px solid #fff;
  border-radius: 9px;
  color: #071e0d;
  background:
    repeating-conic-gradient(#183e21 0 25%, #fff 0 50%) 50% / 20px 20px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.line-qr-placeholder strong,
.line-qr-placeholder span,
.line-qr-placeholder small {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.92);
}

.line-qr-placeholder strong { color: #19a841; font-size: 1.35rem; }
.line-qr-placeholder small { color: #624a1d; font-size: 0.7rem; }

.line-qr-placeholder > img {
  display: block;
  width: 140px;
  height: 140px;
  object-fit: contain;
  background: #fff;
}

.line-qr-placeholder > img[hidden] { display: none; }

.line-qr-placeholder > div {
  display: grid;
  place-content: center;
}

.line-qr-placeholder > div[hidden] { display: none; }

.rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
  margin: 0;
  padding: 20px 24px 22px 44px;
  color: #d2c2a4;
  line-height: 1.7;
}

.rule-list li::marker { color: #d79b35; }

.support-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  padding-top: 28px;
}

.support-action {
  min-width: 170px;
  padding: 13px 22px;
  border: 1px solid #d5a84d;
  border-radius: 9px;
  text-align: center;
  text-decoration: none;
  box-shadow: inset 0 0 0 3px rgba(255, 236, 175, 0.12), 0 7px 16px rgba(0, 0, 0, 0.45);
  transition: 0.2s ease;
}

.support-action.primary { color: #351a00; background: linear-gradient(#ffe28b, #bc7314); }
.support-action.secondary { color: #ffe7a7; background: linear-gradient(#6f2b11, #351006); }
.support-action:hover { filter: brightness(1.12); transform: translateY(-2px); }
.support-action:focus-visible { outline: 3px solid rgba(255, 218, 126, 0.78); outline-offset: 3px; }

@media (max-width: 820px) {
  .subpage-header-links { display: none; }
  .red-gold-nav { grid-template-columns: repeat(3, 1fr); }
  .red-gold-nav a:nth-child(3) { border-right: 0; }
  .red-gold-nav a:nth-child(-n + 3) { border-bottom: 1px solid rgba(236, 171, 62, 0.42); }
  .support-steps { grid-template-columns: repeat(2, 1fr); }
  .support-steps li:nth-child(2) { border-right: 0; }
  .support-steps li:nth-child(-n + 2) { border-bottom: 1px solid rgba(176, 132, 58, 0.26); }
  .rule-list { grid-template-columns: 1fr; }
  .gift-layout { grid-template-columns: 1fr; }
  .gift-summary { border-right: 0; border-bottom: 1px solid rgba(163, 119, 45, 0.42); }
}

@media (max-width: 540px) {
  .subpage-main { width: min(100% - 16px, 1180px); padding-top: 38px; }
  .subpage-title { width: calc(100% - 10px); padding-inline: 14px; }
  .fantasy-frame { padding: 8px; border-radius: 13px; }
  .fantasy-frame::before,
  .fantasy-frame::after,
  .frame-ornament { display: none; }
  .red-gold-nav { grid-template-columns: repeat(2, 1fr); }
  .red-gold-nav a:nth-child(3) { border-right: 1px solid rgba(236, 171, 62, 0.42); }
  .red-gold-nav a:nth-child(2n) { border-right: 0; }
  .red-gold-nav a:nth-child(-n + 4) { border-bottom: 1px solid rgba(236, 171, 62, 0.42); }
  .board-title { align-items: flex-start; gap: 12px; padding: 14px; }
  .back-button { padding: 8px 10px; font-size: 0.88rem; }
  .support-content { padding: 12px; }
  .support-steps { grid-template-columns: 1fr; }
  .support-steps li { min-height: auto; border-right: 0; border-bottom: 1px solid rgba(176, 132, 58, 0.26); }
  .support-steps li:last-child { border-bottom: 0; }
  .support-actions { flex-direction: column; }
  .panel-heading { flex-wrap: wrap; }
  .panel-heading .owner-controls { width: 100%; margin-left: 0; }
  .owner-controls .edit-gift-button { flex: 1 1 100%; }
  .owner-mode-banner { align-items: flex-start; flex-direction: column; }
  .line-contact { grid-template-columns: 1fr; justify-items: center; padding: 22px 18px; text-align: center; }
  .line-editor label { grid-template-columns: 1fr; text-align: left; }
  .line-editor-actions { flex-direction: column; }
  .milestone-table th:first-child,
  .milestone-table td:first-child { width: 34%; }
}
