/* WHO2MEET-d1 — Professional landing page style */
:root {
    --bg-page: #fafafa;
    --bg-secondary: #f4f4f5;
    --bg-card: #ffffff;
    --text-primary: #18181b;
    --text-secondary: #71717a;
    --border: #e4e4e7;
    --accent: #90C5FC;
    --accent-hover: #7BB5F8;
    --accent-gradient: linear-gradient(135deg, #DFC3FC, #90C5FC);
    --accent-gradient-soft: linear-gradient(135deg, rgba(223,195,252,0.15), rgba(144,197,252,0.15));
    --radius: 0.5rem;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --shadow: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-card: 0 1px 3px rgba(0,0,0,0.06);

    /* Relative units */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --header-h: 3rem;
    --container-narrow: min(30rem, 95vw);
    --container-wide: min(45rem, 95vw);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { font-size: clamp(14px, 2.5vw, 16px); }

body {
    font-family: var(--font);
    background: var(--bg-page);
    background-image: url("assets/bg-shapes.svg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    font-size: 1rem;
}

.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    min-height: 2.75rem;
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}
.header-inner {
    max-width: min(56.25rem, 100%);
    margin: 0 auto;
    padding: 0 var(--space-md);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo-text {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}
.logo-text:hover { color: var(--accent); }
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}
.btn-feedback {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8125rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}
.btn-feedback:hover {
    background: var(--border);
    color: var(--text-primary);
}
.btn-lang {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}
.btn-lang:hover { color: var(--accent); border-color: var(--accent); }

#app {
    padding-top: var(--header-h);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.screen {
    display: none;
    padding: var(--space-xl) var(--space-md);
    flex: 1;
}
.screen.active { display: flex; flex-direction: column; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* SVG background applied via body; bg-shapes placeholder kept for structure */
.screen-with-shapes { position: relative; }
.screen-with-shapes .container { width: 100%; }
.bg-shapes { display: none; }

.container {
    width: 100%;
    max-width: var(--container-narrow);
    margin: 0 auto;
    padding: 0 var(--space-md);
}
.container-wide {
    max-width: var(--container-wide);
}

.version-display {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.hero { text-align: center; padding: var(--space-xl) 0 var(--space-lg); }
.hero-logo {
    width: 2.5rem;
    height: 3px;
    margin: 0 auto var(--space-md);
    background: var(--accent-gradient);
    border-radius: 2px;
}
.hero-title { font-size: clamp(1.5rem, 5vw, 1.875rem); font-weight: 700; color: var(--text-primary); letter-spacing: -0.03em; line-height: 1.2; }
.hero-subtitle { font-size: 1rem; color: var(--text-secondary); margin-top: var(--space-sm); font-weight: 400; }

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    box-shadow: var(--shadow-card);
}

.form-group { margin-bottom: var(--space-md); }
.form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}
.form-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-page);
    color: var(--text-primary);
}
.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(144, 197, 252, 0.35);
}
.form-textarea { min-height: 5rem; resize: vertical; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    border: none;
    transition: background 0.15s, color 0.15s;
}
.btn-full { width: 100%; }
.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
}
.btn-primary:hover:not(:disabled) { background: var(--accent-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); border-color: var(--text-secondary); }
.btn-ghost { background: transparent; color: var(--text-secondary); }
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text-primary); }
.btn-small { padding: var(--space-xs) var(--space-sm); font-size: 0.8125rem; }

.divider {
    text-align: center;
    margin: var(--space-lg) 0;
    color: var(--text-secondary);
    font-size: 0.8125rem;
}
.divider span { background: var(--bg-page); padding: 0 var(--space-md); }

.hint-text { font-size: 0.8125rem; color: var(--text-secondary); }
.link { color: var(--accent); text-decoration: none; }
.tutorial-entry-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--accent);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.tutorial-entry-link:hover {
    background: rgba(144, 197, 252, 0.12);
    border-color: var(--accent);
}
/* Tutorial box — neutral professional style */
.tutorial-box {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    margin-top: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}
.tutorial-box:hover {
    background: var(--bg-card);
    border-color: var(--accent);
    color: var(--accent);
}
.tutorial-box .tutorial-box-label { color: inherit; }
.tutorial-box .tutorial-box-link { font-weight: 600; text-decoration: none; }
.link:hover { text-decoration: underline; }
.error-text { font-size: 0.8125rem; color: #e03e3e; margin-top: var(--space-sm); }

.section-title { font-size: 1rem; font-weight: 600; margin-bottom: var(--space-sm); }
.nav-buttons { display: flex; gap: var(--space-sm); margin-top: var(--space-md); flex-wrap: wrap; }

/* Parameter tiles — horizontal scroll */
.param-tiles-scroll {
    display: flex;
    gap: var(--space-md);
    overflow-x: auto;
    overflow-y: hidden;
    padding: var(--space-sm) 0;
    margin-bottom: var(--space-md);
    -webkit-overflow-scrolling: touch;
}
.param-tile {
    flex: 0 0 auto;
    min-width: 12rem;
    max-width: 18rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-md);
    background: var(--bg-secondary);
}
.param-tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-sm);
}
.param-tile-label { font-size: 0.875rem; font-weight: 600; }
.param-toggle-wrap { position: relative; display: inline-block; width: 2.5rem; height: 1.25rem; }
.param-toggle { opacity: 0; width: 0; height: 0; }
.param-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--border);
    border-radius: 1rem;
    transition: 0.2s;
}
.param-toggle-slider::before {
    content: '';
    position: absolute;
    height: 1rem;
    width: 1rem;
    left: 0.125rem;
    bottom: 0.125rem;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.param-toggle:checked + .param-toggle-slider { background: var(--accent-gradient); }
.param-toggle:checked + .param-toggle-slider::before { transform: translateX(1.25rem); }
.param-toggle:disabled + .param-toggle-slider { opacity: 0.6; cursor: not-allowed; }
.param-tile-form .create-tags-list { margin-bottom: var(--space-xs); }
.param-form-extroversion .extroversion-tags {
    display: flex;
    gap: var(--space-sm);
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}
.param-form-extroversion .extroversion-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.extroversion-tag-intro { color: var(--text-secondary); }
.extroversion-tag-extra { color: var(--accent); border-color: var(--accent); }
.extroversion-scale-hint { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0; }
.weight-sliders-wrap .weight-slider { margin-bottom: var(--space-md); }
.weight-slider { margin-bottom: var(--space-md); }
.weight-header { display: flex; justify-content: space-between; font-size: 0.875rem; margin-bottom: var(--space-xs); }
.weight-slider input[type="range"] { width: 100%; }

.create-tag-row {
    display: flex;
    flex-wrap: nowrap;
    gap: var(--space-sm);
    align-items: center;
    margin-bottom: var(--space-sm);
}
.create-tag-row .create-tag-emoji {
    flex: 0 0 auto;
    width: 3.5em;
    min-width: 3em;
}
.create-tag-row .create-tag-name {
    flex: 1 1 auto;
    min-width: 0;
}
.create-tag-row .btn-remove-tag {
    flex-shrink: 0;
}
.create-tags-list { margin-bottom: var(--space-sm); }

/* Tag grid — CSS Grid with auto-fit */
.tag-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(8rem, 100%), 1fr));
    gap: var(--space-sm);
}
.tag-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    cursor: pointer;
    font-size: 0.875rem;
}
.tag-item:hover { border-color: var(--accent); }
.tag-item.selected { background: rgba(144, 197, 252, 0.2); border-color: var(--accent); color: var(--accent); }
.tag-priority { font-size: 0.6875rem; color: var(--text-secondary); margin-left: var(--space-xs); }

.steps { display: flex; gap: var(--space-sm); margin-bottom: var(--space-md); }
.step-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s;
}
.step-dot.active { background: var(--accent-gradient); }
.step-dot.completed { background: var(--text-secondary); }
.profile-step { display: none; }
.profile-step.active { display: block; }
.step-instruction { margin-bottom: var(--space-md); font-size: 0.875rem; }

.extroversion-slider-wrap {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-top: var(--space-md);
}
.extroversion-slider {
    flex: 1;
    min-width: 120px;
    accent-color: var(--accent);
}
.extroversion-value {
    font-weight: 600;
    min-width: 1.5em;
    text-align: center;
}

.loading { text-align: center; padding: var(--space-2xl) 0; }
.loading-spinner {
    width: clamp(2rem, 8vw, 2.5rem);
    height: clamp(2rem, 8vw, 2.5rem);
    margin: 0 auto var(--space-md);
    border: 3px solid var(--border);
    border-top-color: #90C5FC;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.session-code-display {
    text-align: center;
    padding: var(--space-lg);
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: var(--space-lg);
}
.session-code-label { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: var(--space-xs); }
.session-code-value { font-size: clamp(1.5rem, 5vw, 1.75rem); font-weight: 700; letter-spacing: 0.2em; }

/* 일련번호 클릭 복사 블록 (강사 대시보드) */
.session-code-copy-block {
    display: block;
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    margin: 0;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    font: inherit;
    color: inherit;
}
.session-code-copy-block:hover {
    background: var(--bg-secondary);
    border-color: var(--accent);
}
.session-code-copy-block .session-code-value {
    display: block;
    margin-bottom: var(--space-xs);
}
.copy-serial-hint {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    font-weight: normal;
    letter-spacing: 0;
}
.copy-serial-hint.copy-serial-done {
    color: var(--accent);
    font-weight: 600;
}

/* Teams — Grid layout */
#teams-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(20rem, 100%), 1fr));
    gap: var(--space-md);
}

.team-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-lg);
    background: var(--bg-card);
    min-width: 0;
}
.team-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-md); flex-wrap: wrap; gap: var(--space-sm); }
.team-name { font-size: 1.125rem; font-weight: 600; }
.team-score { font-size: 0.8125rem; color: var(--text-secondary); }
.team-shared-interests { margin-bottom: var(--space-md); }
.team-shared-label { font-size: 0.75rem; color: var(--text-secondary); margin-right: var(--space-sm); }
.team-shared-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: var(--space-xs); }
.team-shared-tag { font-size: 0.8125rem; padding: var(--space-xs) var(--space-sm); background: var(--bg-secondary); border-radius: var(--radius); }

.member-card {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius);
    margin-bottom: var(--space-sm);
}
.member-name { font-weight: 600; margin-bottom: var(--space-xs); }
.member-you { color: var(--accent); }
.member-role-line, .member-interest-realm { font-size: 0.8125rem; color: var(--text-secondary); margin-bottom: var(--space-xs); }
.member-new-badge {
    display: inline-block;
    margin-left: 0.375rem;
    padding: var(--space-xs) 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(144, 197, 252, 0.2);
    border-radius: var(--radius);
}
.member-card-new { border-left: 3px solid var(--accent); }
.member-message { font-size: 0.8125rem; font-style: italic; color: var(--text-secondary); margin-top: var(--space-sm); }
.member-extroversion { margin-top: var(--space-xs); }
.member-extro-tag {
    display: inline-block;
    padding: 0.15em 0.5em;
    border-radius: var(--radius);
    font-size: 0.8125rem;
}
.member-extro-tag-blue {
    background: rgba(144, 197, 252, 0.2);
    color: var(--accent);
    border: 1px solid var(--accent);
}
.member-extro-tag-white {
    background: var(--bg-card);
    color: var(--text);
    border: 1px solid var(--border);
}

/* Results screen: professional styling */
.results-cute .team-card {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-card);
    box-shadow: var(--shadow-card);
}
.results-cute .team-name { color: var(--text-primary); }
.results-cute .team-score {
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-secondary);
    border-radius: var(--radius);
    font-size: 0.75rem;
    color: var(--text-secondary);
}
.results-cute .team-shared-tag {
    background: rgba(144, 197, 252, 0.2);
    color: var(--accent);
    border-radius: var(--radius);
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.75rem;
}
.results-cute .member-card {
    border-radius: var(--radius);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    padding: var(--space-md);
}
.results-cute .member-card-new {
    border-left: 3px solid var(--accent);
    background: rgba(144, 197, 252, 0.08);
}
.results-cute .member-new-badge {
    background: rgba(144, 197, 252, 0.2);
    color: var(--accent);
    border-radius: var(--radius);
    padding: var(--space-xs) var(--space-sm);
}
.results-cute .member-you { color: var(--accent); }
.results-cute .member-message {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius);
    border-left: 3px solid var(--border);
}
.results-cute #results-title {
    color: var(--text-primary);
    font-weight: 700;
}

.text-secondary { color: var(--text-secondary); }

/* Email Results modal */
.email-results-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    padding: var(--space-md);
}
.email-results-overlay.email-results-visible {
    opacity: 1;
    visibility: visible;
}
.email-results-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-lg);
    width: 100%;
    max-width: min(28rem, 90vw);
    position: relative;
    box-shadow: 0 0.5rem 2rem rgba(0,0,0,0.15);
}
.email-results-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 2rem;
    height: 2rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.email-results-close:hover { color: var(--text-primary); }
.email-results-title { margin: 0 0 var(--space-sm); font-size: 1.125rem; }
.email-results-desc { margin: 0 0 var(--space-md); font-size: 0.875rem; color: var(--text-secondary); }
.email-results-modal .form-input { margin-bottom: var(--space-md); }
.email-results-modal .btn-full { margin-top: 0; }

/* Feedback modal */
.feedback-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    padding: var(--space-md);
}
.feedback-overlay.feedback-visible {
    opacity: 1;
    visibility: visible;
}
.feedback-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-lg);
    width: 100%;
    max-width: min(28rem, 90vw);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 0.5rem 2rem rgba(0,0,0,0.15);
}
.feedback-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 2rem;
    height: 2rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.feedback-close:hover { color: var(--text-primary); }
.feedback-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}
.feedback-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-md);
}
.feedback-textarea { min-height: 6rem; }
.feedback-email-toggle { margin-top: var(--space-md); }
.feedback-toggle-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.feedback-toggle { width: 1rem; height: 1rem; cursor: pointer; }
.feedback-email-wrap { margin-top: var(--space-sm); }
#feedback-form .btn { margin-top: var(--space-lg); }

/* Tutorial modals — responsive */
.tutorial-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    padding: var(--space-md);
}
.tutorial-overlay.tutorial-overlay-visible {
    opacity: 1;
    visibility: visible;
}
.tutorial-modal {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: var(--space-lg);
    width: 100%;
    max-width: min(32.5rem, 90vw);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0.5rem 2rem rgba(0,0,0,0.15);
    position: relative;
}
#landing-role-modal .tutorial-modal.landing-role-modal {
    max-width: min(65rem, 95vw);
    padding: var(--space-xl);
    font-size: clamp(1rem, 2.5vw, 1.2rem);
}
#landing-role-modal .tutorial-modal-title { font-size: clamp(1.5rem, 5vw, 2.25rem) !important; margin-bottom: var(--space-md) !important; }
#landing-role-modal .tutorial-modal-subtitle { font-size: clamp(1rem, 3vw, 1.375rem) !important; margin-bottom: var(--space-2xl) !important; }
#landing-role-modal .tutorial-role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr));
    gap: var(--space-xl);
}
#landing-role-modal .tutorial-role-card {
    min-width: 0;
    padding: var(--space-xl);
}
#landing-role-modal .tutorial-role-icon { font-size: clamp(3rem, 12vw, 6rem) !important; }
#landing-role-modal .tutorial-role-title { font-size: clamp(1.25rem, 4vw, 1.75rem) !important; }
#landing-role-modal .tutorial-role-desc { font-size: clamp(0.9rem, 2.5vw, 1.125rem) !important; }
.tutorial-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 2rem;
    height: 2rem;
    min-width: 2.5rem;
    min-height: 2.5rem;
    border: none;
    background: transparent;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tutorial-close:hover { color: var(--text-primary); }
.tutorial-modal-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
    text-align: center;
}
.tutorial-modal-subtitle {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--space-lg);
}
.tutorial-role-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
    gap: var(--space-md);
    justify-items: center;
}
.tutorial-role-card {
    min-width: 0;
    width: 100%;
    max-width: 20rem;
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-page);
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.tutorial-role-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(144, 197, 252, 0.25);
}
.tutorial-role-icon { font-size: 2.5rem; }
.tutorial-role-title { font-size: 1rem; font-weight: 600; }
.tutorial-role-desc { font-size: 0.8125rem; color: var(--text-secondary); }
.tutorial-step-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--space-md);
}
.tutorial-progress {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}
.tutorial-progress-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--border);
    transition: background 0.2s;
}
.tutorial-progress-dot.active { background: var(--accent-gradient); }
.tutorial-progress-dot.completed { background: var(--text-secondary); }
.tutorial-step-content { margin-bottom: var(--space-lg); }
.tutorial-step-image {
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: var(--space-md);
}
.tutorial-step-instruction {
    font-size: 0.875rem;
    color: var(--text-primary);
    line-height: 1.6;
}
.tutorial-step-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
}
.tutorial-step-counter { font-size: 0.8125rem; color: var(--text-secondary); }

/* ========== Mobile breakpoint (768px and below) ========== */
@media (max-width: 768px) {
    .screen { padding: var(--space-md); }
    .container, .container-wide { padding: 0 var(--space-sm); }
    .hero { padding: var(--space-lg) 0 var(--space-md); }
    .card { padding: var(--space-md); }
    .nav-buttons { gap: var(--space-xs); }
    .nav-buttons .btn { flex: 1 1 auto; min-width: 0; }
    #teams-container { grid-template-columns: 1fr; }
    .session-code-value { letter-spacing: 0.1em; }
    .tutorial-overlay { padding: var(--space-sm); }
    .tutorial-modal { padding: var(--space-md); max-height: 85vh; }
    #landing-role-modal .tutorial-modal.landing-role-modal { padding: var(--space-lg); }
    #landing-role-modal .tutorial-role-cards { gap: var(--space-md); }
    #landing-role-modal .tutorial-role-card { padding: var(--space-lg); }
}

/* ========== Emoji picker (emoji-picker-element) ========== */
.emoji-picker-root {
    position: absolute;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease, visibility 0.15s ease;
}
.emoji-picker-root.emoji-picker-root-visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.emoji-picker-root emoji-picker {
    --num-columns: 8;
    --border-radius: var(--radius);
    --border-color: var(--border);
    --background: var(--bg-card);
    --input-font-size: 0.875rem;
}
.js-emoji-input,
.create-tag-emoji {
    cursor: pointer;
}
