@import url("https://fonts.googleapis.com/css2?family=Mountains+of+Christmas:wght@400;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Rounded:opsz,wght,FILL,GRAD@24,400,1,0&display=block");

:root {
  color-scheme: light;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background: #f7f9fc;
  color: #222;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #f7f9fc 0%, #f0f5ff 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Mountains of Christmas", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  letter-spacing: 0.02em;
}

.icon {
  font-family: "Material Symbols Rounded", sans-serif;
  font-weight: normal;
  font-style: normal;
  font-size: 1.2em;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  letter-spacing: normal;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.icon-logo {
  font-size: 1.55em;
  color: rgba(255, 255, 255, 0.95);
}

.site-header,
.site-footer {
  background-color: #749a48;
  color: #fff;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-header {
  justify-content: space-between;
}

.site-title {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0;
  font-size: 1.65rem;
  line-height: 1.2;
}

.header-controls {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}

.menu-toggle {
  appearance: none;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 14px;
  color: inherit;
  cursor: pointer;
  padding: 0.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.4);
}

.menu-toggle[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.24);
  border-color: rgba(255, 255, 255, 0.55);
}

.menu-toggle:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

.menu-toggle-box {
  display: inline-flex;
  flex-direction: column;
  gap: 0.25rem;
}

.menu-toggle-bar {
  width: 1.5rem;
  height: 0.18rem;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease;
}

.action-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: 0;
  background: #ffffff;
  color: #0d2c3b;
  min-width: 230px;
  padding: 1rem;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(18, 69, 89, 0.25);
  display: grid;
  gap: 1rem;
  z-index: 100;
}

.action-menu[hidden] {
  display: none;
}

.menu-section {
  display: grid;
  gap: 0.75rem;
}

.menu-user-text {
  margin: 0;
  font-weight: 600;
  color: #124559;
}

.menu-button {
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}

.menu-divider {
  border: 0;
  border-top: 1px solid rgba(18, 69, 89, 0.12);
  margin: 0;
}

.language-switcher {
  display: grid;
  gap: 0.4rem;
}

.language-switcher label {
  font-weight: 600;
  color: #124559;
}

.language-switcher select {
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid #c4d7f2;
  font-size: 0.95rem;
  width: 100%;
}

.site-footer {
  justify-content: center;
  font-size: 0.9rem;
  text-align: center;
}

main {
  flex: 1;
  width: min(900px, 92vw);
  margin: 2rem auto;
  display: grid;
  gap: 1.5rem;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  box-shadow: 0 10px 30px rgba(18, 69, 89, 0.1);
}

.card h2,
.card h3 {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.combo-card {
  display: grid;
  gap: 1.5rem;
}

.combo-form {
  display: grid;
  gap: 1.25rem;
}

.combo-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.combo-progress-label {
  font-weight: 600;
  color: #124559;
}

.combo-steps {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  padding: 0;
  margin: 0;
}

.combo-steps li {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: 2px dashed #c4d7f2;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f9fc;
  transition: all 0.2s ease;
  overflow: hidden;
  padding: 0.35rem;
}

.combo-steps li.is-filled {
  border-style: solid;
  border-color: #1e66f5;
  background: #ffffff;
  box-shadow: 0 8px 16px rgba(30, 102, 245, 0.2);
}

.combo-step-icon {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.combo-step-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.combo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  justify-items: center;
  width: 100%;
  max-width: calc((150px * 4) + (0.75rem * 3));
  margin: 0 auto;
}

.combo-actions {
  display: flex;
  justify-content: flex-end;
}

.combo-actions .button {
  min-width: 0;
}

.combo-button {
  position: relative;
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 0.5rem;
  background: linear-gradient(145deg, #ffffff, #f2f6ff);
  box-shadow: 0 10px 18px rgba(18, 69, 89, 0.08);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 150px;
  aspect-ratio: 1 / 1;
}

.combo-button img {
  display: block;
  width: 100%;
  max-width: 150px;
  max-height: 150px;
  height: 100%;
  border-radius: 12px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.combo-button:hover,
.combo-button:focus {
  outline: none;
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(18, 69, 89, 0.18);
  border-color: rgba(30, 102, 245, 0.4);
}

.combo-button[disabled] {
  cursor: default;
  pointer-events: none;
}

.combo-hint {
  margin: 0;
  color: rgba(18, 69, 89, 0.75);
  font-size: 0.95rem;
}

label span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="password"],
input[type="url"],
select {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #c4d7f2;
  font-size: 1rem;
}

textarea {
  width: 100%;
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid #c4d7f2;
  font-size: 1rem;
  resize: vertical;
}

input:focus,
select:focus {
  outline: 3px solid rgba(220, 20, 60, 0.25);
  border-color: #dc143c;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  border: none;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  background: #d1d9e6;
  color: #124559;
}

.button.primary {
  background: #1e66f5;
  color: #fff;
}

.button.secondary {
  background: #ffc857;
  color: #124559;
}

.button.danger {
  background: #ef4444;
  color: #fff;
}

.button.subtle {
  background: transparent;
  color: #1e66f5;
  border: 1px solid rgba(30, 102, 245, 0.3);
}

.button.small {
  padding: 0.35rem 0.75rem;
  font-size: 0.85rem;
}

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

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
}

.button.subtle:hover:not(:disabled) {
  background: rgba(30, 102, 245, 0.08);
  box-shadow: none;
}

.button.danger:hover:not(:disabled) {
  box-shadow: 0 6px 14px rgba(239, 68, 68, 0.25);
}


.flash-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  right: auto;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  pointer-events: none;
  gap: 0.5rem;
  transform: translateX(-50%);
}

.flash-messages {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  width: min(24rem, calc(100vw - 2rem));
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.25);
  background: #ffffff;
  color: #1f2937;
  pointer-events: auto;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  border: 2px solid transparent;
}

.flash:hover {
  transform: translateY(-2px);
}

.flash:active {
  transform: translateY(0);
  opacity: 0.85;
}

.flash.success {
  background: #dff5e3;
  color: #0a6a37;
  border-color: rgba(10, 106, 55, 0.35);
}

.flash.error {
  background: #fbeaea;
  color: #a11a1a;
  border-color: rgba(161, 26, 26, 0.35);
}

@media (max-width: 600px) {
  .flash-container {
    left: 50%;
    right: auto;
    width: 100%;
  }

  .flash-messages {
    width: min(24rem, calc(100vw - 2.5rem));
  }
}

.user-info {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.group-label {
  font-size: 0.95rem;
  color: #1b4b73;
  background: #e6f1fb;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.group-context {
  font-weight: 600;
  color: #124559;
  margin: 0 0 0.75rem;
}

.kid-tabs {
  display: grid;
  gap: 1.5rem;
}

.kid-tabs-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  background: linear-gradient(135deg, rgba(18, 69, 89, 0.08), rgba(18, 69, 89, 0.04));
  padding: 0.6rem;
  border-radius: 12px;
  border: 1px solid rgba(18, 69, 89, 0.12);
}

.kid-tab {
  border: none;
  background: rgba(255, 255, 255, 0.6);
  color: #124559;
  font-weight: 600;
  padding: 0.45rem 1.1rem;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(18, 69, 89, 0.08);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.kid-tab span {
  pointer-events: none;
}

.kid-tab:hover,
.kid-tab:focus-visible {
  background: rgba(30, 102, 245, 0.12);
  outline: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(18, 69, 89, 0.15);
}

.kid-tab.is-active {
  background: #1e66f5;
  color: #fff;
  box-shadow: 0 12px 24px rgba(30, 102, 245, 0.35);
}

.kid-tab.is-active:hover,
.kid-tab.is-active:focus-visible {
  background: #215be0;
}

.kid-tabpanels {
  display: grid;
}

.kid-group-badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0;
  margin: 0;
}

.kid-group-badges li {
  background: rgba(18, 69, 89, 0.14);
  color: #124559;
  font-weight: 600;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
}


.kid-list {
  background: linear-gradient(135deg, #e3edff 0%, #f5f7ff 100%);
  border-radius: 16px;
  border: 1px solid rgba(18, 69, 89, 0.12);
  padding: 1.25rem;
  display: none;
  gap: 1rem;
  box-shadow: 0 16px 32px rgba(18, 69, 89, 0.08);
}

.kid-list.is-active {
  display: grid;
}

.kid-list + .kid-list {
  margin-top: 1.5rem;
}

.wish-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
}

.wish-list.detailed li {
  flex-direction: column;
  align-items: stretch;
}

.gift-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.gift-summary {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 1;
  min-width: 0;
}

.gift-summary .wish-text {
  flex: 1;
  min-width: 0;
}

.wish-item {
  position: relative;
}

.wish-fold-toggle {
  appearance: none;
  border: none;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 102, 245, 0.08);
  color: #124559;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.wish-fold-toggle:hover,
.wish-fold-toggle:focus-visible {
  background: rgba(30, 102, 245, 0.18);
  transform: translateY(-1px);
}

.wish-fold-toggle:focus-visible {
  outline: 3px solid rgba(30, 102, 245, 0.35);
  outline-offset: 2px;
}

.wish-fold-icon {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 8px solid currentColor;
  transition: transform 0.2s ease;
}

.wish-item.is-folded .wish-fold-icon {
  transform: rotate(-90deg);
}

.wish-body {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.wish-item.is-folded .wish-body {
  display: none;
}

.gift-detail-media {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.gift-link {
  margin: 0;
  word-break: break-word;
  justify-self: end;
  text-align: right;
  max-width: 100%;
}

.gift-image-wrapper {
  margin: 0;
}

.gift-image-wrapper img,
.current-image img {
  max-width: 100%;
  border-radius: 8px;
  border: 1px solid #e0e8f9;
}

.gift-actions {
  margin-top: 0.75rem;
}

.wish-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem 1.15rem;
  border: 1px solid rgba(18, 69, 89, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(18, 69, 89, 0.08);
}

.wish-details {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wish-text {
  font-size: 1.35rem;
  font-weight: 600;
  color: #124559;
}

.badge {
  align-self: flex-start;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge.available {
  background: #e1f5fe;
  color: #0277bd;
}

.badge.reserved {
  background: #ffe0e0;
  color: #c62828;
}

.wish-actions form {
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}

.form-actions .button {
  min-width: 0;
  max-width: 100%;
}

.form-actions .button span {
  white-space: normal;
}

.card.danger {
  border: 1px solid #f6cfd0;
  background: #fff5f5;
}

.card.danger h3 {
  margin-top: 0;
}

.button.danger {
  background: #b71c1c;
  color: #fff;
}

.current-image {
  display: grid;
  gap: 0.5rem;
}

.gift-detail-preview {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.gift-detail-link {
  margin: 0;
  justify-self: end;
  text-align: right;
  word-break: break-word;
}

.gift-detail-link a {
  color: #124559;
  font-weight: 600;
  text-decoration: none;
}

.gift-detail-link a:hover,
.gift-detail-link a:focus-visible {
  text-decoration: underline;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

small {
  display: block;
  margin-top: 0.25rem;
  color: #5c6b8a;
}

.empty {
  color: #5c6b8a;
  font-style: italic;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Kid theme overrides */

body.kid-theme {
  background: linear-gradient(180deg, #fff7e6 0%, #ffe6f2 100%);
  font-family: "Fredoka", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

.kid-layout {
  width: min(780px, 92vw);
  gap: 2rem;
}

.kid-card {
  background: #fff;
  border-radius: 24px;
  padding: 2rem;
  box-shadow: 0 12px 30px rgba(255, 168, 0, 0.15);
}

.kid-heading {
  margin: 0 0 1.5rem;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.kid-wish-grid {
  list-style: none;
  display: grid;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
}

.kid-wish-card {
  background: linear-gradient(135deg, #ffffff 0%, #f4f8ff 100%);
  border-radius: 20px;
  padding: 1.5rem;
  display: grid;
  gap: 1rem;
  border: 3px solid rgba(30, 102, 245, 0.15);
}

.kid-wish-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: #0b3d91;
}

.kid-wish-text {
  word-break: break-word;
}

.kid-heading .icon,
.kid-wish-title .icon {
  color: #f59e0b;
  font-size: 1.6rem;
}

.kid-wish-text a {
  color: #0b3d91;
  text-decoration: underline;
  word-break: break-word;
}

.kid-wish-image img {
  border-radius: 16px;
  border: 3px solid rgba(30, 102, 245, 0.15);
  max-width: 100%;
}

.kid-link-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 16px;
  background: #fff2cc;
  color: #b35a00;
  font-weight: 700;
  text-decoration: none;
  word-break: break-word;
}

.kid-link-button .icon {
  font-size: 1.2rem;
  color: inherit;
}

.kid-link-button:hover {
  background: #ffe08a;
}


.kid-wish-actions {
  display: flex;
  justify-content: center;
}

.kid-wish-link {
  margin: 0.5rem 0 0;
  display: flex;
  justify-content: flex-end;
}

.kid-big-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  border: none;
  background: #1e66f5;
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(30, 102, 245, 0.35);
  cursor: pointer;
}

.kid-big-button .icon {
  font-size: 1.35rem;
  color: inherit;
}

.kid-big-button.primary {
  background: #16a34a;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.35);
}

.kid-big-button:hover {
  transform: translateY(-2px);
}

.kid-empty {
  text-align: center;
  font-size: 1.2rem;
}

.kid-form {
  display: grid;
  gap: 1.25rem;
  width: 100%;
}

.kid-input {
  display: grid;
  gap: 0.5rem;
}

.kid-input input[type="text"],
.kid-input input[type="url"],
.kid-input input[type="file"] {
  font-size: 1.1rem;
  border-radius: 16px;
  border: 2px solid rgba(30, 102, 245, 0.25);
  padding: 0.9rem 1rem;
  width: 100%;
  box-sizing: border-box;
}

.kid-input input[type="file"] {
  padding: 0.6rem 1rem;
}

.kid-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
  color: #0b3d91;
}

.kid-label .icon {
  font-size: 1.35rem;
}

.kid-help-text {
  color: #5c6b8a;
  font-size: 0.9rem;
}

.kid-current-image {
  display: grid;
  gap: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, #fff4f0 100%);
  border-radius: 20px;
  padding: 1rem 1.25rem;
  border: 2px dashed rgba(255, 111, 97, 0.35);
}

.kid-current-image img {
  max-width: 100%;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(30, 102, 245, 0.1);
}

.kid-detail-preview {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.kid-detail-link {
  display: flex;
  justify-content: flex-end;
}

.kid-checkbox {
  color: #0b3d91;
  font-weight: 600;
}

.kid-add-wish .kid-big-button {
  justify-self: center;
  padding: 1rem 2.5rem;
}

.kid-button-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.kid-button-row .kid-big-button {
  flex: 1 1 220px;
  justify-content: center;
}

.kid-big-button.danger {
  background: #ef4444;
  box-shadow: 0 10px 20px rgba(239, 68, 68, 0.35);
}

.kid-delete-card {
  border: 3px dashed rgba(239, 68, 68, 0.35);
  background: #fff4f4;
}

.kid-delete-card form {
  display: flex;
  justify-content: center;
}

/* Adult notes */

.adult-notes {
  margin-top: 1.25rem;
  border-top: 1px dashed #c4d7f2;
  padding-top: 1rem;
  display: grid;
  gap: 0.75rem;
}

.adult-notes h4 {
  margin: 0;
  font-size: 1.05rem;
  color: #124559;
}

.notes-hint {
  margin: 0;
  color: #5c6b8a;
  font-size: 0.9rem;
}

.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.5rem;
}

.notes-list li {
  background: #f4f8ff;
  border-radius: 10px;
  padding: 0.75rem 1rem;
}

.note-actions {
  margin-top: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #fff8e7;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(255, 200, 87, 0.45);
}

.typing-indicator[hidden] {
  display: none !important;
}

.typing-indicator img {
  width: 52px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.typing-indicator span {
  font-size: 0.95rem;
  color: #8a4600;
  font-weight: 600;
}

.note-author {
  font-weight: 600;
  color: #124559;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.note-author .icon {
  font-size: 1.15rem;
}

.note-timestamp {
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(18, 69, 89, 0.7);
  display: inline-flex;
  align-items: center;
  margin-left: 0.2rem;
}

.note-text {
  margin: 0.35rem 0 0;
  word-break: break-word;
  white-space: pre-line;
}

.note-text a {
  color: #1e66f5;
  text-decoration: underline;
}

.note-edit-form {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.5rem;
}

.note-edit-form textarea {
  min-height: 4rem;
}

.note-edit-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.note-form {
  display: grid;
  gap: 0.5rem;
}

.note-form textarea {
  min-height: 4.5rem;
  width: 100%;
  box-sizing: border-box;
}

.note-form .button {
  justify-self: start;
}

@media (max-width: 900px) {
  main {
    width: min(100%, 96vw);
    margin: 1.5rem auto;
  }

  .card,
  .kid-card {
    padding: 1.5rem;
  }

  .site-header,
  .site-footer {
    padding: 1.1rem 1.25rem;
  }
}

@media (max-width: 768px) {
  .site-title {
    font-size: 1.4rem;
  }

  .action-menu {
    min-width: min(260px, 86vw);
  }

  .menu-toggle {
    padding: 0.45rem;
  }

  .menu-toggle-bar {
    width: 1.35rem;
  }

  .site-footer {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }

  .wish-list li {
    flex-direction: column;
    align-items: stretch;
  }

  .gift-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .wish-actions form {
    width: 100%;
  }

  .wish-actions .button {
    width: 100%;
  }

  .note-form {
    grid-template-columns: 1fr;
  }

  .note-form .button {
    width: 100%;
    justify-self: stretch;
  }

  .kid-card {
    padding: 1.25rem;
  }

  .kid-heading {
    font-size: 1.5rem;
    flex-wrap: wrap;
  }

  .kid-wish-title {
    flex-wrap: wrap;
  }

  .kid-link-button {
    width: 100%;
    justify-content: center;
  }

  .kid-wish-actions {
    width: 100%;
    justify-content: center;
  }

.kid-big-button {
  width: 100%;
}

.kid-form .kid-big-button {
  justify-self: stretch;
}

.kid-button-row {
  flex-direction: column;
}

  .kid-button-row .kid-big-button {
    flex: 1 1 auto;
    width: 100%;
  }

}
/* Admin layout styling applied globally */
.admin-members-card,
.admin-groups-card {
  display: grid;
  gap: 1.5rem;
}

.admin-members-intro {
  margin: 0;
  color: rgba(18, 69, 89, 0.75);
}

.admin-members-form {
  display: grid;
  gap: 1rem;
}

.admin-members-form input,
.admin-members-form select {
  width: 100%;
  box-sizing: border-box;
}

.admin-members-form > .button {
  justify-self: start;
}

.admin-members-grid {
  display: grid;
  gap: 1rem;
}

.admin-groups-card {
  gap: 2rem;
}

.admin-groups-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.group-card {
  border: 2px solid rgba(116, 154, 72, 0.25);
  border-radius: 20px;
  padding: 1.5rem;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.85));
  box-shadow: 0 16px 38px rgba(116, 154, 72, 0.22);
  display: grid;
  gap: 1.25rem;
}

.group-card-header h4 {
  margin: 0;
  color: #4a6b2d;
  font-size: 1.3rem;
}

.member-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.member-entry {
  background: #ffffff;
  border-radius: 16px;
  padding: 1rem 1.25rem;
  box-shadow: 0 14px 34px rgba(14, 53, 25, 0.16);
  display: grid;
  gap: 0.75rem;
  border: 1px solid rgba(116, 154, 72, 0.2);
}

.member-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.member-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.member-name {
  font-weight: 700;
  color: #3a5720;
  font-size: 1.05rem;
}

.member-share {
  display: grid;
  gap: 0.75rem;
}

.member-share img {
  width: 100%;
  max-width: 360px;
  border-radius: 16px;
  box-shadow: 0 18px 40px rgba(18, 69, 89, 0.18);
  background: #ffffff;
}

.member-actions {
  display: grid;
  gap: 0.5rem;
  justify-items: stretch;
  align-items: stretch;
  max-width: min(100%, 22rem);
}

.member-rename-form,
.member-remove-form {
  margin: 0;
}

.member-rename-form {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  width: 100%;
}

.member-rename-form input {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
}

.member-action-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  width: 100%;
}

.member-action-row form {
  margin: 0;
  display: inline-flex;
}

.member-share-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.member-share-actions .button {
  flex: 0 1 auto;
}

@media (min-width: 768px) {
  .member-share-actions [data-role="share-card"] {
    display: none;
  }
}

.member-share .share-hint {
  margin: 0.25rem 0 0;
  color: rgba(18, 69, 89, 0.7);
  font-size: 0.9rem;
}

@media (min-width: 640px) {
  .admin-members-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-members-form > .button {
    margin-top: 1.5rem;
  }
}

@media (max-width: 520px) {
  .site-title {
    font-size: 1.4rem;
  }

  .site-footer {
    text-align: center;
  }

  .card {
    padding: 1rem;
  }

  .wish-text {
    font-size: 1rem;
  }

  .kid-card {
    padding: 1rem;
  }

  .kid-heading {
    font-size: 1.35rem;
  }
}
