@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;500;600;700;800&display=swap');
:root {
  font-family: 'Noto Sans KR', sans-serif;
  color: #202126;
  background: #faf9f7;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  height: 84px;
  padding: 0 7%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6e3df;
  background: white;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.brand {
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -1px;
  text-decoration: none;
  color: #202126;
  white-space: nowrap;
}
.brand span {
  font-size: 12px;
  margin-left: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: #777;
}
.tag, .eyebrow {
  font-size: 11px;
  letter-spacing: 2px;
  color: #777;
}
/* ==========================================================================
   Rescene Universe Waffle Launcher & Popover Menu
   ========================================================================== */
.family-launcher-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.btn-launcher {
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  box-sizing: border-box;
  padding: 0 11px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 750;
  line-height: 25px;
  border-radius: 999px;
  border: 1.5px solid #ded3c1;
  background: #f5eee3;
  color: #55483f;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.btn-launcher:hover {
  background: #e8dccb;
  border-color: #cbbeaa;
  color: #2e2621;
  transform: translateY(-1px);
}

.btn-launcher:active {
  transform: scale(0.96);
}

.btn-launcher .launcher-icon {
  display: inline-block;
  vertical-align: middle;
  color: currentColor;
  opacity: 0.8;
  transition: transform 0.18s ease;
}

.btn-launcher:hover .launcher-icon,
.btn-launcher[aria-expanded="true"] .launcher-icon {
  opacity: 1;
  transform: rotate(90deg);
}

.btn-launcher[aria-expanded="true"] {
  background: #e8dccb;
  border-color: #bfae98;
  color: #1a1614;
}

.family-menu-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 270px;
  background: #ffffff;
  border: 1px solid rgba(46, 38, 33, 0.12);
  border-radius: 14px;
  box-shadow: 0 12px 32px -4px rgba(35, 25, 15, 0.18), 0 4px 12px -2px rgba(35, 25, 15, 0.08);
  padding: 8px 6px;
  z-index: 1000;
  box-sizing: border-box;
  text-align: left;
  animation: popoverDrop 0.15s cubic-bezier(0.16, 1, 0.3, 1);
}

.family-menu-popover.hidden {
  display: none !important;
}

@keyframes popoverDrop {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.family-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px 8px 10px;
  border-bottom: 1px solid #f0eee9;
  margin-bottom: 4px;
}

.family-menu-eyebrow {
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.08em;
  color: #8c8071;
  text-transform: uppercase;
}

.family-menu-sub {
  font-size: 11px;
  font-weight: 600;
  color: #a89f92;
}

.family-menu-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.family-service-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: #2e2621;
  background: transparent;
  transition: background 0.12s ease, transform 0.1s ease;
  box-sizing: border-box;
}

.family-service-item:hover {
  background: #fbf8f3;
  transform: translateX(2px);
}

.family-service-item.current {
  background: #f5eee3;
}

.family-service-item.current:hover {
  background: #eee4d4;
  transform: none;
}

.service-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.service-icon-box.quiz {
  background: #fef3c7;
}

.service-icon-box.formlimpic {
  background: #fce7f3;
}

.service-icon-box.archive {
  background: #ede9fe;
}

.service-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.service-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.service-name-row strong {
  font-size: 13px;
  font-weight: 750;
  color: #221f1d;
  line-height: 1.25;
}

.service-meta p {
  font-size: 11px;
  color: #7c7267;
  margin: 2px 0 0 0;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-current {
  font-size: 9.5px;
  font-weight: 750;
  color: #55483f;
  background: #e6dcce;
  padding: 1.5px 6px;
  border-radius: 4px;
  letter-spacing: -0.2px;
}

.service-arrow {
  font-size: 12px;
  font-weight: 700;
  color: #a89f92;
  transition: transform 0.15s ease, color 0.15s ease;
}

.family-service-item:hover .service-arrow {
  transform: translate(2px, -2px);
  color: #d97706;
}
#user-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  white-space: nowrap;
  flex-shrink: 0;
}
#user-nav .user-name {
  font-weight: 700;
  color: #202126;
  white-space: nowrap;
}
#user-nav a {
  text-decoration: none;
  color: #555;
}
#user-nav a:hover {
  color: #ed52b6;
}
#user-nav .btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  border-radius: 7px;
  white-space: nowrap;
}
main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px;
}
h1 {
  font-size: 46px;
  letter-spacing: -2px;
  line-height: 1.25;
  margin: 16px 0;
}
h2 {
  letter-spacing: -0.8px;
}
p {
  line-height: 1.8;
  color: #666;
}
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
  margin-bottom: 48px;
}
.hero-art {
  border-radius: 50%;
  width: 170px;
  height: 170px;
  object-fit: cover;
  flex-shrink: 0;
  border: 4px solid #f7d5e9;
  box-shadow: 0 8px 24px rgba(237, 82, 182, 0.18);
}
.button, button {
  border: 0;
  border-radius: 9px;
  background: #ed52b6;
  color: white;
  padding: 14px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  white-space: nowrap;
}
button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.secondary {
  background: white;
  color: #333;
  border: 1px solid #d4d1ce;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 28px 0;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.card {
  background: white;
  border: 1px solid #e5e2df;
  border-radius: 16px;
  padding: 26px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s;
}
.card:hover {
  transform: translateY(-3px);
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 5px 9px;
  font-size: 12px;
  background: #f3eef1;
  color: #a33680;
}
.card h2 {
  font-size: 22px;
  margin: 20px 0 12px;
}
.muted {
  font-size: 13px;
  color: #777;
}
.panel {
  background: white;
  border: 1px solid #e5e2df;
  border-radius: 16px;
  padding: 32px;
  max-width: 760px;
  margin: 0 auto;
}
.back {
  color: #777;
  text-decoration: none;
  font-size: 14px;
}
.notice {
  background: #fff0f8;
  border: 1px solid #f7d5e9;
  padding: 15px 18px;
  border-radius: 9px;
  color: #9b3274;
  font-size: 13px;
  margin: 20px 0;
}
.field {
  display: block;
  margin: 24px 0;
}
.field span {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 10px;
}
input, textarea {
  width: 100%;
  border: 1px solid #dedbd8;
  border-radius: 8px;
  padding: 16px;
  font: inherit;
  background: #fafafa;
}
input:focus, textarea:focus {
  outline: 2px solid #ed52b6;
  outline-offset: 2px;
}
input[readonly] {
  background: #eee;
  border-color: #eee;
}
textarea {
  min-height: 170px;
  resize: vertical;
}
.dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #555;
  line-height: 1.9;
}
.clock {
  font-variant-numeric: tabular-nums;
  font-size: 25px;
  font-weight: 700;
  margin: 8px 0;
}
.wizard {
  max-width: 760px;
  margin: auto;
  background: white;
  min-height: 70vh;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #e5e2df;
}
.progress {
  height: 4px;
  background: #eee;
}
.progress div {
  height: 100%;
  background: #202126;
  transition: width 0.2s;
}
.step {
  padding: 30px 40px;
  min-height: 420px;
}
.step h2 {
  font-size: 20px;
}
.actions {
  display: flex;
  justify-content: space-between;
  padding: 18px 24px;
  border-top: 1px solid #eee;
}
.summary {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  margin: 30px 0;
}
.summary dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.summary dt {
  color: #777;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th, td {
  text-align: left;
  padding: 17px 12px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}
th {
  color: #777;
  font-weight: 500;
}
td:first-child {
  font-weight: 800;
  color: #b92a86;
}
.empty {
  text-align: center;
  padding: 50px;
  color: #888;
}
#toast {
  display: none;
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  background: #29242a;
  color: white;
  padding: 16px 24px;
  border-radius: 12px;
  max-width: 90%;
  z-index: 10;
}
.small {
  font-size: 12px;
}
.top-space {
  margin-top: 30px;
}
.tab-bar {
  display: flex;
  gap: 12px;
  border-bottom: 2px solid #eee;
  margin: 24px 0;
}
.tab-btn {
  background: none;
  border: none;
  padding: 12px 18px;
  font: inherit;
  font-weight: 600;
  color: #888;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: 0;
  cursor: pointer;
}
.tab-btn.active {
  color: #ed52b6;
  border-bottom: 3px solid #ed52b6;
}
.sub-card {
  background: white;
  border: 1px solid #e5e2df;
  border-radius: 14px;
  padding: 22px;
  margin-bottom: 16px;
}
.sub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.sub-card-title {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  color: #202126;
}
.sub-card-title:hover {
  color: #ed52b6;
}
.sub-rank {
  font-size: 22px;
  font-weight: 800;
  color: #ed52b6;
}
.auth-box {
  max-width: 440px;
  margin: 0 auto;
}
.membership-badge-card {
  background: linear-gradient(135deg, #fff0f8 0%, #fdf5f9 100%);
  border: 1px solid #f7d5e9;
  border-radius: 14px;
  padding: 22px 26px;
  margin: 20px 0 28px;
}
.membership-code-text {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 4px;
  color: #b92a86;
  margin: 8px 0;
  font-family: monospace;
}
.webhook-card {
  background: white;
  border: 1px solid #e5e2df;
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0 28px;
}
.webhook-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-items: center;
}
.webhook-row input {
  flex: 1;
}
.checkbox-field {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 8px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
}
.checkbox-field input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #ed52b6;
  cursor: pointer;
  margin: 0;
}
.admin-badge {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.admin-card {
  background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
  border: 1px solid #f0abfc;
  border-radius: 14px;
  padding: 24px;
  margin: 20px 0 28px;
}
.admin-control-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  gap: 16px;
  flex-wrap: wrap;
}
.btn-danger {
  background: #dc2626;
  color: white;
  border: none;
}
.btn-danger:hover {
  background: #b91c1c;
}
.btn-toggle-on {
  background: #059669;
  color: white;
  border: none;
}
.btn-toggle-off {
  background: #6b7280;
  color: white;
  border: none;
}
.form-header-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.badge-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

@media (max-width: 650px) {
  header {
    padding: 0 12px;
    height: 60px;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .header-left {
    gap: 8px;
    flex-shrink: 0;
  }
  .brand {
    font-size: 19px;
    letter-spacing: -0.5px;
  }
  .brand span {
    display: none;
  }
  .tag {
    display: none;
  }
  .btn-launcher {
    font-size: 10.5px;
    padding: 0 8px;
    height: 26px;
    min-height: 26px;
    max-height: 26px;
    line-height: 23px;
  }
  .family-menu-popover {
    width: 250px;
    left: 0;
    max-width: calc(100vw - 24px);
  }
  #user-nav {
    gap: 6px;
    font-size: 12px;
    flex-shrink: 0;
    white-space: nowrap;
  }
  #user-nav .user-name {
    font-size: 12px;
    white-space: nowrap;
    max-width: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
  }
  #user-nav .admin-badge {
    padding: 2px 5px;
    font-size: 10px;
  }
  #user-nav .admin-badge-text {
    display: none;
  }
  .button, button {
    padding: 12px 16px;
  }
  #user-nav .btn-sm, #user-nav button, #user-nav a.button {
    padding: 6px 10px;
    font-size: 12px;
    white-space: nowrap;
  }
  .webhook-row {
    flex-direction: column;
    align-items: stretch;
  }
  main {
    padding: 32px 18px;
  }
  h1 {
    font-size: 32px;
  }
  .hero {
    flex-direction: column-reverse;
    text-align: center;
    gap: 16px;
  }
  .hero-art {
    width: 130px;
    height: 130px;
  }
  .grid, .dates {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 22px;
  }
  .step {
    padding: 24px;
    min-height: 380px;
  }
  .section-head h2 {
    font-size: 20px;
  }
  footer#site-footer {
    padding: 30px 18px;
    margin-top: 40px;
  }
  .footer-container {
    flex-direction: column;
    gap: 20px;
  }
  .footer-links {
    gap: 16px;
  }
  .privacy-notice-box {
    padding: 14px 16px;
    font-size: 13px;
  }
  .privacy-table {
    font-size: 12px;
  }
  .privacy-table th, .privacy-table td {
    padding: 10px 10px;
  }
}

/* Site Footer */
footer#site-footer {
  border-top: 1px solid #e6e3df;
  background: #ffffff;
  padding: 40px 24px;
  margin-top: 60px;
}
.footer-container {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  flex-wrap: wrap;
}
.footer-brand {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: #202126;
}
.footer-brand span {
  font-size: 12px;
  margin-left: 8px;
  font-weight: 500;
  color: #777;
}
.footer-desc {
  margin: 6px 0 4px;
  font-size: 13px;
  color: #777;
}
.footer-copy {
  margin: 0;
  font-size: 12px;
  color: #999;
}
.footer-copy a, .footer-links a {
  color: #666;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-copy a:hover, .footer-links a:hover {
  color: #ed52b6;
  text-decoration: underline;
}
.footer-links {
  display: flex;
  gap: 20px;
  font-size: 13px;
  font-weight: 500;
  align-items: center;
}

/* Privacy Policy View */
.privacy-panel {
  max-width: 880px;
  margin: 0 auto;
  line-height: 1.8;
}
.privacy-date {
  font-size: 13px;
  color: #888;
  margin: -8px 0 24px;
}
.privacy-notice-box {
  background: #fff5f8;
  border: 1px solid #fbcfe8;
  border-radius: 10px;
  padding: 16px 20px;
  margin: 20px 0 30px;
  color: #9d174d;
  font-size: 14px;
  line-height: 1.7;
}
.privacy-notice-box strong {
  display: block;
  margin-bottom: 4px;
  font-size: 15px;
  color: #831843;
}
.privacy-section {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid #eee;
}
.privacy-section:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}
.privacy-section h3 {
  font-size: 18px;
  font-weight: 700;
  color: #202126;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.privacy-section h3::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #ed52b6;
  border-radius: 2px;
}
.privacy-section p {
  margin: 8px 0;
  color: #4b5563;
  font-size: 14.5px;
}
.privacy-section ul {
  margin: 8px 0 16px;
  padding-left: 20px;
  color: #4b5563;
  font-size: 14.5px;
}
.privacy-section li {
  margin-bottom: 6px;
  line-height: 1.7;
}
.privacy-table {
  width: 100%;
  margin: 16px 0;
  border-collapse: collapse;
  font-size: 13.5px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
}
.privacy-table th, .privacy-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
  white-space: normal;
}
.privacy-table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}
.privacy-table td {
  color: #4b5563;
}
.privacy-table tr:last-child td {
  border-bottom: none;
}
.signup-terms-notice {
  font-size: 12px;
  color: #777;
  margin-top: 14px;
  text-align: center;
  line-height: 1.5;
}
.signup-terms-notice a {
  color: #ed52b6;
  font-weight: 600;
  text-decoration: underline;
}
