/* Social events: the 📅 Events app (ui/events-ui.js) and, at an event, its bar, the note picker, the stage card (the vows,
   the questions, the scores) and the photo flash (ui/event-live.js). Phone first: everything over the top of the screen,
   the joystick (bottom left) and the action buttons (bottom right) stay free. */
.ev { font-family: var(--ui); }
.ev button { font-family: var(--ui); cursor: pointer; }
.ev-tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.ev-tabs button { flex: 1; border: 0; border-radius: 12px; padding: 9px 6px; font: 800 12.5px var(--ui); background: #ececef; color: #3a3d42; }
.ev-tabs button.on { background: #6b2147; color: #fff; }
.ev-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 6px; }
.ev-types button { border: 0; border-radius: 14px; padding: 9px 2px 7px; background: #fff; font-size: 22px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ev-types button span { display: block; font: 800 10.5px var(--ui); color: #3a3d42; margin-top: 3px; }
.ev-types button.on { background: #6b2147; box-shadow: 0 4px 12px rgba(107,33,71,.35); } .ev-types button.on span { color: #fff; }
.ev-l { display: block; font: 800 12px var(--ui); color: #3a3d42; margin: 10px 0 5px; }
.ev-l input, .ev-l select, .ev-l textarea, .ev-inv input { display: block; width: 100%; box-sizing: border-box; margin-top: 5px; border: 1.5px solid #dcdde1; border-radius: 12px; padding: 10px 12px; font: 700 15px var(--ui); background: #fff; color: var(--ink); }
.ev-l textarea { resize: vertical; min-height: 44px; }
.ev-two { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
.ev-sw { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.ev-sw button { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px #c9cbd0; padding: 0; }
.ev-sw button.on { box-shadow: 0 0 0 3px #6b2147; }
.ev-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.ev-chip { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid #dcdde1; border-radius: 999px; padding: 7px 11px; font: 700 12px var(--ui); background: #fff; color: #3a3d42; font-style: normal; min-height: 34px; box-sizing: border-box; }
.ev-chip.on { border-color: #6b2147; background: #fbeaf2; color: #6b2147; }
.ev-chips.ro .ev-chip { min-height: 0; padding: 5px 9px; font-size: 11px; }
.ev-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; font-style: normal; }
.ev-note { font: 600 12px/1.45 var(--ui); color: var(--muted); margin: 6px 2px 8px; }
.ev-warn { font: 700 12px/1.45 var(--ui); color: #92400e; background: #fef3c7; border-radius: 12px; padding: 9px 11px; margin: 6px 0 8px; }
.ev-h { font: 900 13px var(--ui); color: #17181b; margin: 16px 2px 8px; }
.ev-cost { background: #fff; border-radius: 16px; padding: 10px 12px; margin: 12px 0 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ev-line { display: flex; justify-content: space-between; gap: 10px; font: 600 12.5px/1.35 var(--ui); padding: 5px 0; border-bottom: 1px solid #f0f0f2; }
.ev-line b { white-space: nowrap; } .ev-line.tot { border: 0; font: 900 14.5px var(--ui); padding-top: 8px; }
.ev-big { display: block; width: 100%; border: 0; border-radius: 14px; padding: 13px; font: 900 15px var(--ui); background: linear-gradient(135deg, #9d2a63, #6b2147); color: #fff; box-shadow: 0 6px 16px rgba(107,33,71,.35); margin: 8px 0; }
.ev-big.alt { background: #17181b; box-shadow: none; } .ev-big:disabled { opacity: .5; box-shadow: none; }
.ev-card { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: #fff; border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.07); color: var(--ink); }
.ev-card > i { font-style: normal; font-size: 20px; color: #b0b2b8; }
.ev-ic { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: #f4eef1; }
.t-wedding { background: linear-gradient(135deg, #fdf2f8, #fce7f3); } .t-birthday { background: linear-gradient(135deg, #fff7ed, #ffedd5); }
.t-owambe { background: linear-gradient(135deg, #ecfdf5, #fef9c3); } .t-gamenight { background: linear-gradient(135deg, #eef2ff, #e0e7ff); }
.ev-nm { flex: 1; min-width: 0; } .ev-nm strong { display: block; font: 800 14px var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-nm em { display: block; font: 600 11.5px var(--ui); color: var(--muted); font-style: normal; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-st { font-style: normal; font-weight: 800; color: #3a3d42; } .ev-st.live { color: #15803d; } .ev-st.bad { color: #b91c1c; }
.ev-hero { border-radius: 20px; padding: 15px; margin: 4px 0 10px; color: #3b0a24; box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.ev-hero b { display: block; font: 900 21px var(--ui); letter-spacing: -.3px; margin: 4px 0; } .ev-hero span { display: block; font: 700 12.5px/1.5 var(--ui); }
.ev-back { border: 0; background: none; font: 800 13px var(--ui); color: #6b2147; padding: 4px 0 8px; }
.ev-btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; } .ev-btns.end { justify-content: center; margin-top: 18px; }
.ev-btn { border: 0; border-radius: 12px; padding: 9px 12px; font: 800 12.5px var(--ui); background: #ececef; color: #17181b; min-height: 40px; }
.ev-btn.go { background: #6b2147; color: #fff; } .ev-btn.on { background: #dcfce7; color: #15803d; } .ev-btn.bad { background: #fee2e2; color: #b91c1c; } .ev-btn.sm { min-height: 32px; padding: 6px 10px; }
.ev-btn:disabled { opacity: .45; }
.ev-inv { display: flex; gap: 6px; align-items: center; margin: 8px 0; } .ev-inv input { margin-top: 0; flex: 1; }
.ev-row { display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 12px; padding: 7px 10px; margin-bottom: 6px; }
.ev-log { font: 600 12px/1.4 var(--ui); padding: 7px 4px; border-bottom: 1px solid #ececef; } .ev-log i { color: #b91c1c; }
.ev-empty { text-align: center; background: #fff; border-radius: 18px; padding: 18px 14px; margin: 6px 0 12px; }
.ev-empty b { display: block; font: 900 15px var(--ui); } .ev-empty span { display: block; font: 600 12px/1.45 var(--ui); color: var(--muted); margin: 5px 0 10px; }
.ev-ring { background: linear-gradient(135deg, #fdf2f8, #fef9c3); border-radius: 18px; padding: 13px 14px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(157,42,99,.15); }
.ev-ring b { display: block; font: 900 16px var(--ui); color: #6b2147; } .ev-ring span { display: block; font: 600 12px var(--ui); color: #6b4a58; margin-top: 3px; }

/* ----- at the event ----- */
#evBar { display: none; position: fixed; top: calc(env(safe-area-inset-top, 0px) + 112px); left: 8px; right: 8px; max-width: 520px; margin: 0 auto; z-index: 5; background: rgba(23,24,27,.86); color: #fff; border-radius: 18px; padding: 7px 8px 8px; box-shadow: 0 6px 20px rgba(0,0,0,.3); font-family: var(--ui); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
#evBar.on { display: block; }
.evb-t { font: 700 11.5px var(--ui); opacity: .9; padding: 0 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evb-r { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .evb-r::-webkit-scrollbar { display: none; }
.evb-r button { flex: none; border: 0; border-radius: 14px; min-width: 54px; height: 50px; padding: 4px 6px; background: rgba(255,255,255,.12); color: #fff; font-size: 19px; line-height: 1; cursor: pointer; }
.evb-r button span { display: block; font: 800 9.5px var(--ui); margin-top: 3px; opacity: .92; }
.evb-r button.on { background: #22c55e; } .evb-r button.hot { background: linear-gradient(135deg, #9d2a63, #db2777); }
#evNotes { display: none; position: fixed; top: calc(env(safe-area-inset-top, 0px) + 196px); left: 8px; right: 8px; max-width: 520px; margin: 0 auto; z-index: 5; gap: 6px; flex-wrap: wrap; justify-content: center; background: rgba(255,255,255,.96); border-radius: 16px; padding: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
#evNotes.on { display: flex; }
#evNotes button { border: 0; border-radius: 10px; padding: 9px 10px; min-height: 40px; font: 900 12.5px var(--ui); background: #ecfdf5; color: #14532d; cursor: pointer; touch-action: none; }
#evNotes button.on { background: #15803d; color: #fff; } #evNotes button.go { background: linear-gradient(135deg, #16a34a, #15803d); color: #fff; padding: 9px 16px; user-select: none; -webkit-user-select: none; }
#evStage { display: none; position: fixed; left: 10px; right: 10px; top: calc(env(safe-area-inset-top, 0px) + 200px); max-width: 460px; margin: 0 auto; z-index: 7; }
#evStage.on { display: block; animation: evIn .28s ease-out; }
.evs { position: relative; background: #fff; color: var(--ink); border-radius: 20px; padding: 16px 14px 12px; box-shadow: 0 12px 34px rgba(0,0,0,.32); font-family: var(--ui); text-align: center; }
.evs > b { display: block; font: 900 18px var(--ui); color: #6b2147; } .evs > span { display: block; font: 600 13px/1.5 var(--ui); color: #3a3d42; margin-top: 7px; }
.evs .evq { font: 800 15.5px/1.4 var(--ui); color: #17181b; }
.evs-x { position: absolute; top: 6px; right: 6px; border: 0; background: #f2f2f4; width: 30px; height: 30px; border-radius: 50%; font-size: 13px; cursor: pointer; }
.evt { display: block; height: 5px; background: #f0f0f2; border-radius: 3px; overflow: hidden; margin: 10px 0 4px; } .evt u { display: block; height: 100%; background: #9d2a63; animation: evTime linear forwards; }
.eva { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.eva button { border: 0; border-radius: 12px; padding: 11px 8px; min-height: 48px; font: 800 13px/1.25 var(--ui); background: #f4eef1; color: #3b0a24; text-align: left; cursor: pointer; }
.eva button.picked { background: #6b2147; color: #fff; } .eva button.right { background: #16a34a; color: #fff; } .eva button.wrong { background: #dc2626; color: #fff; }
.eva button:disabled { opacity: 1; }
.ev-flash { position: fixed; inset: 0; z-index: 20; background: #fff; pointer-events: none; animation: evFlash .7s ease-out forwards; }
@keyframes evTime { from { width: 100%; } to { width: 0; } }
@keyframes evIn { from { transform: translateY(-10px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes evFlash { from { opacity: .95; } to { opacity: 0; } }
@media (max-width: 600px) { body:not(.indoors) #evBar { right: 112px; } } /* (outdoors the minimap sits top right: the bar stops before it and scrolls) */
@media (min-width: 900px) { #evBar, #evNotes { top: 86px; } #evNotes { top: 168px; } }
/* folded (the bar's ▴ Hide): a small chip under the place label, tap it to open the bar again (a player, 30 Nov 2026: "ui pb
   pls its blocking view" - the bar sat over the middle of a phone held sideways) */
body #evBar.mini { left: 8px; right: auto; width: max-content; max-width: calc(100vw - 128px); margin: 0; transform: none; padding: 4px; border-radius: 14px; } /* (left: the minimap is top right) */
#evBar.mini .evb-r button { min-width: 0; height: 34px; padding: 3px 10px; font-size: 15px; display: flex; align-items: center; gap: 5px; }
body #evBar.mini .evb-r button span { display: inline; margin: 0; font-size: 11px; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#evBar.mini .evb-r button { max-width: 100%; }
.evb-r button.evb-hide { background: rgba(255,255,255,.06); font-size: 15px; }
/* a phone held sideways: one slim row of icons under the place label, no title line, the spray notes under it */
@media (orientation: landscape) and (max-height: 520px) {
  #evBar { top: calc(env(safe-area-inset-top, 0px) + 50px); left: 50%; right: auto; width: max-content; max-width: 46vw; margin: 0; transform: translateX(-50%); padding: 4px; border-radius: 14px; }
  #evBar .evb-t { display: none; }
  body #evBar.mini { left: 50%; transform: translateX(-50%); max-width: 46vw; }
  .evb-r { gap: 4px; }
  .evb-r button { min-width: 40px; height: 38px; padding: 2px 6px; font-size: 17px; border-radius: 11px; }
  .evb-r button span { display: none; }
  #evNotes { top: calc(env(safe-area-inset-top, 0px) + 96px); left: 50%; right: auto; width: max-content; max-width: 62vw; margin: 0; transform: translateX(-50%); padding: 5px; gap: 4px; }
  #evNotes button { min-height: 32px; padding: 6px 8px; font-size: 11.5px; }
}
