/* forms */
.field { display: grid; gap: 6px; font-weight: 700; font-size: 15px; }
.field em { font-weight: 500; font-style: normal; opacity: .65; }
.field input:not([type="range"]), .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 12px 16px; font: inherit; font-weight: 500; font-size: 16px; color: var(--ink);
  background: var(--paper); border: 2px solid var(--ink); border-radius: 16px; transition: box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus, .field textarea:focus, .field select:focus { outline: none; box-shadow: 0 0 0 4px var(--candy); }
.field input[aria-invalid="true"] { box-shadow: 0 0 0 4px rgba(232, 38, 47, .35); }
.field small { font-weight: 600; opacity: .8; }
.field output { font-family: var(--display); font-weight: 400; font-size: 20px; margin-left: 6px; color: var(--cobalt); }
.field--inline { margin-top: 12px; }
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 14px; border-radius: 999px; border: 2px solid var(--ink); background: linear-gradient(90deg, var(--butter) var(--fill, 10%), var(--paper) var(--fill, 10%)); margin: 12px 0 4px; }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); box-shadow: 0 3px 0 var(--ink); }
input[type="range"]::-moz-range-thumb { width: 28px; height: 28px; border-radius: 50%; background: var(--red); border: 2px solid var(--ink); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 760px) { .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 640px) { .grid-2 { grid-template-columns: 1fr; } }

.event-form {
  max-width: 900px; margin: 0 auto; background: var(--cream); border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: clamp(22px, 4vw, 48px); box-shadow: 0 8px 0 var(--ink); display: grid; gap: 22px; position: relative;
}
.event-form h3 { font-family: var(--display); font-size: clamp(30px, 3.6vw, 44px); line-height: 1; }
.event-form fieldset { border: 0; padding: 0; margin: 0; }
.event-form legend { font-weight: 800; font-size: 15px; margin-bottom: 10px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch {
  width: 34px; height: 34px; border-radius: 50%; border: 2px solid var(--ink); cursor: pointer; padding: 0;
  background: var(--c); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); transition: transform .15s;
}
.swatch:hover { transform: scale(1.12); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--paper), 0 0 0 5px var(--ink); }
.event-form .swatch { width: 40px; height: 40px; }
.form-error { margin: 0; color: var(--red); font-weight: 800; }
.form-done[hidden] { display: none; }
.form-done { display: flex; align-items: center; gap: 18px; background: var(--mint); border: 2px solid var(--ink); border-radius: 22px; padding: 16px 20px; }
.form-done p { margin: 0; }

/* mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 45; background: var(--cobalt); color: var(--candy);
  padding: calc(var(--header-h) + 60px) var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between;
  clip-path: circle(0 at calc(100% - 50px) 70px);
}
.menu[hidden] { display: none; }
.menu nav { display: grid; gap: 6px; }
.menu nav a { font-family: var(--display); font-size: clamp(34px, 9vw, 54px); line-height: 1.1; text-decoration: none; }
.menu__art { width: 120px; align-self: flex-end; transform: rotate(8deg); }
.menu-open .header { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.menu-open .header__logo path { fill: var(--candy); }
.menu-open { overflow: hidden; }

/* drawer */
.drawer-scrim { position: fixed; inset: 0; z-index: 80; background: rgba(30, 22, 56, .45); opacity: 0; visibility: hidden; transition: opacity .3s, visibility 0s .3s; }
.drawer-scrim.is-open { opacity: 1; visibility: visible; transition: opacity .3s; }
.bag-open, .bag-open body { overflow: hidden; }
.drawer {
  position: fixed; top: 0; right: 0; z-index: 90; height: 100dvh; width: min(460px, 100vw);
  background: var(--cream); border-left: 2px solid var(--ink); display: flex; flex-direction: column;
  transform: translateX(105%); visibility: hidden;
  transition: transform .45s cubic-bezier(.5, 0, .75, 0), visibility 0s .45s;
}
.drawer.is-open { transform: none; visibility: visible; transition: transform .6s cubic-bezier(.2, 1.25, .4, 1); }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px; border-bottom: 2px solid var(--ink); }
.drawer__head h3 { font-family: var(--display); font-size: 30px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.drawer__foot { border-top: 2px solid var(--ink); padding: 18px 22px 22px; display: grid; gap: 12px; background: var(--paper); }
.drawer__foot:empty { display: none; }
.icon-btn { width: 46px; height: 46px; border-radius: 50%; border: 2px solid var(--ink); background: var(--paper); font-size: 26px; line-height: 1; cursor: pointer; display: grid; place-items: center; box-shadow: var(--pop); }
.line { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 2px dashed rgba(30, 22, 56, .2); }
.line__img { width: 72px; height: 72px; border-radius: 50%; border: 2px solid var(--ink); display: grid; place-items: center; overflow: hidden; }
.line__img img { width: 70%; height: 70%; object-fit: contain; }
.mini-gift { width: 56%; aspect-ratio: 1; border: 2px solid var(--ink); border-radius: 6px; background: linear-gradient(90deg, transparent 40%, var(--red) 40% 60%, transparent 60%), var(--butter); }
.line__name { font-weight: 800; line-height: 1.2; }
.line__meta { font-size: 13px; opacity: .7; }
.line__price { font-family: var(--display); font-size: 20px; text-align: right; }
.qty { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; border: 2px solid var(--ink); border-radius: 999px; padding: 2px; background: var(--paper); }
.qty button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--candy); font-weight: 800; cursor: pointer; }
.qty span { min-width: 24px; text-align: center; font-weight: 800; }
.line__remove { background: none; border: 0; padding: 0; margin-top: 6px; font-size: 13px; text-decoration: underline; cursor: pointer; opacity: .7; display: block; margin-left: auto; }
.empty { text-align: center; padding: 40px 10px; }
.empty__art { width: 120px; margin: 0 auto 18px; transform: rotate(-6deg); }
.free-bar { font-size: 14px; font-weight: 700; }
.free-bar__track { height: 12px; border-radius: 999px; border: 2px solid var(--ink); background: var(--cream); margin-top: 6px; overflow: hidden; }
.free-bar__fill { height: 100%; background: var(--mint); border-right: 2px solid var(--ink); transition: width .5s; }
.sum { display: flex; justify-content: space-between; font-size: 15px; }
.sum--total { font-family: var(--display); font-size: 24px; }
.drawer .field select { min-height: 44px; padding: 8px 12px; border-radius: 12px; }
.checkout { display: grid; gap: 14px; }
.checkout .field input, .checkout .field textarea { min-height: 46px; border-radius: 12px; }
.back-link { background: none; border: 0; padding: 0; font-weight: 800; text-decoration: underline; cursor: pointer; justify-self: start; }
.note { font-size: 13px; opacity: .75; margin: 0; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 95; background: rgba(30, 22, 56, .72); display: grid; place-items: center; padding: 20px; }
.lightbox[hidden] { display: none; }
.lightbox__close { position: absolute; top: 18px; right: 18px; }
.lightbox__card { width: min(420px, 100%, 50vh); background: var(--paper); border: 2px solid var(--ink); border-radius: 22px; padding: 18px; box-shadow: 0 10px 0 var(--ink); }
.lightbox__card h3 { font-family: var(--display); font-size: 32px; margin-top: 14px; }
.lightbox__card p { font-family: var(--hand); font-size: 26px; margin: 0 0 14px; }
.lightbox__card .btn { width: 100%; }

/* mascot */
.mascot { position: fixed; right: clamp(10px, 3vw, 36px); bottom: 0; z-index: 70; width: clamp(92px, 9vw, 128px); pointer-events: none; }
.mascot__body { display: block; width: 100%; background: none; border: 0; padding: 0; cursor: pointer; pointer-events: auto; transform: translateY(120%); visibility: hidden; }
.mascot__body img { filter: drop-shadow(0 -4px 10px rgba(30, 22, 56, .2)); }
.mascot__bubble {
  position: absolute; right: 70%; bottom: 62%; width: min(300px, 72vw); pointer-events: auto;
  background: var(--paper); border: 2px solid var(--ink); border-radius: 22px 22px 6px 22px; padding: 16px 18px; box-shadow: var(--pop);
  transform-origin: 100% 100%;
}
.mascot__bubble[hidden] { display: none; }
.mascot__bubble p { margin: 0; font-weight: 700; font-size: 16px; line-height: 1.35; padding-right: 18px; }
.mascot__close { position: absolute; top: 6px; right: 8px; width: 28px; height: 28px; border: 0; background: none; font-size: 22px; line-height: 1; cursor: pointer; opacity: .6; }
.mascot__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mascot__actions:empty { display: none; }
.mascot__actions .btn { min-height: 38px; padding: 0 14px; font-size: 14px; box-shadow: 0 3px 0 var(--ink); }
.fly { position: fixed; z-index: 120; width: 70px; pointer-events: none; }
.fly img { width: 100%; height: auto; }
.menu-open .mascot, .bag-open .mascot { opacity: 0; visibility: hidden; }
@media (max-width: 640px) {
  .mascot { width: 74px; right: 6px; }
  .mascot__bubble { right: 62%; bottom: 56%; width: min(236px, 66vw); padding: 12px 14px; }
  .mascot__bubble p { font-size: 14px; }
  .mascot__actions { margin-top: 8px; gap: 6px; }
  .mascot__actions .btn { min-height: 34px; padding: 0 12px; font-size: 13px; }
}

/* email code step */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hp input { font-size: 16px; }
.form-note { margin: 0; font-size: 14px; font-weight: 600; opacity: .75; }
.code-dialog { border: 0; padding: 0; background: transparent; max-width: min(440px, calc(100vw - 32px)); width: 100%; overflow: visible; }
.code-dialog::backdrop { background: rgba(30, 22, 56, .55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.code-card {
  position: relative; display: grid; gap: 14px; text-align: center; color: var(--ink);
  background: var(--cream); border: 2px solid var(--ink); border-radius: var(--radius-lg);
  padding: 56px clamp(20px, 5vw, 34px) 24px; box-shadow: 0 8px 0 var(--ink);
}
.code-card h3 { font-family: var(--display); font-size: 32px; line-height: 1; }
.code-card p { margin: 0; }
.code-card__art { position: absolute; left: 50%; top: -52px; width: 96px; transform: translateX(-50%) rotate(-8deg); filter: drop-shadow(0 10px 8px rgba(30, 22, 56, .3)); }
.code-card__close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; font-size: 22px; }
.code-input {
  width: 100%; max-width: 280px; margin: 0 auto; display: block; text-align: center;
  font-family: var(--display); font-size: 40px; letter-spacing: .3em; padding: 10px 0 10px .3em;
  border: 2px solid var(--ink); border-radius: 18px; background: var(--paper); color: var(--ink);
}
.code-input:focus { outline: none; box-shadow: 0 0 0 4px var(--candy); }
.code-card__status { font-weight: 800; color: var(--cobalt); }
.code-card__dev { font-size: 13px; font-weight: 700; background: var(--butter); border-radius: 999px; padding: 4px 10px; justify-self: center; }
.code-card__more { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 10px; font-size: 14px; opacity: .85; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 800; color: var(--cobalt); text-decoration: underline; cursor: pointer; }
.link-btn:disabled { color: inherit; opacity: .6; text-decoration: none; cursor: default; }
.has-cursor .code-dialog, .has-cursor .code-dialog * { cursor: auto; }
.has-cursor .code-dialog button:not(:disabled) { cursor: pointer; }
.code-card__spam { font-size: 14px; font-weight: 600; background: var(--butter); border: 2px solid var(--ink); border-radius: 14px; padding: 8px 12px; }
.date-hint.is-bad { color: var(--red); opacity: 1; }
.field input[type="date"] { -webkit-appearance: none; appearance: none; display: block; text-align: left; min-width: 0; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
