:root {
    --bg-color: #ffffff;
    --card-bg: #ffffff;
    --text-primary: #000000;
    --text-secondary: #707070;
    --accent-color: #000000;
    --accent-contrast: #ffffff;
    --border-color: #eeeeee;
    --gift-bg: #fff7ed;
    --warning-bg: #fff1f2;
    --link-color: #1d4ed8;
    --danger-color: #e11d48;
    --gift-accent: #b45309;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Inter", "Outfit", sans-serif; -webkit-tap-highlight-color: transparent; }

body { background-color: var(--bg-color); color: var(--text-primary); overflow-x: hidden; overscroll-behavior: none; }

/* スキップリンク: Tab キーフォーカス時のみ表示 (WCAG 2.4.1) */
.skip-link { position: absolute; top: -60px; left: 8px; z-index: 10000; background: var(--accent-color); color: var(--accent-contrast); padding: 8px 16px; border-radius: 6px; font-size: 14px; font-weight: 600; text-decoration: none; transition: top 0.15s; }
.skip-link:focus { top: 8px; }

/* 長い連続文字列（メール・URL・改行なし文字列）でコンテナを突き破るのを全域で防ぐ保険 */
.modal-content, #detail-view, .event-card, .seasonal-card, .friend-card h4,
.empty-state p, #profile-name, #profile-bio, #profile-account-email,
.social-link-chip, .sc-title, .sc-msg { overflow-wrap: anywhere; }
#profile-account-email { word-break: break-all; }

.app-container { max-width: 500px; margin: 0 auto; padding: calc(40px + var(--safe-top)) 20px calc(100px + var(--safe-bottom)); position: relative; min-height: 100vh; }

/* Animations */
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
main:not(.hidden) { animation: fadeIn 0.3s ease-out; }
.modal-content { animation: slideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes slideUp { from { transform: translateY(100%); opacity: 0.5; } to { transform: translateY(0); opacity: 1; } }
.modal.closing .modal-content { animation: slideDown 0.25s cubic-bezier(0.4, 0, 1, 1) forwards; }
@keyframes slideDown { to { transform: translateY(100%); opacity: 0; } }
.modal.closing, #custom-dialog-overlay.closing { animation: backdropFade 0.25s ease forwards; }
@keyframes backdropFade { to { opacity: 0; } }


/* Themes */
body.dark-mode { --bg-color: #000000; --card-bg: #111111; --text-primary: #ffffff; --text-secondary: #888888; --border-color: #222222; --accent-color: #ffffff; --accent-contrast: #111111; --gift-bg: #1a1400; --warning-bg: #1a0a0a; --link-color: #60a5fa; --danger-color: #fb7185; --gift-accent: #fbbf24; }
body.dark-mode .event-card, body.dark-mode .modal-content, body.dark-mode .bottom-nav { background: #111111; border-color: #222222; }
body.dark-mode .albus-input { border-bottom-color: #222222; color: #ffffff; }
body.dark-mode .logo { color: #ffffff; }
body.dark-mode .onboarding-card { background: #1a1a1a; color: #e0e0e0; }
body.dark-mode .albus-input::placeholder { color: #888; opacity: 1; }
body.dark-mode #onboarding-overlay { background: rgba(0,0,0,0.6); }
body.dark-mode .onboarding-card .social-btn.google-btn { background: #3367d6; }
body.dark-mode .onboarding-card p { color: #999; }
body.dark-mode .onboarding-card .social-btn[style*="background:#000"] { background: #333 !important; border: 1px solid #555 !important; }
body.dark-mode .onboarding-card .save-btn:not([style*="background"]) { background: #fff !important; color: #111 !important; }
body.dark-mode #onboarding-copy { color: #bbb !important; }
body.dark-mode #custom-dialog-input { border-color: #333; color: #fff; background: #111; }
body.dark-mode #custom-dialog-input:focus { border-color: #fff; }
body.dark-mode .avatar-container { background: #1a1a1a; border-color: #333; }
body.dark-mode .friend-card h4 { color: #999; }
body.dark-mode .event-card h4 { color: #e0e0e0; }
body.dark-mode .template-chip { background: #1a1a1a; border-color: #333; color: #ccc; }
body.dark-mode .wizard-back-icon { border-color: #333; color: #888; }
body.dark-mode .wizard-back-icon:active { background: #222; }
body.dark-mode .capacity-btn { border-color: #333; background: #111; color: #ccc; }
body.dark-mode .capacity-btn:active { background: #222; }
body.dark-mode .privacy-select { background: #1a1a1a; border-color: #333; color: #ccc; }
body.dark-mode .settings-section { border-bottom-color: #222; }
body.dark-mode .profile-edit-btn { background: #222; color: #ccc; }
body.dark-mode .profile-edit-btn:hover { background: #2a2a2a; }
/* Friend-view preview card */
#my-contact-preview { background: #f9f9f9; }
#my-contact-preview > [data-i18n="settings.cardPreview"] { color: var(--text-secondary); }
.cp-tab { flex: 1; padding: 6px; font-size: 11px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--border-color); background: var(--card-bg); color: var(--text-secondary); }
.cp-tab.active { background: var(--accent-color); color: var(--accent-contrast); border-color: var(--accent-color); }
.cp-field-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; padding: 6px 0; font-size: 13px;
    border-bottom: 1px solid var(--border-color); color: var(--text-primary); }
/* 左の値が長くても公開バッジが画面外に押し出されないように */
.cp-field-row > span:first-child { min-width: 0; flex: 1; overflow-wrap: anywhere; }
.cp-field-row.hidden-field { opacity: 0.4; color: var(--text-secondary); }
.cp-label-visible { font-size: 10px; color: #22c55e; font-weight: 700; flex-shrink: 0; white-space: nowrap; }
.cp-label-hidden  { font-size: 10px; color: #999; flex-shrink: 0; white-space: nowrap; }
body.dark-mode #my-contact-preview { background: #161616; }
body.dark-mode .cp-label-hidden { color: #666; }
body.dark-mode .toggle-card { border-bottom-color: #222; }


/* Theme Picker */
.theme-picker { display: flex; gap: 15px; margin-top: 10px; }
.theme-dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; transition: 0.2s; position: relative; }
.theme-dot.active::after { content: '✓'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: #888; font-size: 14px; }
.theme-dot[data-theme="dark"].active::after { color: #fff; }


/* typography */
.logo {
    font-family: 'Outfit';
    font-size: 56px;
    font-weight: 900;
    letter-spacing: -1.5px;
    color: #000;
    margin-bottom: 15px;
    text-align: center;
}

.onboarding-card {
    text-align: center;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 450px;
    width: 90%;
}

.save-btn, .social-btn {
    cursor: pointer !important;
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    border: none;
    outline: none;
}

.save-btn:hover, .social-btn:hover {
    filter: brightness(0.96);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.save-btn:active, .social-btn:active {
    transform: scale(0.97);
    filter: brightness(0.92);
    transition-duration: 0.06s;
}

/* ALBUS Input */
.albus-input {
    width: 100%; padding: 12px 0; border: none; border-bottom: 1.5px solid #e5e5e5;
    background: transparent; font-size: 16px; margin-bottom: 25px; outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.albus-input:focus { border-bottom-color: var(--accent-color); box-shadow: 0 2px 0 -1px var(--accent-color); }
.albus-input.large { font-size: 24px; font-weight: 600; }
.albus-input.tall { height: 120px; resize: none; margin-bottom: 15px; }

/* Contacts Grid */
.contacts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
/* 地域順の都道府県見出し（グリッド全幅） */
.region-header {
    grid-column: 1 / -1;
    font-size: 12px; font-weight: 700; letter-spacing: 0.04em;
    color: var(--text-secondary);
    padding: 12px 2px 5px; margin-top: 4px;
    border-bottom: 1px solid var(--border-color);
}
.region-header:first-child { margin-top: 0; }
.friend-card { text-align: center; cursor: pointer; transition: transform 0.15s ease; }
.friend-card:active { transform: scale(0.93); }
.avatar-container { width: 100%; aspect-ratio: 1/1; background: #fff; border: 1px solid #f0f0f0; overflow: hidden; margin-bottom: 5px; border-radius: 4px; position: relative; transition: box-shadow 0.2s ease; }
.friend-card:active .avatar-container { box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.avatar { width: 100%; height: 100%; object-fit: cover; }
.friend-card h4 { font-size: 10px; font-weight: 400; color: #555; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.tier-badge {
    position: absolute; bottom: 5px; right: 5px; font-size: 8px; font-weight: 700;
    padding: 2px 4px; border-radius: 4px; background: rgba(0,0,0,0.6); color: #fff;
    backdrop-filter: blur(4px);
}
/* イベント募集中バッジ（友達が主催する有効イベントがあるとき・見落とし防止） */
.event-badge {
    position: absolute; top: 4px; left: 4px; z-index: 2;
    width: 16px; height: 16px; border-radius: 50%;
    background: var(--accent-color); color: var(--accent-contrast);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 2px var(--card-bg, #fff);
    animation: eventPulse 2s ease-in-out infinite;
}
.event-badge svg { width: 10px; height: 10px; display: block; }
@keyframes eventPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) { .event-badge { animation: none; } }
.tier-badge.lvl-1 { background: #e5e7eb; color: #374151; }
.tier-badge.lvl-2 { background: rgba(66, 133, 244, 0.9); color: #fff; }
.tier-badge.lvl-3 { background: rgba(225, 29, 72, 0.9); color: #fff; }
body.dark-mode .tier-badge.lvl-1 { background: #374151; color: #f3f4f6; }
body.dark-mode .tier-badge.lvl-2 { background: rgba(66, 133, 244, 0.7); }
body.dark-mode .tier-badge.lvl-3 { background: rgba(225, 29, 72, 0.7); }


/* Events Grid */
#events-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 80px;
}
.event-card { background: var(--card-bg); padding: 15px; border-radius: 20px; border: 1px solid var(--border-color); box-shadow: 0 4px 15px rgba(0,0,0,0.02); cursor: pointer; transition: transform 0.15s ease, box-shadow 0.15s ease; }
.event-card:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.event-photo { width: 100%; aspect-ratio: 16/9; border-radius: 12px; object-fit: cover; margin-bottom: 12px; }
.event-card h4 { font-size: 16px; font-weight: 600; color: #1a1a1a; margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.event-card-info { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; }
.event-card-meta { font-size: 12px; color: #999; }

/* Modal */
.modal-overlay, .modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; align-items: flex-end; backdrop-filter: blur(8px); }
.modal-content, .onboarding-card { background: #fff; width: 100%; max-width: 500px; margin: 0 auto; border-radius: 30px 30px 0 0; padding: 50px 30px; position: relative; }
.onboarding-card { border-radius: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; text-align: center; }

.close-btn {
    position: absolute; top: 12px; right: 12px; width: 44px; height: 44px;
    border: none; background: rgba(0,0,0,0.05); color: #333;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 22px; cursor: pointer; z-index: 10;
    transition: background 0.15s ease, transform 0.12s ease;
}
.close-btn:active { transform: scale(0.9); background: rgba(0,0,0,0.12); }

/* Wizard */
.wizard-actions {
  position: absolute;
  bottom: max(40px, calc(env(safe-area-inset-bottom, 0px) + 20px));
  left: 30px; right: 30px;
  display: flex; align-items: center;
}
.wizard-back-icon {
    width: 50px; height: 50px; border-radius: 50%; border: 1px solid #eee; background: none; font-size: 20px; color: #999; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: transform 0.12s ease, background 0.12s ease;
}
.wizard-back-icon:active { transform: scale(0.95); background: #f3f4f6; }
.wizard-next-btn {
    background: #000; color: #fff; border: none; padding: 15px 40px; border-radius: 12px; font-weight: 600; font-size: 15px; cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.wizard-next-btn:active { transform: scale(0.96); filter: brightness(1.2); }

/* Tier Selection */
.tier-select-grid { display: grid; gap: 10px; }
.tier-option { cursor: pointer; position: relative; }
.tier-option input { position: absolute; opacity: 0; }
.tier-opt-inner { border: 1px solid #eee; padding: 18px; border-radius: 15px; transition: border-color 0.2s ease, background 0.2s ease, transform 0.12s ease; color: var(--text-primary); background: var(--card-bg); }
.tier-opt-inner strong { color: var(--text-primary); }
.tier-option:active .tier-opt-inner { transform: scale(0.98); }
.tier-option.disabled { cursor: default; opacity: 0.4; pointer-events: none; }
.tier-option input:checked + .tier-opt-inner { border-color: var(--accent-color); background: var(--card-bg); color: var(--text-primary); }

/* Toggle Card */
.toggle-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}
.toggle-card span { font-size: 14px; font-weight: 600; }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: #000; }

/* Wizard Step Spacing */
.wizard-step h3 { font-family: 'Outfit'; font-size: 20px; margin-bottom: 20px; }

/* Modal Tabs */
.modal-tabs { display: flex; justify-content: center; gap: 20px; margin-bottom: 20px; }
.modal-tab {
    background: none; border: none; font-size: 14px; font-weight: 600; color: #767676; cursor: pointer; padding: 10px 0; border-bottom: 2px solid transparent;
}
.modal-tab.active { color: #000; border-bottom-color: #000; }
.tab-content.hidden { display: none; }
.tab-content { animation: fadeInUp 0.18s ease; }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }



/* Filter Tabs */
.filter-tabs { display: flex; gap: 10px; margin: 15px 0; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; overscroll-behavior-x: contain; }
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab { background: none; border: 1px solid #eee; padding: 8px 18px; border-radius: 20px; font-size: 11px; color: #767676; cursor: pointer; white-space: nowrap; transition: all 0.18s ease; }
.filter-tab:active { transform: scale(0.95); }
.filter-tab.active { background: var(--accent-color); color: var(--accent-contrast); border-color: var(--accent-color); }

/* Bottom Nav */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 500px; background: rgba(255,255,255,0.9); backdrop-filter: blur(10px); display: flex; justify-content: space-around; padding: 12px 0 calc(12px + var(--safe-bottom)); border-top: 1px solid #f0f0f0; z-index: 100; }
.nav-item { background: none; border: none; font-size: 26px; color: #ddd; cursor: pointer; }
.nav-item.active { color: #000; }

.save-btn { width: 100%; padding: 18px; border-radius: 12px; border: none; background: var(--accent-color); color: var(--accent-contrast); font-weight: 600; cursor: pointer; font-size: 15px; min-height: 44px; }
.danger-btn { background: #e11d48 !important; color: #fff !important; }

/* Private note (friend detail) */
.private-note-textarea { height: 80px; font-size: 13px; background: #fffcf0; padding: 10px; border-radius: 8px; border: 1px solid #fef3c7 !important; resize: none; margin-bottom: 0; }
.private-note-save-btn { padding: 10px; font-size: 13px; background: #fef3c7; color: #92400e; }
body.dark-mode .private-note-textarea { background: #2a2410; border-color: #4a3f1a !important; color: var(--text-primary); }
body.dark-mode .private-note-save-btn { background: #3a2f0e; color: #fcd34d; }
.hidden { display: none !important; }

/* RSVP */
.attendee-item { display: flex; align-items: center; gap: 15px; padding: 12px 0; border-bottom: 1px solid #f9f9f9; }
.attendee-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.attendee-name { font-size: 13px; font-weight: 600; }
.attendee-item-bringing { font-size: 12px; color: #777; margin-top: 2px; }

/* Buttons */
.social-login-grid { display: grid; gap: 10px; width: 100%; margin-top: 20px; }
.social-btn { padding: 18px; border: none; border-radius: 12px; color: #fff; font-weight: 700; cursor: pointer; }
.line-btn { background: #06c755; }
.google-btn { background: #4285f4; }
.icon-btn { background: none; border: none; font-size: 32px; cursor: pointer; padding: 5px; transition: transform 0.15s ease; min-width: 44px; min-height: 44px; display: flex; align-items: center; justify-content: center; color: var(--text-primary); }
.icon-btn:active { transform: scale(0.85); }
.header-actions { position: absolute; top: 40px; right: 20px; }

/* ===================== */
/* Toast System          */
/* ===================== */
#toast-container {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: calc(100% - 40px);
  max-width: 440px;
}
.toast {
  padding: 14px 18px;
  border-radius: 16px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.18);
  animation: toastIn 0.35s cubic-bezier(0.4,0,0.2,1);
  width: 100%;
}
.toast-success { background: #1a1a1a; color: #fff; }
.toast-error { background: #e11d48; color: #fff; }
.toast-info { background: #4285f4; color: #fff; }
.toast-warning { background: #f59e0b; color: #292524; }
@keyframes toastIn {
  from { opacity:0; transform: translateY(-20px) scale(0.95); }
  to { opacity:1; transform: translateY(0) scale(1); }
}
@keyframes toastOut {
  from { opacity:1; transform: scale(1); }
  to { opacity:0; transform: scale(0.9); }
}

/* ===================== */
/* Custom Dialog         */
/* ===================== */
#custom-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(10px);
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
#custom-dialog-box {
  background: #fff;
  width: 100%;
  max-width: 500px;
  border-radius: 28px 28px 0 0;
  padding: 30px 24px calc(30px + env(safe-area-inset-bottom, 0px));
  animation: slideUp 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}
#custom-dialog-overlay.closing #custom-dialog-box { animation: slideDown 0.25s cubic-bezier(0.4, 0, 1, 1) forwards; }
#custom-dialog-box h4 {
  font-family: 'Outfit';
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 10px;
}
#custom-dialog-box p {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.6;
}
.dialog-actions {
  display: grid;
  gap: 10px;
}
.dialog-btn {
  width: 100%;
  padding: 16px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.1s ease, filter 0.1s ease;
}
.dialog-btn:active { transform: scale(0.97); filter: brightness(0.92); }
.dialog-btn-primary { background: #000; color: #fff; }
.dialog-btn-danger { background: #fdeaea; color: #e11d48; }
.dialog-btn-cancel { background: #f3f4f6; color: #666; }
#custom-dialog-input {
  width: 100%;
  padding: 14px 16px;
  border: 1.5px solid #eee;
  border-radius: 12px;
  font-size: 15px;
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.2s;
}
#custom-dialog-input:focus { border-color: #000; }

/* ===================== */
/* Settings Sections     */
/* ===================== */
.settings-section {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}
.settings-section-title {
  font-family: 'Outfit';
  font-size: 13px;
  font-weight: 700;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.settings-label {
  font-size: 12px;
  color: #666;
  display: block;
  margin-bottom: 4px;
}
.privacy-field {
  margin-bottom: 20px;
}
.privacy-field-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.privacy-select {
  font-size: 11px;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 4px 8px;
  background: #fafafa;
  color: #666;
  cursor: pointer;
  outline: none;
}

/* ===================== */
/* Wizard Progress       */
/* ===================== */
.wizard-progress-bar {
  margin-bottom: 24px;
}
.wizard-progress-steps {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
  overflow: visible;
  min-width: 0;
}
.wps {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eee;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  transition: all 0.3s;
  flex-shrink: 0;
}
.wps.active { background: #000; color: #fff; }
.wps.done { background: #22c55e; color: #fff; }
.wps-line { flex: 1; height: 3px; background: #eee; transition: background 0.3s; }
.wps-line.done { background: #22c55e; }
.wizard-step-label {
  font-size: 14px;
  color: #999;
  font-weight: 600;
}

/* Quick Templates */
.quick-templates { margin-top: 30px; }
.template-chip {
  padding: 8px 14px;
  border: 1px solid #eee;
  border-radius: 20px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.template-chip:hover { border-color: #000; background: #000; color: #fff; }
.template-chip:active { transform: scale(0.93); }

/* Event Input Group */
.event-input-group { margin-bottom: 8px; }
.event-input-label { font-size: 13px; font-weight: 600; color: #333; display: block; margin-bottom: 8px; }

/* Capacity Buttons */
.capacity-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #eee;
  background: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}
.capacity-btn:hover { border-color: #000; }
.capacity-btn:active { transform: scale(0.9); background: #f3f4f6; }

/* Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 28px;
  cursor: pointer;
  transition: 0.3s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + .toggle-slider { background: var(--accent-color, #000); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }
body.dark-mode .toggle-slider { background: #444; }

/* ===================== */
/* Profile Page          */
/* ===================== */
.profile-edit-btn {
  background: #f3f4f6;
  border: none;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #333;
  transition: all 0.2s;
}
.profile-edit-btn:hover { background: #e5e7eb; }

/* ===================== */
/* v3 additions          */
/* ===================== */
.avatar-container.synced {
  box-shadow: 0 0 0 2px #3b82f6;
  border-color: #3b82f6;
}
body.dark-mode .avatar-container.synced {
  box-shadow: 0 0 0 2px #60a5fa;
  border-color: #60a5fa;
}
.avatar-container { position: relative; }
#qr-canvas svg { width: 100%; height: 100%; display: block; }
#qr-actions { display: grid; gap: 8px; }
#qr-actions.hidden { display: none; }
.social-btn:disabled, .save-btn:disabled { opacity: 0.6; }

/* ═══════ v3.3: ナビゲーション（SVGアイコン） ═══════ */
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: #767676; transition: color 0.15s; }
.nav-item svg { width: 23px; height: 23px; }
.nav-item .nav-label { font-size: 9px; font-weight: 600; letter-spacing: 0.05em; }
.nav-item.active { color: var(--accent-color); }
.nav-item.active svg { width: 25px; height: 25px; }
.nav-item.active .nav-label { font-weight: 700; }
body.dark-mode .nav-item { color: #8a8a8a; }

/* ═══════ v3.3: 並び替えコントロール ═══════ */
.sort-control { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.sort-control .sort-label { font-size: 10px; color: #bbb; margin-right: 2px; }
.sort-chip { background: none; border: none; font-size: 11px; color: #767676; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.sort-chip.active { background: var(--accent-color); color: var(--accent-contrast); font-weight: 700; }

/* ═══════ v3.3: 季節カード（エディトリアル調） ═══════ */
.seasonal-card { background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 16px; padding: 16px 18px 14px; margin-bottom: 14px; position: relative; box-shadow: 0 2px 12px rgba(0,0,0,0.03); overflow: hidden; }
.seasonal-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sc-accent, #888); }
.seasonal-card .sc-emoji { position: absolute; right: -6px; bottom: -14px; font-size: 64px; opacity: 0.07; pointer-events: none; }
.seasonal-card .sc-kicker { font-size: 9px; font-weight: 700; letter-spacing: 0.14em; color: var(--sc-accent, #888); margin-bottom: 6px; }
.seasonal-card .sc-title { font-family: 'Outfit', 'Inter', sans-serif; font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.seasonal-card .sc-msg { font-size: 12px; color: #666; line-height: 1.6; margin-bottom: 12px; }
.seasonal-card .sc-cta { font-size: 12px; font-weight: 700; padding: 9px 16px; border-radius: 10px; border: none; background: var(--sc-accent, #333); color: #fff; cursor: pointer; }
.seasonal-card .sc-item { font-size: 11px; color: #777; text-decoration: none; border: 1px solid #eee; border-radius: 14px; padding: 6px 12px; background: #fafafa; }
.seasonal-card .sc-dismiss { position: absolute; top: 10px; right: 12px; background: none; border: none; color: #ccc; font-size: 16px; cursor: pointer; padding: 2px 6px; }
body.dark-mode .seasonal-card { background: #161616; border-color: #242424; }
body.dark-mode .seasonal-card .sc-item { background: #1d1d1d; border-color: #2a2a2a; color: #999; }

/* ═══════ v3.3: 誕生日セクション ═══════ */
.bday-card { background: #fff; border: 1px solid #f0f0f0; border-left: 3px solid #d97706; border-radius: 14px; padding: 12px 16px; margin-bottom: 18px; box-shadow: 0 2px 12px rgba(0,0,0,0.03); }
.bday-card .bd-kicker { font-size: 9px; font-weight: 700; letter-spacing: 0.14em; color: #d97706; margin-bottom: 10px; }
body.dark-mode .bday-card { background: #161616; border-color: #242424; border-left-color: #d97706; }

/* ═══════ v3.3: ⚡フラッシュイベント ═══════ */
.event-card.flash { border: 1px solid #fde68a; box-shadow: 0 4px 16px rgba(217,119,6,0.12); }
.flash-badge { display: inline-flex; align-items: center; gap: 4px; background: #b45309; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 10px; }
.event-card.public { border: 1px solid #cce0ff; background: #f6f9ff; }
body.dark-mode .event-card.public { background: #0f1830; border-color: #1e3a6b; }
.public-badge { display: inline-flex; align-items: center; gap: 4px; background: #1976d2; color: #fff; font-size: 9px; font-weight: 700; letter-spacing: 0.06em; padding: 3px 9px; border-radius: 10px; }

/* ═══════ v3.5: 言語切替 ═══════ */
.lang-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.lang-chip { background: none; border: 1px solid #eee; padding: 8px 16px; border-radius: 20px; font-size: 12px; color: #999; cursor: pointer; }
.lang-chip.active { background: var(--accent-color); color: var(--accent-contrast); border-color: var(--accent-color); }
body.dark-mode .lang-chip { border-color: #2a2a2a; }

/* ═══════ v3.6: アクセントカラー・パレット / 外観トグル ═══════ */
.accent-picker { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.accent-dot { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; box-shadow: 0 0 0 1px #e5e5e5 inset; transition: transform 0.12s; }
.accent-dot:hover { transform: scale(1.1); }
.accent-dot.active { border-color: var(--text-primary); box-shadow: 0 0 0 2px var(--bg-color) inset, 0 2px 8px rgba(0,0,0,0.18); }
.accent-dot.accent-auto { background: linear-gradient(135deg, #111 50%, #fff 50%); }
.appearance-toggle { display: inline-flex; gap: 6px; background: #f3f4f6; border-radius: 12px; padding: 4px; }
body.dark-mode .appearance-toggle { background: #1a1a1a; }
.appearance-btn { border: none; background: none; padding: 8px 16px; border-radius: 9px; font-size: 12px; color: var(--text-secondary); cursor: pointer; }
.appearance-btn.active { background: var(--card-bg); color: var(--text-primary); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,0.08); }
body.dark-mode .appearance-btn.active { background: #2a2a2a; }

/* ═══════ v4: UX micro-interactions ═══════ */
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.friend-card { animation: cardIn 0.25s ease-out backwards; }
.event-card { animation: cardIn 0.3s ease-out backwards; }
.seasonal-card { animation: cardIn 0.3s ease-out backwards; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ═══════ Accessibility: Focus-visible ═══════ */
:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
.close-btn:focus-visible,
.nav-item:focus-visible,
.icon-btn:focus-visible,
.save-btn:focus-visible,
.social-btn:focus-visible,
.dialog-btn:focus-visible,
.template-chip:focus-visible,
.filter-tab:focus-visible,
.sort-chip:focus-visible,
.modal-tab:focus-visible,
.wizard-back-icon:focus-visible,
.wizard-next-btn:focus-visible,
.capacity-btn:focus-visible,
.appearance-btn:focus-visible,
.lang-chip:focus-visible,
.accent-dot:focus-visible,
.profile-edit-btn:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
.privacy-select:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}
.albus-input:focus-visible {
    outline: none; /* already has border-bottom focus style */
}

/* ═══════ Social link items & chips ═══════ */
.social-item { padding: 12px; margin-bottom: 8px; border: 1px solid var(--border-color); border-radius: 10px; background: var(--card-bg); }
.social-link-chip {
    display: inline-block; padding: 6px 14px; border: 1px solid var(--border-color); border-radius: 20px;
    font-size: 12px; color: var(--text-primary); text-decoration: none; margin: 0 6px 8px 0; transition: background 0.15s;
}
.social-link-chip:active { background: var(--card-bg); }

body.dark-mode .close-btn { background: rgba(255,255,255,0.08); color: #ccc; }
body.dark-mode .close-btn:active { background: rgba(255,255,255,0.15); }
body.dark-mode #custom-dialog-box { background: #1a1a1a; }
body.dark-mode #custom-dialog-box h4 { color: #fff; }
body.dark-mode .dialog-btn-primary { background: #fff; color: #000; }
body.dark-mode .dialog-btn-cancel { background: #2a2a2a; color: #999; }
body.dark-mode .tier-opt-inner { border-color: #333; background: #1a1a1a; color: #ffffff; }
body.dark-mode .tier-opt-inner strong { color: #ffffff; }
body.dark-mode .tier-option input:checked + .tier-opt-inner { border-color: var(--accent-color); background: #2a2a2a; color: #ffffff; }

/* ═══════ Guest companion card (RSVP) ═══════ */
.guest-card { padding: 10px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 5px; }
.guest-card-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 8px; }

/* ═══════ Social links (settings + friend detail) ═══════ */
.social-item { padding: 10px; background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 8px; margin-bottom: 8px; }
.social-type-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.social-remove-btn { background: none; border: none; font-size: 20px; color: var(--text-secondary); cursor: pointer; padding: 0 4px; line-height: 1; }
.social-remove-btn:hover { color: #e11d48; }
.social-link-chip { display: inline-block; padding: 6px 14px; border: 1px solid var(--border-color); border-radius: 20px; font-size: 12px; color: var(--text-primary); text-decoration: none; margin: 0 6px 8px 0; transition: background 0.15s; }
.social-link-chip:hover { background: var(--card-bg); }
body.dark-mode .social-item { background: #1a1a1a; border-color: #333; }
body.dark-mode .social-link-chip { border-color: #333; }
body.dark-mode .social-link-chip:hover { background: #222; }

/* ═══════ Dark mode: ツアーツールチップ ═══════ */
body.dark-mode #tour-tooltip { box-shadow: 0 8px 40px rgba(0,0,0,0.6); }

/* ═══════ Dark mode: トースト・その他 ═══════ */
body.dark-mode .toast-success { background: #3a3a3a; }
body.dark-mode .event-card h4 { color: #e0e0e0; }
body.dark-mode .friend-card h4 { color: #999; }

/* ═══════ Modal scroll (iOS momentum) ═══════ */
.modal-content, .onboarding-card { -webkit-overflow-scrolling: touch; }

/* ═══════ Empty state ═══════ */
.empty-state {
    display: flex; flex-direction: column; align-items: center;
    padding: 60px 24px 40px; text-align: center; gap: 12px;
}
.empty-state-icon { font-size: 48px; opacity: 0.25; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.empty-state p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; max-width: 260px; }
.empty-state-cta {
    margin-top: 8px; padding: 14px 28px; border-radius: 12px;
    background: var(--accent-color); color: var(--accent-contrast);
    font-size: 14px; font-weight: 600; border: none; cursor: pointer;
    transition: transform 0.12s ease, filter 0.12s ease;
}
.empty-state-cta:active { transform: scale(0.96); filter: brightness(0.88); }

/* ═══════ Nav item: 最小タッチターゲット保証 ═══════ */
.nav-item { min-width: 44px; min-height: 44px; justify-content: center; }

/* ═══════ Wizard: モーダル内コンテンツが bottom ボタンと重ならない ═══════ */
.wizard-step { padding-bottom: 100px; }

/* ═══════ スクロール可能モーダルのパディング確保 ═══════ */
.modal-content { overflow-y: auto; max-height: 92vh; padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px)); overscroll-behavior: contain; }

/* ═══════ 日時・セレクトのテーマ対応 ═══════ */
/* color-scheme は OS ではなく「アプリのテーマ」に固定する。
   'light dark' だと OS=ダーク・アプリ=ライト時に native input が白文字になり、
   白背景に対して見えなくなる（white-on-white）。テーマクラスに連動させて防ぐ。 */
input[type="datetime-local"], input[type="date"], input[type="time"], select {
    color-scheme: light;
    color: var(--text-primary);
}
body.dark-mode input[type="datetime-local"],
body.dark-mode input[type="date"],
body.dark-mode input[type="time"],
body.dark-mode select { color-scheme: dark; }

/* ═══════ テンプレートチップ: 選択状態 ═══════ */
.template-chip.active { background: var(--accent-color); color: var(--accent-contrast); border-color: var(--accent-color); }
body.dark-mode .template-chip:active { background: #2a2a2a; }

/* ═══════ イベント招待ランディング ═══════ */
#event-landing-overlay {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
}
#el-flash-screen, #el-ticket-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
}

/* ── Flash モード（全画面グラデーション） ── */
#el-flash-screen {
    padding: calc(env(safe-area-inset-top,0px) + 28px) 28px calc(env(safe-area-inset-bottom,0px) + 32px);
    background: linear-gradient(150deg, #78350f 0%, #b45309 45%, #d97706 100%);
    overflow: hidden;
}
.el-deco {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.el-deco-1 { width:360px; height:360px; background:rgba(255,255,255,.06); top:-100px; right:-80px; }
.el-deco-2 { width:220px; height:220px; background:rgba(255,255,255,.04); bottom:120px; left:-70px; }
.el-brand {
    display: flex; align-items: center; gap: 7px;
    color: rgba(255,255,255,.5);
    font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 13px; letter-spacing: 0.5px;
    position: relative; z-index: 1;
}
.el-body { flex:1; display:flex; flex-direction:column; justify-content:center; padding:20px 0 32px; position:relative; z-index:1; }
.el-kicker { font-size:11px; font-weight:700; color:rgba(255,255,255,.5); letter-spacing:.12em; text-transform:uppercase; margin:0 0 18px; }
.el-title {
    font-family: 'Outfit', sans-serif; font-size: clamp(28px,8vw,38px); font-weight:800;
    color:#fff; line-height:1.2; letter-spacing:-0.5px; margin:0 0 32px; padding:0;
}
.el-meta { display:flex; flex-direction:column; gap:14px; }
.el-meta-row { display:flex; align-items:flex-start; gap:10px; color:rgba(255,255,255,.7); font-size:15px; line-height:1.45; }
.el-meta-row svg { flex-shrink:0; margin-top:2px; }
.el-actions { display:flex; flex-direction:column; gap:12px; position:relative; z-index:1; }
.el-join-btn {
    width:100%; padding:17px; border:none; border-radius:16px;
    background:#fff; color:#92400e;
    font-family:'Outfit',sans-serif; font-size:16px; font-weight:700; cursor:pointer;
    transition:transform .12s, filter .12s;
}
.el-join-btn:active { transform:scale(.97); filter:brightness(.95); }
.el-skip-btn { background:none; border:none; color:rgba(255,255,255,.38); font-size:13px; cursor:pointer; padding:8px; text-align:center; }

/* ===== 通常イベント: ヴィンテージ紙チケット（左右分割・横長・全画面） ===== */
#el-ticket-screen {
    background: #1a1410;
    /* チケットの配色変数。既定＝生成り本体×濃紺文字×金装飾。
       開催日のイベント/季節で JS が上書きする（行事は背景=paperから変える）。 */
    --tk-accent: #C4973E;
    --tk-accent-rgb: 196,151,62;
    --tk-kicker: #8B6914;
    --tk-paper: #FAF5E8;   /* 本体の地色 */
    --tk-stub: #1C2553;    /* 半券の地色 */
    --tk-ink: #1C2553;     /* 本体の文字色 */
    --tk-ink-rgb: 28,37,83;
    --tk-stub-accent: var(--tk-accent);          /* 半券のADMIT/矢印/補足の色（地色が赤等のときは明色に） */
    --tk-stub-accent-rgb: var(--tk-accent-rgb);
}

.el-vt-bg {
    position: absolute; inset: 0;
    background: #1a1410;
    background-image: radial-gradient(ellipse at 20% 50%, rgba(var(--tk-accent-rgb),.07) 0%, transparent 55%),
                      radial-gradient(ellipse at 80% 50%, rgba(var(--tk-accent-rgb),.04) 0%, transparent 55%);
}

/*
  rotate(-90deg) のマッピング（CW傾けで横長チケットに見える）:
  element LEFT  → portrait下端 → landscape右
  element RIGHT → portrait上端 → landscape左
  flex-direction:row で [stub(LEFT) | tear | main(RIGHT)] にすると
  landscape では [main(左・チケット本体) | tear | stub(右・半券)] になる
*/
.el-vt-land-root {
    position: absolute;
    /* 表示比率(幅:高さ)を固定し、端末ごとの画面比に依存させない＝どのイベントでも同じ形。
       回転前の要素なので width=画面上の「高さ」、height=画面上の「幅」に対応する。
       画面に収まる範囲で最大化し、暗い背景の上に中央配置する。 */
    --el-ticket-ar: 0.52;  /* 表示上の 幅:高さ（縦長チケット） */
    /* 画面いっぱいだと端が見切れるため少し余白を残す（94→86vh/vw） */
    width: min(86vh, calc(86vw / var(--el-ticket-ar)));
    height: calc(var(--el-ticket-ar) * min(86vh, calc(86vw / var(--el-ticket-ar))));
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    /* row-reverse: 正しい向き（Melow が上）で読んだとき半券が「右」に来るようにする */
    display: flex; flex-direction: row-reverse;
    align-items: stretch;
    box-sizing: border-box;
    /* 紙チケットらしく角は丸めない（直角）。overflow:hidden でミシン目ノッチは内側半円だけ残す */
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.55);
}

/* 半券スタブ列（element LEFT = landscape右）。QR＋参加ボタン＋スキップ */
.el-vt-stub-col {
    width: 200px; flex-shrink: 0;
    background: var(--tk-stub);
    display: flex; flex-direction: column;
    align-items: stretch;
    position: relative; overflow: hidden;
}
/* 半券上部のQRエリア（濃紺の上に白いQRチップ） */
.el-vt-stub-qr {
    flex-shrink: 0;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 7px;
    padding: 22px 14px 16px;
    position: relative; z-index: 1;
}
.el-vt-stub-col::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(var(--tk-accent-rgb),.1) 0%, transparent 70%);
    pointer-events: none;
}

/* 参加するボタン: スタブ列の大部分を占める */
.el-vt-stub {
    flex: 1; background: none; border: none;
    cursor: pointer;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 10px; padding: 20px 12px;
    transition: background .15s;
    position: relative; z-index: 1;
}
.el-vt-stub:active { background: rgba(255,255,255,.06); }
.el-vt-stub-main {
    font-family: 'Outfit', sans-serif;
    font-size: 20px; font-weight: 900; color: #FAF5E8; letter-spacing: -0.3px;
}
.el-vt-stub-sub {
    font-size: 9px; color: rgba(var(--tk-stub-accent-rgb),.75); line-height: 1.7; text-align: center;
}
.el-vt-stub-arrow { font-size: 16px; color: var(--tk-stub-accent); opacity: .8; }

/* スキップ: スタブ列の下端 */
.el-vt-skip {
    background: none; border: none;
    color: rgba(250,245,232,.2); font-size: 9px;
    cursor: pointer; padding: 8px 12px; text-align: center; flex-shrink: 0;
    position: relative; z-index: 1;
}

/* 縦ミシン目（element中央 = landscape中央の縦線） */
.el-vt-tear {
    width: 0; flex-shrink: 0; position: relative;
    border-left: 2px dashed rgba(var(--tk-accent-rgb),.55);
}
.el-vt-notch {
    position: absolute; width: 22px; height: 22px;
    border-radius: 50%; background: #1a1410;
    left: 50%; transform: translateX(-50%); z-index: 2;
}
.el-vt-notch-t { top: -11px; }
.el-vt-notch-b { bottom: -11px; }

/* チケット本体（element RIGHT = landscape左） */
.el-vt-main {
    flex: 1;
    background: var(--tk-paper);
    padding: 24px 36px 20px;
    position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}
.el-vt-main::before {
    content: ''; position: absolute; inset: 10px;
    border: 1px solid rgba(var(--tk-accent-rgb),.22);
    pointer-events: none; z-index: 0;
}
.el-vt-main::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(160deg, rgba(255,255,255,.06) 0%, transparent 45%);
    pointer-events: none; z-index: 0;
}

/* コーナー装飾 */
.el-vt-corner { position: absolute; z-index: 1; pointer-events: none; color: var(--tk-accent); }
.el-vt-c-tl { top: 6px; left: 6px; }
.el-vt-c-tr { top: 6px; right: 6px; }
.el-vt-c-bl { bottom: 6px; left: 6px; }
.el-vt-c-br { bottom: 6px; right: 6px; }

/* ヘッダー */
.el-vt-header {
    display: flex; flex-direction: column; gap: 5px;
    padding-bottom: 12px; position: relative; z-index: 1; flex-shrink: 0;
}
.el-vt-header-brand-row {
    display: flex; align-items: center; gap: 12px;
}
.el-vt-deco-rule {
    width: 100%; display: flex; align-items: center; gap: 8px; color: var(--tk-accent);
}
.el-vt-deco-rule::before, .el-vt-deco-rule::after {
    content: ''; flex: 1; height: 1px;
    background: linear-gradient(90deg, transparent, var(--tk-accent), transparent);
}
.el-vt-deco-dot { font-size: 8px; }
.el-vt-brand { display: flex; align-items: center; gap: 7px; color: var(--tk-ink); }
.el-vt-brand-name {
    font-family: 'Outfit', sans-serif; font-weight: 900;
    font-size: 18px; letter-spacing: 0.15em; color: var(--tk-ink);
}
.el-vt-invite-label {
    font-family: 'Outfit', sans-serif; font-size: 9px; font-weight: 700;
    letter-spacing: 0.35em; color: var(--tk-accent); flex-shrink: 0;
}
.el-vt-ticket-num {
    font-family: 'Outfit', sans-serif; font-size: 9px; font-weight: 400;
    color: rgba(var(--tk-ink-rgb),.4); letter-spacing: 0.1em;
    margin-left: auto; flex-shrink: 0;
}

/* ボディ: 情報 + QR の横並び */
.el-vt-body {
    flex: 1; display: flex; flex-direction: row;
    gap: 0; align-items: stretch; position: relative; z-index: 1;
    overflow: hidden;
}

/* イベント情報カラム（QR移動後は本体幅いっぱい） */
.el-vt-info-col {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 12px; min-height: 0;
}
.el-vt-kicker {
    font-size: 10px; font-weight: 700; color: var(--tk-kicker);
    letter-spacing: 0.2em; text-transform: uppercase; margin: 0;
}
.el-vt-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(20px, 5vw, 30px); font-weight: 900;
    color: var(--tk-ink); line-height: 1.2; letter-spacing: -0.5px;
    text-align: center; margin: 0; padding: 0;
}
.el-vt-ornament { font-size: 8px; color: var(--tk-accent); letter-spacing: 0.6em; opacity: .7; }
.el-vt-meta {
    width: 100%; display: flex; flex-direction: column; gap: 8px;
    border-top: 1px solid rgba(var(--tk-accent-rgb),.3);
    border-bottom: 1px solid rgba(var(--tk-accent-rgb),.3);
    padding: 10px 0;
}
.el-vt-meta-row {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: 13px; line-height: 1.4;
}
.el-vt-meta-label {
    font-family: 'Outfit', sans-serif; font-size: 9px; font-weight: 700;
    letter-spacing: 0.15em; color: var(--tk-kicker); text-transform: uppercase;
    min-width: 26px; padding-top: 2px; flex-shrink: 0;
}
.el-vt-meta-val { color: var(--tk-ink); font-weight: 500; }
/* 詳細（説明・持ち物など）。長文でも崩れないよう最大6行でクランプ */
.el-vt-desc-row[hidden] { display: none; }
.el-vt-desc {
    font-weight: 400; line-height: 1.55;
    white-space: pre-wrap; word-break: break-word;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 6;
    overflow: hidden;
}

/* QRチップ（半券＝濃紺の上。白カードに載せてスキャナビリティ確保） */
.el-vt-qr-canvas {
    width: 104px; height: 104px; flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    padding: 7px; box-sizing: border-box;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,.28);
}
.el-vt-qr-canvas svg { width: 100%; height: 100%; display: block; }
.el-vt-admit {
    font-family: 'Outfit', sans-serif; font-size: 9px; font-weight: 900;
    letter-spacing: 0.3em; color: var(--tk-stub-accent); margin: 0; text-align: center;
}
.el-vt-qr-hint {
    font-size: 8px; color: rgba(250,245,232,.55);
    margin: 0; text-align: center; letter-spacing: 0.05em;
}
