/* ============================================================
   Seat Organiser — Renmory Watercolor Wedding Aesthetic
   Tokens come from /css/landing.css. No shadows anywhere.
   ============================================================ */

.page-seat-organiser .container {
    max-width: 1520px;
    padding: 0 1.5rem;
}

.so-hero {
    min-height: auto;
    overflow: visible;
    padding: 6rem 0 0;
    text-align: center;
}

/* decor-4: hug the right edge with ~30% hanging off screen */
.page-seat-organiser .theme-decor.decor-4 {
    right: -35vw;
    top: -5vh;
}

.so-hero-inner {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}

.so-hero-headline {
    margin-bottom: 1.5rem;
}

.so-hero-subhead {
    margin-bottom: 0;
}

/* ---------- Dropzone ---------- */
.so-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 3rem 2rem;
    border: 2px dashed rgba(180, 130, 100, 0.35);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
    text-align: center;
}

.so-dropzone:hover,
.so-dropzone.is-dragover {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.55);
}

.so-dropzone.is-loading {
    pointer-events: none;
}

.so-dropzone-icon {
    font-size: 2.4rem;
    color: var(--color-primary);
    line-height: 1;
}

.so-dropzone-title {
    font-size: 1.2rem;
    color: var(--color-text-main);
}

.so-dropzone-hint {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.so-dropzone-status {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.so-dropzone-status.is-error {
    color: var(--color-primary-hover);
}

.so-upload-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 1rem;
}

.so-upload-help {
    border: 1px solid rgba(180, 130, 100, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    color: var(--color-text-main);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
    padding: 0.65rem 1rem;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.so-upload-help:hover {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(240, 98, 146, 0.55);
    color: var(--color-primary-hover);
}

/* ---------- Seating guide ---------- */
.so-guide {
    padding: 1.5rem 0 2rem;
    background: transparent;
}

.so-guide .container {
    max-width: 1180px;
}

.so-guide-head {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(280px, 1.1fr);
    gap: 2rem;
    align-items: end;
    margin-bottom: 2rem;
}

.so-guide-kicker {
    margin: 0 0 0.45rem;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.so-guide-title {
    margin: 0;
    font-family: 'Noto Serif TC', 'SatsukiGendaiMincho', serif;
    font-size: 2.5rem;
    font-weight: normal;
    line-height: 1.35;
}

.so-guide-lede {
    margin: 0;
    color: var(--color-text-main);
    font-size: 1.15rem;
    line-height: 1.9;
    border-top: 1px solid rgba(180, 130, 100, 0.2);
    border-bottom: 1px solid rgba(180, 130, 100, 0.2);
    padding: 1rem 0;
}

.so-guide-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.85fr) minmax(0, 1.35fr);
    gap: 2.5rem;
    align-items: start;
}

.so-guide-map {
    border-top: 1px solid rgba(180, 130, 100, 0.22);
    border-bottom: 1px solid rgba(180, 130, 100, 0.22);
    padding: 1rem 0;
}

.so-guide-map h3 {
    margin: 0 0 0.7rem;
    color: var(--color-text-main);
    font-family: 'Noto Serif TC', 'SatsukiGendaiMincho', serif;
    font-size: 1.25rem;
    font-weight: normal;
}

.so-guide-zone {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.9rem;
    padding: 0.8rem 0;
    border-top: 1px solid rgba(180, 130, 100, 0.14);
    color: var(--color-text-light);
    line-height: 1.7;
}

.so-guide-zone-label {
    color: var(--color-text-main);
    white-space: nowrap;
}

.so-guide-tips {
    border-top: 1px solid rgba(180, 130, 100, 0.22);
}

.so-guide-tip {
    border-bottom: 1px solid rgba(180, 130, 100, 0.18);
    padding: 0.2rem 0;
}

.so-guide-tip summary {
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: center;
    list-style: none;
    cursor: pointer;
    color: var(--color-text-main);
    font-size: 1.05rem;
    line-height: 1.5;
    padding: 0.85rem 0.25rem;
}

.so-guide-tip summary::-webkit-details-marker {
    display: none;
}

.so-guide-tip summary::after {
    content: '+';
    grid-column: 3;
    color: var(--color-primary);
    font-size: 1.25rem;
    line-height: 1;
}

.so-guide-tip[open] summary::after {
    content: '-';
}

.so-guide-tip-num {
    width: 1.7rem;
    height: 1.7rem;
    border: 1px solid rgba(240, 98, 146, 0.45);
    border-radius: 50%;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    line-height: 1;
}

.so-guide-tip p {
    margin: 0;
    padding: 0 0.25rem 1rem 2.95rem;
    color: var(--color-text-light);
    font-size: 0.98rem;
    line-height: 1.8;
}

.so-guide-summary {
    margin: 2rem 0 0;
    padding: 1rem 0 0;
    border-top: 1px solid rgba(180, 130, 100, 0.2);
    color: var(--color-text-main);
    font-size: 1.08rem;
    line-height: 1.9;
    text-align: center;
}

.so-guide-upload {
    max-width: 820px;
    margin: 2.5rem auto 0;
}

/* ---------- Workspace grid ---------- */
.so-workspace {
    padding-top: 2rem;
}

.so-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
    gap: 2.5rem;
    align-items: start;
}

.so-panel-left {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ---------- Summary panel ---------- */
#so-summary:empty {
    display: none;
}

.so-summary-title {
    font-size: 1.8rem;
    margin: 0 0 1rem;
    font-family: 'Noto Serif TC', 'SatsukiGendaiMincho', serif;
}

.so-summary-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border-top: 1px solid rgba(180, 130, 100, 0.2);
}

.so-summary-group {
    border-bottom: 1px solid rgba(180, 130, 100, 0.15);
}

.so-summary-group-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.7rem 0.4rem;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
    border-radius: 8px;
}

.so-summary-group-header:hover {
    background: rgba(255, 255, 255, 0.4);
}

.so-summary-chevron {
    font-size: 0.75rem;
    color: var(--color-text-light);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.so-summary-group.is-open .so-summary-chevron {
    transform: rotate(90deg);
}

.so-summary-group-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text-main);
    flex: 1;
}

.so-summary-group-count {
    font-size: 0.85rem;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.so-summary-group--unassigned .so-summary-group-name {
    color: var(--color-text-light);
    font-weight: 500;
    font-style: italic;
}

.so-summary-guests {
    display: none;
    grid-template-columns: 1fr 1fr;
    padding: 0.25rem 0 0.5rem 1.4rem;
    gap: 0.15rem 0.5rem;
}

.so-summary-group.is-open .so-summary-guests {
    display: grid;
}

.so-summary-guest {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    font-size: 0.95rem;
    color: var(--color-text-main);
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
}

.so-summary-guest:hover {
    background: rgba(240, 98, 146, 0.08);
}

.so-summary-remove {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    padding: 0.1rem 0.3rem;
    border-radius: 50%;
    opacity: 0;
    transition: color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.so-summary-guest:hover .so-summary-remove {
    opacity: 1;
}

.so-summary-remove:hover {
    color: var(--color-primary-hover);
    background: rgba(240, 98, 146, 0.1);
}

.so-summary-guest--unassigned:hover {
    background: rgba(240, 98, 146, 0.08);
    border-radius: 4px;
    color: var(--color-primary-hover);
}

.so-summary-cat-label {
    grid-column: 1 / -1;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 0.4rem 0.1rem;
    margin-top: 0.25rem;
    border-top: 1px solid rgba(180, 130, 100, 0.15);
}

.so-summary-cat-label:first-child {
    border-top: none;
    margin-top: 0;
}

.so-panel {
    background: transparent;
}

.so-panel-head {
    margin-bottom: 1rem;
}

.so-panel-title {
    font-size: 1.8rem;
    margin: 0 0 0.4rem;
    font-family: 'Noto Serif TC', 'SatsukiGendaiMincho', serif;
}

.so-panel-hint {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin: 0;
}

/* ---------- Spreadsheet ---------- */
.so-spreadsheet-wrap {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 480px;
    border-top: 1px solid rgba(180, 130, 100, 0.2);
}

.so-spreadsheet {
    width: 100%;
    border-collapse: collapse;
}

.so-spreadsheet thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    text-align: left;
    font-size: 0.95rem;
    color: var(--color-text-light);
    font-weight: normal;
    padding: 0.75rem 0.6rem;
    border-bottom: 1px solid rgba(180, 130, 100, 0.2);
    background: rgba(250, 245, 238, 0.95);
}

.so-spreadsheet tbody td {
    padding: 0.65rem 0.6rem;
    border-bottom: 1px solid rgba(180, 130, 100, 0.15);
    font-size: 1rem;
    color: var(--color-text-main);
    vertical-align: middle;
}

/* Side color-coding on rows */
.so-row--groom td {
    background: rgba(100, 149, 237, 0.07);
}

.so-row--bride td {
    background: rgba(240, 98, 146, 0.07);
}

.so-cell-editable {
    outline: none;
    border-radius: 6px;
    padding: 0.3rem 0.5rem;
    min-height: 1.6rem;
    cursor: text;
    transition: background 0.15s ease;
}

.so-cell-editable:hover {
    background: rgba(255, 255, 255, 0.4);
}

.so-cell-editable:focus {
    background: rgba(255, 255, 255, 0.7);
    outline: 1.5px solid rgba(240, 98, 146, 0.4);
}

.so-cell-editable.is-empty::before {
    content: attr(data-placeholder);
    color: var(--color-text-light);
    opacity: 0.55;
}

/* Side select dropdown */
.so-side-select {
    appearance: auto;
    border: 1px solid rgba(180, 130, 100, 0.3);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text-main);
    padding: 0.25rem 0.4rem;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.so-side-select:focus {
    outline: 1.5px solid rgba(240, 98, 146, 0.4);
    border-color: var(--color-primary);
}

.so-col-actions {
    width: 1%;
    white-space: nowrap;
}

.so-row-remove {
    background: transparent;
    border: none;
    color: var(--color-text-light);
    cursor: pointer;
    font-size: 1rem;
    padding: 0.3rem 0.5rem;
    border-radius: 50%;
    transition: color 0.15s ease, background 0.15s ease;
}

.so-row-remove:hover {
    color: var(--color-primary-hover);
    background: rgba(240, 98, 146, 0.1);
}

/* ---------- Config bar ---------- */
.so-config {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 1rem 1.2rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(180, 130, 100, 0.2);
    margin-bottom: 1.5rem;
}

.so-config-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.so-config-field input {
    width: 100px;
    padding: 0.5rem 0.7rem;
    border: 1px solid rgba(180, 130, 100, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 1rem;
    color: var(--color-text-main);
}

.so-config-field input:focus {
    outline: 1.5px solid rgba(240, 98, 146, 0.4);
    border-color: var(--color-primary);
}

.so-btn-reassign,
.so-btn-export {
    align-self: flex-end;
}

.btn.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid rgba(240, 98, 146, 0.5);
    border-radius: 50px;
    padding: 0.65rem 1.4rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn.btn-secondary:hover {
    background: rgba(240, 98, 146, 0.1);
}

/* ---------- Tables visual — scrollable canvas ---------- */
.so-tables {
    position: relative;
    width: 100%;
    min-height: 500px;
    overflow: auto;
    border: 1px solid rgba(180, 130, 100, 0.25);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.35);
    cursor: grab;
}

.so-tables:active {
    cursor: grabbing;
}

.so-tables-empty {
    position: static;
    padding: 3rem 1rem;
    text-align: center;
    color: var(--color-text-light);
    font-size: 1rem;
    border: 1px dashed rgba(180, 130, 100, 0.25);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.so-table-card {
    position: absolute;
    width: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
}

.so-table-circle {
    position: relative;
    width: var(--so-table-size);
    height: var(--so-table-size);
    margin: 0.5rem auto 0.5rem;
    cursor: grab;
    touch-action: none;
}

.so-table-card.is-dragging .so-table-circle {
    cursor: grabbing;
}

.so-table-card.is-selected .so-table-circle::after {
    content: '';
    position: absolute;
    inset: -6px;
    border: 2px solid rgba(240, 98, 146, 0.55);
    border-radius: 50%;
    pointer-events: none;
}


.so-table-disc {
    position: absolute;
    inset: 22%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(180, 130, 100, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.1rem;
    padding: 0.4rem;
    overflow: hidden;
}

.so-disc-num {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-main);
    line-height: 1.1;
    text-align: center;
}

.so-disc-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-light);
    line-height: 1.2;
    text-align: center;
    outline: none;
    border-radius: 4px;
    padding: 0.1rem 0.25rem;
    max-width: 90%;
    cursor: text;
    transition: background 0.15s ease;
    word-break: break-all;
}

.so-disc-name:hover {
    background: rgba(255, 255, 255, 0.5);
}

.so-disc-name:focus {
    background: rgba(255, 255, 255, 0.85);
    outline: 1px solid rgba(240, 98, 146, 0.35);
}

.so-disc-name.is-empty::before {
    content: attr(data-placeholder);
    color: var(--color-text-light);
    opacity: 0.45;
    font-style: italic;
}

.so-disc-meta {
    font-size: 0.7rem;
    color: var(--color-text-light);
    line-height: 1.1;
    text-align: center;
}

.so-seat {
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(180, 130, 100, 0.3);
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.so-seat.is-empty {
    opacity: 0.45;
    cursor: pointer;
}

.so-seat.is-empty:hover {
    opacity: 0.7;
    border-color: rgba(180, 130, 100, 0.5);
}

.so-seat-plus {
    font-size: 1.2rem;
    line-height: 1;
    color: rgba(180, 130, 100, 0.5);
    opacity: 0;
    transition: opacity 0.15s ease;
    pointer-events: none;
}

.so-seat.is-empty:hover .so-seat-plus {
    opacity: 1;
}

.so-seat-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(180, 130, 100, 0.85);
    border: none;
    color: #fff;
    font-size: 0.7rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s ease;
    padding: 0;
    z-index: 2;
}

.so-seat.is-filled:hover .so-seat-remove {
    opacity: 1;
}

.so-seat-remove:hover {
    background: var(--color-primary);
}

.so-seat.is-filled {
    background: rgba(200, 200, 200, 0.25);
    border-color: rgba(180, 130, 100, 0.5);
}

.so-seat.is-filled:hover {
    background: rgba(200, 200, 200, 0.45);
}

/* Side color-coding on seats */
.so-seat.is-groom {
    background: rgba(100, 149, 237, 0.25);
    border-color: rgba(100, 149, 237, 0.6);
}

.so-seat.is-groom:hover {
    background: rgba(100, 149, 237, 0.4);
}

.so-seat.is-bride {
    background: rgba(240, 98, 146, 0.25);
    border-color: rgba(240, 98, 146, 0.6);
}

.so-seat.is-bride:hover {
    background: rgba(240, 98, 146, 0.4);
}

.so-seat-name {
    font-size: 0.6rem;
    line-height: 1.15;
    text-align: center;
    color: var(--color-text-main);
    pointer-events: none;
    max-width: 40px;
    overflow: hidden;
    word-break: break-all;
    display: block;
    padding: 0 2px;
}

.so-seat-tooltip {
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: var(--color-text-main);
    color: #fff;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 20;
}

.so-seat.is-filled:hover .so-seat-tooltip {
    opacity: 1;
}

/* ---------- Move-guest popover ---------- */
.so-popover {
    position: absolute;
    z-index: 50;
    background: rgba(255, 251, 245, 0.98);
    border: 1px solid rgba(180, 130, 100, 0.25);
    border-radius: 12px;
    padding: 0.6rem;
    min-width: 180px;
    max-height: 320px;
    overflow-y: auto;
}

.so-popover-title {
    font-size: 0.85rem;
    color: var(--color-text-light);
    padding: 0.2rem 0.4rem 0.4rem;
}

.so-popover-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 0.45rem 0.6rem;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--color-text-main);
    border-radius: 6px;
    cursor: pointer;
}

.so-popover-btn:hover {
    background: rgba(240, 98, 146, 0.1);
    color: var(--color-primary-hover);
}

.so-popover-btn.is-danger {
    color: var(--color-primary-hover);
}

.so-popover-divider {
    height: 1px;
    background: rgba(180, 130, 100, 0.15);
    margin: 0.3rem 0;
}

.so-popover-search {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.4rem;
    font-family: inherit;
    font-size: 0.9rem;
    border: 1px solid rgba(180, 130, 100, 0.3);
    border-radius: 6px;
    background: rgba(255, 251, 245, 0.9);
    color: var(--color-text-main);
    outline: none;
}

.so-popover-search:focus {
    border-color: var(--color-primary);
}

.so-popover-guest-list .so-summary-group {
    margin-bottom: 0;
    border: none;
    border-radius: 0;
}

.so-popover-guest-list .so-summary-group-header {
    padding: 0.3rem 0.4rem;
    font-size: 0.9rem;
}

.so-popover-guest-list .so-summary-guests {
    padding: 0 0.2rem;
}

/* ---------- Hero sign-in nudge ---------- */
.so-signin-nudge-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.so-signin-nudge-hero[hidden] {
    display: none;
}

.so-signin-nudge-hero-text {
    color: var(--color-text-light, #999);
    font-size: 0.95rem;
}

/* ---------- Sign-in nudge ---------- */
.so-signin-nudge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--color-surface, #faf8f5);
    border: 1px solid var(--color-border, #e8e0d8);
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--color-text-muted, #888);
    flex-wrap: wrap;
}

.so-signin-nudge[hidden] {
    display: none;
}

.so-signin-nudge-link {
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.so-signin-nudge-link:hover {
    text-decoration: underline;
}

/* ---------- Auth gate modal ---------- */
.so-auth-overlay {
    position: fixed;
    inset: 0;
    background: rgba(60, 40, 30, 0.45);
    backdrop-filter: blur(4px);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.so-auth-overlay[hidden] {
    display: none;
}

.so-auth-modal {
    position: relative;
    background: rgba(255, 251, 245, 0.97);
    border: 1px solid rgba(180, 130, 100, 0.2);
    border-radius: 24px;
    padding: 2.5rem 2rem 2rem;
    max-width: 400px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.so-auth-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--color-text-light);
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    line-height: 1;
}

.so-auth-close:hover {
    color: var(--color-text-main);
}

.so-auth-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-main);
    margin: 0;
}

.so-auth-body {
    font-size: 1rem;
    color: var(--color-text-light);
    margin: 0;
}

.so-auth-cta {
    margin-top: 0.4rem;
    width: 100%;
    text-align: center;
}

.so-auth-signin {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

.so-auth-signin a {
    color: var(--color-primary);
    text-decoration: none;
}

.so-auth-signin a:hover {
    text-decoration: underline;
}

/* ---------- CSV help modal ---------- */
.so-help-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(74, 74, 74, 0.32);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.so-help-overlay[hidden] {
    display: none;
}

.so-help-modal {
    position: relative;
    width: min(100%, 620px);
    max-height: calc(100vh - 3rem);
    overflow-y: auto;
    background: rgba(255, 251, 245, 0.97);
    border: 1px solid rgba(180, 130, 100, 0.25);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.so-help-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    border: none;
    background: transparent;
    color: var(--color-text-light);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0.2rem 0.5rem;
}

.so-help-close:hover {
    color: var(--color-text-main);
}

.so-help-title {
    margin: 0;
    padding-right: 2rem;
    color: var(--color-text-main);
    font-family: 'Noto Serif TC', 'SatsukiGendaiMincho', serif;
    font-size: 1.7rem;
}

.so-help-body {
    margin: 0;
    color: var(--color-text-light);
    font-size: 1rem;
}

.so-help-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.so-help-tab {
    border: 1px solid rgba(180, 130, 100, 0.25);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.25);
    color: var(--color-text-main);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.2;
    min-height: 44px;
    padding: 0.55rem 0.75rem;
}

.so-help-tab.is-active {
    border-color: rgba(240, 98, 146, 0.65);
    background: rgba(240, 98, 146, 0.12);
    color: var(--color-primary-hover);
}

.so-help-steps {
    border-top: 1px solid rgba(180, 130, 100, 0.18);
    border-bottom: 1px solid rgba(180, 130, 100, 0.18);
    padding: 0.9rem 0;
}

.so-help-panel {
    display: none;
    margin: 0;
    padding-left: 1.35rem;
    color: var(--color-text-main);
}

.so-help-panel.is-active {
    display: block;
}

.so-help-panel li {
    margin: 0.45rem 0;
    line-height: 1.7;
}

/* ---------- Footer subtext ---------- */
.so-footer-subtext {
    font-size: 1.05rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .so-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .so-guide-head,
    .so-guide-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .so-guide-title {
        font-size: 2rem;
    }

    .so-hero {
        padding: 4rem 0 1.5rem;
    }

    .so-dropzone {
        padding: 2rem 1.2rem;
    }

    .so-help-modal {
        padding: 1.5rem;
    }

}

@media (max-width: 480px) {
    .so-guide {
        padding-top: 2.5rem;
    }

    .so-guide-title {
        font-size: 1.75rem;
    }

    .so-guide-zone {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .so-guide-tip summary {
        grid-template-columns: 1.8rem minmax(0, 1fr) auto;
        font-size: 1rem;
    }

    .so-guide-tip p {
        padding-left: 2.75rem;
    }

    .so-upload-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .so-upload-help {
        width: 100%;
    }

    .so-help-tabs {
        grid-template-columns: 1fr;
    }

    .so-config-field input {
        width: 80px;
    }

    .so-spreadsheet thead th,
    .so-spreadsheet tbody td {
        padding: 0.5rem 0.4rem;
        font-size: 0.95rem;
    }
}

/* Hide seat count */
.so-tables--no-count .so-disc-meta {
    display: none;
}

/* 3-dot loading animation in dropzone */
@keyframes so-dot-pulse {
    0%, 20%  { opacity: 0.2; transform: translateY(0); }
    50%       { opacity: 1;   transform: translateY(-4px); }
    80%, 100% { opacity: 0.2; transform: translateY(0); }
}

.so-loading-dots {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.so-loading-dots span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary);
    animation: so-dot-pulse 1.2s ease-in-out infinite;
}

.so-loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.so-loading-dots span:nth-child(3) { animation-delay: 0.4s; }

/* ---------- Sprite loader inside dropzone ---------- */

/* Hidden by default; shown when .is-loading */
.so-sprite-loader {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.so-dropzone.is-loading .so-dropzone-icon,
.so-dropzone.is-loading .so-dropzone-title,
.so-dropzone.is-loading .so-dropzone-hint {
    display: none;
}

.so-dropzone.is-loading .so-sprite-loader {
    display: flex;
}

.so-sprite-pair {
    display: flex;
    gap: 1.5rem;
    align-items: flex-end;
}

.so-sprite-viewport {
    width: 80px;
    height: 100px;
    overflow: hidden;
    position: relative;
}

.so-sprite-inner {
    width: 100%;
    height: 100%;
}

@keyframes so-sprite-walk {
    from { transform: translateX(0); }
    to   { transform: translateX(-400px); }
}

.so-sprite-loader-text {
    font-size: 1rem;
    color: var(--color-text-light);
    font-family: 'Noto Serif TC', 'SatsukiGendaiMincho', serif;
}

.so-sprite-img {
    width: 400px;
    height: 480px;
    position: absolute;
    top: -122px; /* Row 2: thinking, pushed up extra 2px to hide top border line */
    left: -10px; /* hide left border line */
    animation: so-sprite-walk 2s steps(4) infinite;
}
