{% if not user_has_sig %}
{# Sprint 4b sign-gate. The draw UX is gated behind a saved #}
{# significator — render a Look!-formatted Brief-style line w. #}
{# FYI (→ /billboard/my-sign/) + NVM (→ /gameboard/) until the #}
{# user picks a sign. Inline (not portaled like .note-banner) #}
{# because the gate IS the page content, not a transient nudge. #}
{% else %}
{% if not show_picker %}
{# Sprint 5 iter 1 — DRAW SEA landing UX. DRY table hex from #}
{# the room shell (.room-shell > .room-table > … > .table-hex) #}
{# w. 6 chair seats labeled 1C-6C as placeholders for the #}
{# friend-invite feature per the My Sea roadmap architectural #}
{# anchor "Six chairs retained even in solo". #}
{# #}
{# Iter 6b — landing primary-btn state machine, 3-way: #}
{# • FREE DRAW (`#id_draw_sea_btn`) when no active quota row #}
{# (fresh user OR >24h since last draw); #}
{# • PAID DRAW (`#id_my_sea_paid_draw_btn`) when the user has #}
{# deposited a token via the gatekeeper but hasn't yet #}
{# committed it; one-click POST commits + redirects to #}
{# fresh-quota /gameboard/my-sea/. #}
{# • GATE VIEW (`#id_my_sea_gate_view_btn`) when the user's #}
{# quota row exists, the hand is empty, AND no deposit yet #}
{# (post-DEL state). Routes to the Sprint-6 gatekeeper. #}
{# Seat 1 (`data-slot="1"`) carries `.seated` + `.fa-circle- #}
{# check` when the user's hand is non-empty (server-rendered #}
{# so reloads preserve the state). Otherwise `.fa-ban`. Other #}
{# 5 seats are placeholders for the future friend-invite #}
{# feature — always banned in solo my-sea. #}
{% for n in "123456" %}
{# Chair-position labels (1C-6C). No roles in #}
{# my-sea (this is the solo draw flow); using #}
{# `.seat-position-label` instead of the room's #}
{# `.seat-role-label` to keep the no-role #}
{# semantics clean. `.position-status-icon` + #}
{# `.fa-ban` are unchanged — already role- #}
{# agnostic in _room.scss. #}
{{ n }}C
{% endfor %}
{% endif %}
{# Picker phase — per-spread flexible layout. Sig pins .sea- #}
{# pos-core; the 6 surrounding positions all render in DOM #}
{# so the SPREAD dropdown can swap `.my-sea-cross[data- #}
{# spread]` between the 4 three-card variants (each w. its #}
{# own 3-position subset + draw order) + the 2 six-card #}
{# Celtic Cross variants (all 6 surrounding positions). #}
{# Each empty slot carries a `.sea-pos-label` caption (re- #}
{# appropriated from the GRAVITY/LEVITY .sea-stack-name look) #}
{# that JS updates per spread. #}
{# #}
{# `id="id_sea_overlay"` aliases the picker to what SeaDeal #}
{# binds to (the gameroom uses the same ID on a different #}
{# page — no DOM collision since my-sea + gameroom never co- #}
{# exist in one DOM). FLIP click delegates to SeaDeal. #}
{# openStage(), which fills the slot AND opens the portaled #}
{# stage modal w. SPIN / FYI controls. #}
{# `.sea-pos-label` lives OUTSIDE the slot so SeaDeal._fillSlot's #}
{# `slot.innerHTML = …` (which writes the drawn card's corner- #}
{# rank + suit-icon) doesn't clobber it. Labels persist as #}
{# adjacent siblings + are positioned via absolute SCSS to #}
{# touch the slot's nearest edge. #}
Outcome
{% include "apps/gameboard/_partials/_my_sea_slot.html" with position="crown" saved=saved_by_position.crown crossing=False %}
{% include "apps/gameboard/_partials/_my_sea_slot.html" with position="leave" saved=saved_by_position.leave crossing=False %}
{{ significator.corner_rank }}
{% if significator.suit_icon %}{% endif %}
Action
{% include "apps/gameboard/_partials/_my_sea_slot.html" with position="cover" saved=saved_by_position.cover crossing=False %}
{% include "apps/gameboard/_partials/_my_sea_slot.html" with position="cross" saved=saved_by_position.cross crossing=True %}
{% include "apps/gameboard/_partials/_my_sea_slot.html" with position="loom" saved=saved_by_position.loom crossing=False %}
Situation
{% include "apps/gameboard/_partials/_my_sea_slot.html" with position="lay" saved=saved_by_position.lay crossing=False %}
{# Form col — SPREAD combobox + DECKS swatches + LOCK #}
{# HAND / DEL. DRY w. gameroom `_sea_overlay.html`'s #}
{# `.sea-form-col` shape; my-sea-specific differences: #}
{# (a) 6 spread options under 2 section dividers, #}
{# (b) default = situation-action-outcome (3-card), #}
{# (c) no `.sea-modal-header` (the gateway IS the page). #}
{{ reversals_pct|default:25 }}% reversals
{# autocomplete="off" opts the hidden input out of #}
{# Firefox's form-history autofill, which otherwise #}
{# restores the LAST value on soft reload (F5). #}
{# Without this, combobox.js's `select(i)` short- #}
{# circuits its change-event dispatch when the #}
{# user re-picks the value Firefox already restored #}
{# → my-sea's sync() never fires → data-spread on #}
{# .my-sea-cross stays stuck on SAO default. #}
{# Iter 4c — LOCK HAND replaced by AUTO DRAW (mid-draw) #}
{# / GATE VIEW (hand complete). Same button slot; JS #}
{# transitions label + behavior + `data-state` when #}
{# the final card lands. AUTO DRAW opens a guard portal #}
{# ("Auto deal cards?") + POSTs the remaining hand in #}
{# one shot so a navigate-away mid-animation still #}
{# persists. GATE VIEW navigates to the Sprint-6 gate- #}
{# keeper (currently a 404 stub). #}
{# DEL starts `.btn-disabled` until the hand is #}
{# complete — per Sprint-5-iter-4c spec, the 1/day #}
{# quota is committed at first-card-draw + can't be #}
{# refunded by an early DEL. #}
{# Sea stage — portaled modal that opens on FLIP click via #}
{# SeaDeal.openStage. `position:fixed; inset:0` covers the #}
{# viewport; click backdrop to dismiss + reveal the slot #}
{# thumbnail. #}
{% include "apps/gameboard/_partials/_sea_stage.html" %}
{# Iter 4b — DEL guard reuses the shared `#id_guard_portal` #}
{# from base.html (the same one the room's gear-menu DEL btn #}
{# uses). Gaussian-glass tooltip positioned above the DEL btn,#}
{# no backdrop. The picker IIFE below invokes it via #}
{# `window.showGuard(delBtn, "Are you sure?", confirmFn, null,#}
{# {yesLabel: "DEL"})` when DEL is clicked post-lock. #}
{# Sprint 5 iter 4a — shuffled deck (levity + gravity halves, #}
{# sig excluded) embedded as JSON; JS reads on init and #}
{# pops from the relevant pile on each deposit. #}
{{ sea_deck_data|json_script:"id_my_sea_deck" }}
{# StageCard + SeaDeal — both bind to `#id_sea_overlay` (the #}
{# my-sea-picker) + `#id_sea_stage` (the stage partial) on #}
{# DOMContentLoaded; openStage() runs on FLIP click below. #}
{# Brief 'Default deck warning' banner — lifted verbatim from #}
{# /billboard/my-sign/'s no-equipped-deck path. Same copy, #}
{# same FYI (→ /gameboard/) + NVM (dismiss + proceed) actions.#}
{# Tagged w. .my-sea-intro-banner so FTs disambiguate from #}
{# any other Briefs on the page. #}
{% if active_draw %}
{# Iter 4b — saved-draw Brief. Standard portaled banner via #}
{# Brief.showBanner (Gaussian-glass bg, atop-h2 positioning); #}
{# the on-LOCK-success path inside the picker IIFE calls the #}
{# same `window._showFreeDrawLockedBrief` so a freshly-locked #}
{# hand gets the identical UX without a page reload. Pass an #}
{# ISO timestamp (`|date:'c'`) so note.js's `