/* CollaBoard - Modern Design System & Base CSS */

:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-border: #c7d2fe;

  --accent: #06b6d4;
  --accent-hover: #0891b2;

  --success: #10b981;
  --success-light: #ecfdf5;
  --warning: #f59e0b;
  --danger: #ef4444;
  --danger-light: #fef2f2;

  --bg-main: #0f172a;
  --bg-surface: #1e293b;
  --bg-surface-elevated: #334155;
  --bg-glass: rgba(30, 41, 59, 0.85);

  --border-color: #334155;
  --border-subtle: #1e293b;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -4px rgba(0, 0, 0, 0.4);

  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Common Layout */
#app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header / Navbar */
.app-navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  display: block;
  width: 32px;
  height: 32px;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  background: linear-gradient(to right, #ffffff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  background: rgba(79, 70, 229, 0.2);
  border: 1px solid var(--primary-border);
  color: #a5b4fc;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.nav-center {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.room-meta-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
}

.room-id-code {
  font-family: monospace;
  font-weight: 700;
  color: #67e8f9;
  letter-spacing: 0.05em;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* User Profile Badge */
.user-profile-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.user-profile-badge:hover {
  border-color: var(--color-primary, #3b82f6);
  background: rgba(59, 130, 246, 0.08);
}

/* Language Switcher */
.lang-switch-wrap {
  position: relative;
  display: inline-block;
  user-select: none;
  flex-shrink: 0;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.lang-switch-btn:hover,
.lang-switch-btn:focus-visible {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.15);
  color: #ffffff;
  outline: none;
}

.lang-switch-btn .lang-icon {
  font-size: 0.9rem;
  line-height: 1;
}

.lang-switch-btn .lang-label {
  font-size: 0.85rem;
  font-weight: 600;
}

.lang-switch-btn .lang-caret {
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.lang-switch-btn[aria-expanded="true"] .lang-caret {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.4rem);
  right: 0;
  min-width: 125px;
  background: var(--bg-surface, #1e293b);
  border: 1px solid var(--border-color, #334155);
  border-radius: var(--radius-md);
  padding: 0.35rem;
  margin: 0;
  list-style: none;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5), 0 8px 10px -6px rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0.65rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  outline: none;
}

.lang-option:hover,
.lang-option:focus-visible {
  background: rgba(79, 70, 229, 0.25);
  color: #ffffff;
}

.lang-option.active {
  color: #a5b4fc;
  font-weight: 700;
}

.lang-check {
  font-size: 0.8rem;
  color: #a5b4fc;
  font-weight: 700;
}

.user-avatar {
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.15s ease;
  line-height: 1;
}

.user-avatar:hover {
  transform: scale(1.2);
}

.user-name-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.user-name-text {
  font-weight: 500;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inline-edit-icon {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: opacity 0.2s ease;
}

.user-profile-badge:hover .inline-edit-icon {
  opacity: 1;
}

.inline-nickname-input {
  background: var(--bg-surface, #1e293b);
  color: var(--text-main, #f8fafc);
  border: 1px solid var(--color-primary, #3b82f6);
  border-radius: var(--radius-sm, 4px);
  padding: 0.15rem 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  outline: none;
  width: 110px;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.host-star {
  color: #fbbf24;
}

/* P2P Status Indicator */
.p2p-status-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.7; }
}

/* Main Container */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease-in-out;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: var(--bg-surface-elevated);
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background-color: #475569;
}

.btn-outline {
  background: transparent;
  color: var(--text-main);
  border-color: var(--border-color);
}

.btn-outline:hover {
  background: var(--bg-surface);
  border-color: #475569;
}

.btn-danger {
  background-color: var(--danger);
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-warning {
  background-color: var(--warning);
  color: #0f172a;
}

.btn-success {
  background-color: var(--success);
  color: #ffffff;
}

.btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
}

.btn-xs {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

.btn-disabled, .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
}

.modal-dialog {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 520px;
  width: 100%;
  overflow: hidden;
  animation: modal-appear 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-appear {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-main);
}

/* Form inputs */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.15s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* Participants Drawer / Dropdown */
.participants-menu {
  position: relative;
}

.participants-popover {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  width: 280px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 0.75rem;
  z-index: 60;
  display: none;
}

.participants-popover.show {
  display: block;
}

.popover-header {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.participants-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  border-radius: var(--radius-sm);
}

.participants-item:hover {
  background: var(--bg-surface-elevated);
}

.p-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.p-role-tag {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-sm);
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
}

.transfer-host-btn {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.transfer-host-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: #a855f7;
  color: #d8b4fe;
}

.popover-host-req-box {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.6rem;
}

.request-host-btn {
  width: 100%;
  font-size: 0.75rem;
  font-weight: 600;
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.35);
  padding: 0.35rem 0.5rem;
}

.request-host-btn:hover {
  background: rgba(168, 85, 247, 0.15);
  border-color: #a855f7;
}

.quiz-req-host-btn {
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  border: 1px solid #c084fc;
  background: linear-gradient(135deg, #a855f7, #7c3aed);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(168, 85, 247, 0.35);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.quiz-req-host-btn:hover {
  background: linear-gradient(135deg, #c084fc, #9333ea);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(168, 85, 247, 0.5);
  color: #ffffff;
}

.quiz-req-host-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* QR Modal Canvas */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
}

.qr-canvas-wrap {
  padding: 0.5rem;
  background: #ffffff;
  border-radius: var(--radius-md);
  display: inline-block;
}

.qr-link-copy {
  display: flex;
  width: 100%;
  gap: 0.5rem;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 200;
}

.toast {
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 0.875rem;
  animation: toast-in 0.2s ease-out;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Nav Portal Link */
.nav-portal-link {
  font-size: 0.8rem;
  font-weight: 600;
  color: #94a3b8;
  text-decoration: none;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(30, 41, 59, 0.4);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-portal-link:hover {
  color: #ffffff;
  border-color: rgba(148, 163, 184, 0.5);
  background: rgba(51, 65, 85, 0.5);
}

.help-portal-link, .help-footer-portal-link {
  font-size: 0.78rem;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: none;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(165, 180, 252, 0.3);
  background: rgba(79, 70, 229, 0.15);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.help-portal-link:hover, .help-footer-portal-link:hover {
  color: #ffffff;
  background: rgba(79, 70, 229, 0.3);
  border-color: rgba(165, 180, 252, 0.6);
}

.help-title-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Site Footer */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-color);
  background: #090e1a;
  padding: 3.5rem 1.5rem 2rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.site-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 3rem;
  flex-wrap: wrap;
}

.site-footer-brand {
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.footer-logo-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.footer-brand-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: #ffffff;
}

.footer-brand-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(79, 70, 229, 0.2);
  border: 1px solid rgba(165, 180, 252, 0.3);
  color: #a5b4fc;
  font-weight: 600;
}

.footer-desc {
  font-size: 0.84rem;
  line-height: 1.6;
  color: #94a3b8;
}

.footer-operator-info {
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.footer-email-link {
  color: #38bdf8;
  text-decoration: none;
}

.footer-email-link:hover {
  text-decoration: underline;
}

.site-footer-nav-group {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
}

.footer-nav-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-nav-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: #f1f5f9;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.footer-nav-col nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav-btn {
  background: none;
  border: none;
  padding: 0;
  color: #94a3b8;
  font-size: 0.85rem;
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease;
  font-family: inherit;
}

.footer-nav-btn:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-portal-link {
  color: #67e8f9;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.15s ease;
}

.footer-portal-link:hover {
  color: #a5f3fc;
  text-decoration: underline;
}

.site-footer-bottom {
  max-width: 1080px;
  margin: 2.5rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(51, 65, 85, 0.6);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.78rem;
  color: #64748b;
}

.footer-sub-links {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.footer-sub-links a {
  color: #94a3b8;
  text-decoration: none;
}

.footer-sub-links a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-sub-btn {
  background: none;
  border: none;
  padding: 0;
  color: #94a3b8;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
}

.footer-sub-btn:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Philosophy Banner Extras */
.banner-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #38bdf8;
  margin-bottom: 0.35rem;
}

.banner-action-links {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.banner-action-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #67e8f9;
  cursor: pointer;
  font-family: inherit;
  transition: color 0.15s ease;
}

.banner-action-btn:hover {
  color: #ffffff;
  text-decoration: underline;
}

/* Workflow Guide Section */
.workflow-guide-section {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.section-eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #818cf8;
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.25rem;
}

.workflow-steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.workflow-step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  transition: border-color 0.2s, transform 0.2s;
}

.workflow-step-card:hover {
  border-color: #6366f1;
  transform: translateY(-2px);
}

.step-badge {
  align-self: flex-start;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.15rem 0.5rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.35);
  color: #a5b4fc;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
}

.step-icon {
  font-size: 2rem;
}

.workflow-step-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
}

.workflow-step-card p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* Scenarios Section */
.scenarios-section {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.scenarios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.scenario-card {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85), rgba(15, 23, 42, 0.95));
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: border-color 0.2s;
}

.scenario-card:hover {
  border-color: #38bdf8;
}

.scenario-icon-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.5rem;
}

.scenario-plus {
  font-size: 1rem;
  color: #64748b;
  font-weight: 700;
}

.scenario-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff;
}

.scenario-desc {
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text-muted);
  flex: 1;
}

.scenario-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.scenario-tags span {
  font-size: 0.7rem;
  padding: 0.15rem 0.45rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #7dd3fc;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

/* Safe Ad Placement Area (Strictly isolated to public read-only lobby) */
.ad-safe-container {
  margin: 1.5rem 0 0;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed rgba(51, 65, 85, 0.7);
  border-radius: var(--radius-md);
  text-align: center;
}

.ad-slot-placeholder {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.ad-badge {
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: #64748b;
  font-weight: 600;
}

.ad-unit-text {
  font-size: 0.8rem;
  color: #475569;
}

/* AdSense policy rule: strictly eliminate ads in interactive/private room states */
body[data-ad-eligible="false"] .ad-safe-container,
body[data-app-view="room"] .ad-safe-container,
body.help-open .ad-safe-container {
  display: none !important;
  visibility: hidden !important;
}

/* =========================================================================
   Common Feedback Widget & Tester Protection
   ========================================================================= */

/* 1. 상단 투명 스페이서: 눈에 보이지 않으며 클릭 영역만 확보 */
.topbar-spacer {
  flex: 1 1 auto;
  min-height: 48px;
  align-self: stretch;
  cursor: default;
  user-select: none;
  touch-action: manipulation; /* 모바일 더블탭 확대 방지 */
}

/* 2. 공통 피드백 위젯 노출 제어 */
/* 기본적으로 완전 숨김 */
[data-common-feedback-widget] {
  display: none !important;
}

/* 한국어 모드이고 테스터 잠금 해제된 경우에만 표시 */
html[lang="ko"] body.is-feedback-unlocked [data-common-feedback-widget] {
  display: block !important;
}

/* 비한국어 모드(영어 등)에서는 잠금 해제 여부와 무관하게 항상 숨김 */
html:not([lang="ko"]) [data-common-feedback-widget],
[lang="en"] [data-common-feedback-widget] {
  display: none !important;
}

/* 3. 쿨다운 및 활성화 알림용 플로팅 토스트 UI */
.app-toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(16px);
  background: rgba(24, 33, 31, 0.94);
  color: #fffdfa;
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 2147483002; /* 위젯 모달(2147483001)보다 위에 표시 */
  white-space: nowrap;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}


