/* Mobile interaction and consistent event/form flow. */
#registration-form input:not([type=checkbox]):focus,#registration-form input:not([type=checkbox]):focus-visible{outline:none;outline-offset:0;box-shadow:0 0 0 1px #d7b66a33;border-color:#c3a365}
@media(max-width:700px){
 header .main-nav a{min-height:44px;font-size:12px;display:flex;align-items:center;justify-content:center}
 #events .event,#events .event-opening:has(.registration-inline:not([hidden])){grid-template-rows:auto auto auto;row-gap:12px}
 #events .event .day{grid-row:1;align-self:start}
 #events .event .event-title{grid-row:1;grid-column:2;min-width:0}
 #events .event .event-actions{grid-column:1/-1;grid-row:2;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;width:100%;justify-self:stretch;align-items:center}
 #events .event .event-actions .magnetic-wrap{width:100%;min-width:0;grid-row:auto;grid-column:auto;justify-self:stretch}
 #events .event .event-actions .event-open{width:100%;min-width:0;min-height:44px;height:44px;font-size:11px;padding:0 6px}
 #events .event .event-actions .event-open::before{inset:0;background-size:100% 100%}
 #events .registration-inline{grid-column:1/-1;grid-row:3;margin-top:2px;padding-top:16px;min-width:0}
 #events .registration-inline #registration-form{display:flex;flex-direction:column;gap:12px}
 #events .registration-inline #registration-form>label{width:100%;font-size:12px}
 #events .registration-inline #registration-form input:not([type=checkbox]){font-size:16px;min-height:44px;padding:10px 12px}
 #events .registration-inline #registration-form .registration-consent{font-size:11px;line-height:1.5;align-items:flex-start;padding:4px 0;min-height:44px}
 #events .registration-inline #registration-form input[type=checkbox]{width:20px;height:20px;margin:0 8px 0 0}
 #events .registration-inline #registration-form>.magnetic-wrap{display:block;width:100%;margin:0;align-self:stretch}
 #events .registration-inline #registration-form .gold-button{width:100%;min-height:48px;font-size:12px;padding:13px 16px;white-space:normal}
 dialog[aria-labelledby="dialog-title"]{box-sizing:border-box;width:calc(100vw - 24px);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:46px 22px 24px;margin:auto}
 #dialog-title{font-size:24px;line-height:1.25;overflow-wrap:anywhere}#dialog-description{font-size:14px;line-height:1.7}
 dialog[aria-labelledby="dialog-title"] .close{min-width:44px;min-height:44px;top:8px;right:8px}
 dialog[aria-labelledby="dialog-title"] .close-dialog{min-height:48px}
}
@media(max-width:360px){header .main-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px;width:100%}header .main-nav a{min-width:0;padding-inline:3px}}

dialog[aria-labelledby="dialog-title"] .close {
  appearance:none; width:44px; height:44px; margin:0; padding:0; border:0;
  border-radius:6px; background:transparent; color:#eed197; font-size:0;
}
dialog .close::before, dialog .close::after {
  content:""; position:absolute; left:50%; top:50%; width:18px; height:2px;
  border-radius:1px; background:currentColor; transform:translate(-50%,-50%) rotate(45deg);
}
dialog .close::after { transform:translate(-50%,-50%) rotate(-45deg); }
@media(max-width:700px){
  #events article .superwave-art,#events article .tournament-art {height:185px;}
  #events article .ambient-art {height:185px;}
}
dialog[aria-labelledby="dialog-title"] .close:focus-visible { outline:1px solid #c4a668; outline-offset:-6px; }

#hand {width:min(100%,420px);padding:6px 0 12px}
#hand[hidden],#registration-panel #registration-form[hidden]{display:none}
#hand h3{margin:6px 0 14px}
#hand-cards,#hand-answers{display:flex;gap:7px}
.hand-card{display:grid;flex:1;min-width:0;aspect-ratio:.78;border-radius:6px;background:linear-gradient(140deg,#fff9eb,#decdb2);color:#221d17;font:bold clamp(21px,4vw,29px) Georgia;padding:5px 8px;line-height:1}
.hand-card b{text-align:center}.hand-card.red{color:#a2313a}
#hand button{min-height:44px;color:#f5deb2;font:inherit;cursor:pointer}
#hand-answers button{flex:1;margin-top:14px;border-radius:8px;border:1px solid #806b49;background:#292219}
#hand-hint,#hand-back{padding:3px 8px;border:0;background:transparent;text-decoration:underline;text-underline-offset:4px}
#hand-tip{color:#f2d59e}

/* Indent linked evening events while keeping enough space for both actions. */
@media (max-width: 700px) {
  #events .event-linked { margin-inline-start: clamp(28px, 11%, 56px); }
  #events .event-linked article.event {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 6px 10px;
    padding: 10px;
  }
  #events .event-linked .event-actions { gap: 6px; }
}

.return-chip {
  position:fixed; left:max(12px,env(safe-area-inset-left)); bottom:calc(18px + env(safe-area-inset-bottom));
  width:46px; height:46px; padding:0; border:0; border-radius:50%; cursor:pointer;
  display:grid; place-items:center; isolation:isolate; z-index:8;
  background:#292119; color:#f5d58b; box-shadow:0 2px 4px #0009;
}
.return-chip[hidden]{display:none}
.return-chip::before,.return-chip::after{content:"";position:absolute;border-radius:50%;pointer-events:none}
.return-chip::before{inset:0;z-index:-2;background:repeating-conic-gradient(from 5deg,#e5c481 0 14deg,#322c22 14deg 45deg);animation:return-chip-turn 20s linear infinite}
.return-chip::after{inset:5px;z-index:-1;border:1px solid #aa864a;background:radial-gradient(circle at 35% 25%,#493927,#1c1713 75%)}
@keyframes return-chip-turn{to{transform:rotate(1turn)}}
@media(prefers-reduced-motion:reduce){.return-chip::before{animation:none}}
