:root { color-scheme: light; font-family: system-ui, sans-serif; color: #252d29; background: #f5f8f2; }
* { box-sizing: border-box; }
main { max-width: 64rem; margin: auto; padding: clamp(1.25rem, 5vw, 4rem); }
header { border-bottom: 1px solid #bacbbc; padding-bottom: 1.5rem; margin-bottom: 1.5rem; }
h1 { font-family: Georgia, serif; font-size: clamp(3.5rem, 12vw, 7rem); line-height: 1; letter-spacing: -.055em; margin: 0; color: #174533; }
header p { font-size: 1.2rem; margin-bottom: 0; }
nav, .search-row { display: flex; flex-wrap: wrap; gap: .65rem; }
form { margin-top: 1.5rem; }
label { display: block; font-weight: 650; margin-bottom: .4rem; }
input, button { font: inherit; border: 1px solid #6b8c7b; border-radius: .55rem; padding: .65rem .85rem; }
input { flex: 1 1 13rem; min-width: 0; background: white; }
button { cursor: pointer; color: #174533; background: #e5eee4; }
button:hover { background: #d3e4d4; }
button[aria-pressed=true], button[type=submit] { color: white; background: #174533; }
button:disabled { opacity: .65; cursor: wait; }
:focus-visible { outline: 3px solid #2c7660; outline-offset: 3px; }
#status { color: #40574b; }
#results { list-style: none; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
li { display: flex; flex-direction: column; align-items: flex-start; background: white; border: 1px solid #d8e4d8; border-radius: .8rem; padding: 1rem; gap: .55rem; }
li small { color: #40574b; font-size: .875rem; }
li h2 { font-size: 1.15rem; margin: 0 0 .35rem; font-weight: 650; }
li button { margin-top: auto; }

#actions { margin-top: 1.5rem; }
#actions-title { font-size: 1.2rem; margin: 0 0 .6rem; }
.action-options { display: flex; flex-wrap: wrap; gap: .55rem; }
.action-options button { min-height: 2.75rem; }

:root { color: #261947; background: #f7f1ff; }
header { padding: clamp(1.5rem, 5vw, 3rem); border: 0; border-radius: 1.25rem; background: linear-gradient(125deg, #5021bc, #7935d0 55%, #9d248d); color: white; }
h1 { color: white; }
input, button { border-color: #9a7ccb; }
button { color: #482387; background: #f0e5ff; }
button:hover { background: #e5d4ff; }
button[aria-pressed=true], button[type=submit], .plan-button { color: white; background: #6325bd; }
button[aria-pressed=true]:hover, button[type=submit]:hover, .plan-button:hover { background: #4e199d; }
.action-options button:not([aria-pressed=true]):nth-child(3n+2) { background: #ffe6f1; color: #86194c; border-color: #cf82a7; }
.action-options button:not([aria-pressed=true]):nth-child(3n+3) { background: #ffedbc; color: #704a00; border-color: #bd9030; }
:focus-visible { outline-color: #a21867; }
#status, li small { color: #594273; }
#results > li { border-color: #e0cdf5; }
.card-controls { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
dialog { width: min(35rem, calc(100% - 2rem)); max-height: calc(100% - 2rem); padding: 1.5rem; border: 1px solid #c6a6ed; border-radius: 1rem; color: inherit; box-shadow: 0 1rem 3rem #27104445; }
dialog::backdrop { background: #271044a0; }
.plan-close { display: flex; justify-content: flex-end; margin: 0; }
#plan-title { margin: .75rem 0; }
#plan-steps { padding-left: 1.5rem; margin-bottom: 0; }
#plan-steps li { display: list-item; border: 0; border-radius: 0; padding: .35rem .2rem; }

body:has(#new-wish:not([hidden])) main {
  padding-bottom: calc(6rem + env(safe-area-inset-bottom));
}
#new-wish:not([hidden]) {
  position: fixed;
  z-index: 1;
  inset-inline: 0;
  margin-inline: auto;
  bottom: calc(1.25rem + env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 4.75rem;
  height: 4.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: white;
  background: transparent;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 5px white, 0 0 12px #9b55ff, 0 0 23px #7935d0, 0 2px 5px #482387;
}
#new-wish:hover .new-wish-icon { transform: scale(1.12); }
#new-wish:focus-visible { outline-color: #6325bd; }
#schedule-form:not([hidden]), #details-form { display: grid; gap: .5rem; margin: 1rem 0; }
#schedule-form label, #details-form label { margin: .25rem 0 0; }
#schedule-form input, #details-form input, #details-form select { width: 100%; }
#details-form select { font: inherit; border: 1px solid #9a7ccb; border-radius: .55rem; padding: .65rem .85rem; background: white; }
#plan-steps .step-done { color: #594273; }
#plan-steps [aria-current="step"] { font-weight: 650; }
.wish-progress { margin: 0 0 .5rem; color: #482387; overflow-wrap: anywhere; }
li h2 { overflow-wrap: anywhere; }

.link-import { display: flex; flex-wrap: wrap; gap: .5rem; }
#details-form .link-import input { width: auto; }
#import-status { margin: 0; }
#import-status:empty, #editor-status:empty { display: none; }
.event-when { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: .75rem; }
.event-when label { margin-bottom: .4rem; }
#text-import { padding: .65rem; border: 1px solid #d7baef; border-radius: .55rem; }
#text-import summary { cursor: pointer; color: #482387; }
#text-import textarea { display: block; width: 100%; resize: vertical; font: inherit; padding: .55rem; margin: .3rem 0 .5rem; }
.ticket-decision { margin: 0 0 .5rem; padding: .55rem .65rem; border-radius: .5rem; background: #fff0c2; color: #614000; }
.account-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-inline-start: auto; }
#auth-form:not([hidden]) { display: grid; gap: .55rem; margin-top: 1rem; }
#auth-form label { margin: .2rem 0 0; }
#auth-form button[type=submit] { margin-top: .45rem; }
#auth-status:empty { display: none; }
#account-email { overflow-wrap: anywhere; }

#welcome-wishes { margin-top: 1.25rem; padding: clamp(1rem, 3vw, 1.5rem); background: #e9dcff; border-radius: 1rem; }
#welcome-title { margin: 0 0 .85rem; font-size: clamp(1.3rem, 4vw, 1.7rem); }
#welcome-picks { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); gap: .65rem; list-style: none; padding: 0; margin: 0 0 .85rem; }
#welcome-picks li { border-color: #ceb2ee; min-width: 0; }
#welcome-picks strong { display: block; margin-bottom: .35rem; }
#welcome-skip { background: transparent; }
#welcome-status:empty { display: none; }
#new-wish.welcome-glow .new-wish-icon {
  text-shadow: 0 0 3px #fff, 0 0 10px #ff6ad7, 0 0 22px #9b43fb, 0 0 36px #7b27db, 0 2px 5px #482387;
  animation: wish-highlight 850ms ease-in-out 4 alternate;
}
#new-wish.welcome-glow:focus-visible { outline: none; }
@keyframes wish-highlight {
  from { transform: scale(1); }
  to { transform: scale(1.28); }
}
@media (prefers-reduced-motion: reduce) {
  #new-wish.welcome-glow .new-wish-icon { animation: none; }
}

.new-wish-label { display: none; }
#new-wish.welcome-glow .new-wish-label {
  display: block;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 1rem;
  padding: .4rem .75rem;
  color: white;
  background: #6325bd;
  font-size: .875rem;
  font-weight: 650;
  line-height: 1.3;
  text-shadow: none;
  white-space: nowrap;
}

#share-url { width: 100%; margin: .1rem 0 .75rem; }
#share-status:empty { display: none; }

.icon-library { position: absolute; }
.action-options button[data-action]:not([data-action=""]),
.account-actions button:not([hidden]) {
  display: inline-flex;
  align-items: center;
  gap: .4em;
}
.button-icon {
  width: 1.2em;
  height: 1.2em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
