/* ===== リセット & ベース ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #5d6773;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #d97706;
    --light-color: rgba(245, 248, 251, 0.94);
    --dark-color: #101418;
    --bg-color: #f5f7f9;
    --card-bg: rgba(255, 255, 255, 0.9);
    --surface-solid: #ffffff;
    --surface-muted: rgba(245, 248, 251, 0.94);
    --text-color: #101418;
    --text-muted: #5d6773;
    --border-color: rgba(148, 163, 184, 0.28);
    --shadow: 0 18px 48px rgba(15, 23, 42, 0.08);
    --shadow-hover: 0 24px 64px rgba(15, 23, 42, 0.12);
    --focus-ring: rgba(37, 99, 235, 0.16);
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Hiragino Sans", "Yu Gothic", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    overflow-wrap: anywhere;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* ===== ナビゲーション ===== */
.navbar {
    background: var(--card-bg);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 5px;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary-color);
    background: var(--light-color);
}

.btn-logout {
    background: var(--danger-color) !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
}

.btn-logout:hover {
    background: #c82333 !important;
}

.btn-signup {
    background: var(--primary-color) !important;
    color: white !important;
    padding: 0.5rem 1rem !important;
    border-radius: 5px;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ===== コンテナ ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== アラート ===== */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.alert-success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.alert-error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.alert-close:hover {
    opacity: 1;
}

/* ===== ボタン ===== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    font-size: 1rem;
    font-weight: 500;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===== ヒーローセクション ===== */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), #6DB3F2);
    color: white;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero .btn-secondary {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
}

.hero .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ===== フィーチャーカード ===== */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-muted);
}

/* ===== 認証フォーム ===== */
.auth-container {
    max-width: 450px;
    margin: 0 auto;
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.75rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"] {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    flex: 1;
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.6;
    transition: opacity 0.3s;
    padding: 0.5rem;
}

.password-toggle:hover {
    opacity: 1;
}

.password-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
    display: block;
}

.validation-status {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    min-height: 1.25rem;
}

.validation-status.valid {
    color: var(--success-color);
}

.validation-status.invalid {
    color: var(--danger-color);
}

/* 画像アップロード */
.image-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.image-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(74, 144, 217, 0.05);
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
}

.upload-icon {
    font-size: 2.5rem;
}

.image-preview {
    display: none;
}

.image-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.auth-divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.auth-divider::before {
    left: 0;
}

.auth-divider::after {
    right: 0;
}

.auth-divider span {
    background: var(--card-bg);
    padding: 0 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-muted);
}

.auth-footer a {
    color: var(--primary-color);
    font-weight: 500;
}

/* ===== ダッシュボード ===== */
.dashboard-header {
    margin-bottom: 2rem;
}

.dashboard-header h2 {
    margin-bottom: 0.5rem;
}

.user-info {
    color: var(--text-muted);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--light-color);
    font-size: 1.1rem;
}

.profile-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.profile-details p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.location-list,
.request-list {
    list-style: none;
}

.location-item,
.request-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--light-color);
    gap: 0.75rem;
}

.location-item:last-child,
.request-item:last-child {
    border-bottom: none;
}

.small-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.friend-name {
    font-weight: 500;
}

.friend-username {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.request-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.online-status {
    margin-left: auto;
    font-size: 0.8rem;
}

.empty-message {
    color: var(--text-muted);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
}

.more-link {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.more-link a {
    color: var(--primary-color);
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: var(--light-color);
    border: none;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    font-size: 0.9rem;
}

.action-btn:hover {
    background: var(--border-color);
    transform: translateY(-2px);
}

.action-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ===== プロフィールページ ===== */
.profile-page {
    max-width: 800px;
    margin: 0 auto;
}

.profile-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.profile-image-large {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
}

.profile-info h1 {
    margin-bottom: 0.5rem;
}

.profile-info .username {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.profile-info .introduction {
    color: var(--text-color);
    margin-top: 0.75rem;
}

.profile-stats {
    display: flex;
    justify-content: space-around;
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.75rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.profile-details-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.profile-details-card h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
}

.details-list {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 0.75rem 1rem;
}

.details-list dt {
    font-weight: 500;
    color: var(--text-muted);
}

.details-list dd {
    color: var(--text-color);
}

/* ===== チャットルーム ===== */
.rooms-page h2 {
    margin-bottom: 1.5rem;
}

.rooms-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.room-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

.room-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.room-avatar img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.default-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.room-info {
    flex: 1;
    min-width: 0;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.room-name {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.room-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.last-message {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unread-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.room-type {
    font-size: 0.7rem;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    background: var(--light-color);
    color: var(--text-muted);
}

/* ===== マップページ ===== */
.map-page {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
    height: calc(100vh - 150px);
}

.map-container {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

#map {
    height: 100%;
    width: 100%;
}

.map-sidebar {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow-y: auto;
}

.map-sidebar h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light-color);
    font-size: 1rem;
}

.friends-on-map,
.spots-list,
.events-list {
    margin-bottom: 1.5rem;
}

.friend-location-item,
.spot-item,
.event-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.friend-location-item:hover,
.spot-item:hover,
.event-item:hover {
    background: var(--light-color);
}

.friend-location-info {
    display: flex;
    flex-direction: column;
}

.location-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.my-location-marker {
    font-size: 30px;
    text-align: center;
}

/* ===== フレンド管理ページ ===== */
.friends-page {
    max-width: 900px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    margin: 0;
}

.back-link {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.back-link:hover {
    color: var(--primary-color);
}

/* タブナビゲーション */
.tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    background: var(--light-color);
    padding: 0.25rem;
    border-radius: 12px;
    overflow-x: auto;
}

.tab-btn {
    padding: 0.75rem 1.25rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: 10px;
    transition: var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-btn:hover {
    color: var(--text-color);
}

.tab-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    font-weight: 600;
    box-shadow: var(--shadow);
}

.tab-btn .badge {
    background: var(--danger-color);
    color: white;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tab-btn .badge.secondary {
    background: var(--secondary-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tab-content.active {
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.section-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

/* フレンドリクエストカード */
.friend-requests-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.friend-request-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.friend-request-card:hover {
    box-shadow: var(--shadow-hover);
}

.friend-request-card.accepted {
    transform: translateX(100%);
    opacity: 0;
}

.request-user-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.user-username {
    color: var(--text-muted);
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
}

.user-intro {
    color: var(--text-color);
    font-size: 0.9rem;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.user-location {
    color: var(--primary-color);
    font-size: 0.85rem;
    margin: 0.5rem 0 0 0;
}

.request-status {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.online-indicator {
    font-size: 0.85rem;
}

.online-indicator.online {
    color: var(--success-color);
}

.online-indicator.offline {
    color: var(--text-muted);
}

.private-badge {
    font-size: 0.85rem;
    color: var(--warning-color);
}

.request-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.request-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* フレンド一覧グリッド */
.friends-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.friend-card-link {
    text-decoration: none;
    color: inherit;
}

.friend-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
}

.friend-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.friend-card.pending {
    opacity: 0.7;
}

.friend-card.sent {
    border: 2px solid var(--success-color);
}

.friend-card.recommended {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.friend-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 3px solid var(--light-color);
}

.friend-card.recommended .friend-avatar {
    margin: 0;
}

.friend-info h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.friend-info .username {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0 0 0.5rem 0;
}

.friend-count-small {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

.pending-badge {
    display: inline-block;
    background: var(--warning-color);
    color: #333;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.friendship-badges {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

.friendship-badges .badge {
    font-size: 1rem;
    padding: 0.25rem;
}

.friendship-badges .badge.best {
    color: #FFD700;
}

.friendship-badges .badge.super-best {
    color: #FFA500;
}

.friendship-badges .badge.life-best {
    color: #87CEEB;
}

/* ===== 検索ページ ===== */
.search-page {
    max-width: 700px;
    margin: 0 auto;
}

.search-box {
    margin-bottom: 2rem;
}

.search-input-wrapper {
    display: flex;
    gap: 0.75rem;
}

.search-input-wrapper input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input-wrapper input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.1);
}

.search-results h3 {
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-result-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.result-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-info h4 {
    margin: 0 0 0.25rem 0;
}

.result-info .username {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0 0 0.25rem 0;
}

.result-info .introduction {
    font-size: 0.85rem;
    color: var(--text-color);
    margin: 0.5rem 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.result-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.friend-badge {
    background: var(--success-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
}

.blocked-badge,
.blocking-badge {
    background: var(--danger-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
}

.search-hint {
    text-align: center;
    padding: 3rem;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.search-hint .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* ===== 空状態 ===== */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* ===== モーダル ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 1rem;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 100%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px) scale(0.9);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.modal-content h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.modal-content p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

/* ===== ローディングオーバーレイ ===== */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 3000;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--light-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: var(--text-muted);
}

/* ===== その他のユーティリティ ===== */
.friend-count {
    background: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.text-muted {
    color: var(--text-muted);
}

/* ===== レスポンシブ ===== */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
        gap: 0.5rem;
    }
    
    .nav-links.show {
        display: flex;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .container {
        padding: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .auth-container {
        padding: 1.5rem;
    }
    
    .profile-header {
        flex-direction: column;
        text-align: center;
    }
    
    .profile-image-large {
        width: 120px;
        height: 120px;
    }
    
    .profile-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .stat-item {
        flex: 1;
        min-width: 80px;
    }
    
    .map-page {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh auto;
        height: auto;
    }
    
    .map-sidebar {
        height: auto;
        max-height: 400px;
    }
    
    .tabs {
        padding: 0.15rem;
    }
    
    .tab-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .request-user-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .request-actions {
        flex-direction: column;
    }
    
    .request-actions .btn {
        width: 100%;
    }
    
    .friends-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .search-input-wrapper {
        flex-direction: column;
    }
    
    .search-result-card {
        flex-direction: column;
        text-align: center;
    }
    
    .result-actions {
        width: 100%;
    }
    
    .result-actions .btn {
        width: 100%;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .friends-grid {
        grid-template-columns: 1fr;
    }
    
    .friend-card.recommended {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }
    
    .friend-card.recommended .friend-avatar {
        width: 50px;
        height: 50px;
    }
    
    .friend-card.recommended .friend-info {
        flex: 1;
    }
    
    .friend-card.recommended .btn {
        width: 100%;
    }
}

/* ===== Criticer theme alignment ===== */
html {
    background: #f3f5f7;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

.navbar,
.auth-container,
.feature-card,
.card,
.profile-header,
.profile-stats,
.profile-details-card,
.room-card,
.map-container,
.map-sidebar,
.friend-request-card,
.friend-card,
.search-result-card,
.search-hint,
.empty-state,
.modal-content {
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    backdrop-filter: blur(18px);
}

.navbar {
    box-shadow: 0 1px 0 var(--border-color), 0 12px 32px rgba(15, 23, 42, 0.05);
}

.container {
    width: min(100vw - 28px, 1200px);
    padding: 20px 0 40px;
}

.hero {
    padding: clamp(2rem, 5vw, 3rem) clamp(1rem, 3vw, 2rem);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-color);
    box-shadow: var(--shadow);
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    letter-spacing: 0;
}

.hero p {
    color: var(--text-muted);
}

.modal-sheet,
.modal-overlay > div {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
}

.modal-sheet input,
.modal-sheet select,
.modal-sheet textarea {
    background: var(--surface-solid) !important;
    border-color: var(--border-color) !important;
    color: var(--text-color) !important;
}

.btn,
button,
input,
select,
textarea {
    font: inherit;
}

.btn,
.btn-signup,
.btn-logout,
.tab-btn,
.action-btn {
    border-radius: 12px;
}

.btn-primary,
.btn-signup,
.unread-badge {
    background: var(--primary-color) !important;
    color: #ffffff !important;
}

.btn-primary:hover:not(:disabled),
.btn-signup:hover,
.bg-primary:hover,
.hover\:bg-primary-hover:hover {
    background: var(--primary-hover) !important;
}

.btn-secondary,
.action-btn,
.friend-count,
.room-type,
.default-avatar {
    background: var(--surface-muted);
    color: var(--text-color);
}

.btn-logout {
    background: var(--danger-color) !important;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.search-input-wrapper input,
input,
select,
textarea {
    border-color: var(--border-color);
    background: var(--surface-solid);
    color: var(--text-color);
}

.form-group input:focus,
.search-input-wrapper input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--focus-ring);
    outline: none;
}

.card h3,
.profile-details-card h3,
.map-sidebar h3,
.location-item,
.request-item {
    border-color: var(--border-color);
}

.tabs,
.friend-location-item:hover,
.spot-item:hover,
.event-item:hover,
.nav-links a:hover {
    background: var(--surface-muted);
}

.tab-btn.active {
    background: var(--card-bg);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.map-container {
    min-height: 360px;
}

.leaflet-control-zoom a,
.leaflet-bar a,
.leaflet-control-layers {
    background: var(--card-bg) !important;
    color: var(--text-color) !important;
    border-color: var(--border-color) !important;
}

.leaflet-bar {
    border-color: var(--border-color) !important;
    box-shadow: var(--shadow) !important;
}

.bg-white,
.bg-white\/90 {
    background-color: var(--card-bg) !important;
}

.bg-gray-50,
.bg-gray-100,
.bg-gray-200,
.hover\:bg-gray-50:hover,
.hover\:bg-gray-100:hover,
.hover\:bg-gray-200:hover {
    background-color: var(--surface-muted) !important;
}

.text-gray-400,
.text-gray-500,
.text-gray-600 {
    color: var(--text-muted) !important;
}

.text-gray-700,
.text-gray-800,
.text-gray-900 {
    color: var(--text-color) !important;
}

.text-slate-500,
.text-slate-600 {
    color: var(--text-muted) !important;
}

.text-slate-700,
.text-slate-800,
.text-slate-900 {
    color: var(--text-color) !important;
}

.text-primary,
.hover\:text-primary:hover {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.border-gray-100,
.border-gray-200,
.border-gray-300 {
    border-color: var(--border-color) !important;
}

.border-slate-100,
.border-slate-200,
.border-slate-300 {
    border-color: var(--border-color) !important;
}

.bg-slate-50,
.bg-slate-100 {
    background-color: var(--surface-muted) !important;
}

.bg-slate-900 {
    background-color: var(--text-color) !important;
    color: var(--surface-solid) !important;
}

.hover\:bg-slate-100:hover {
    background-color: var(--surface-muted) !important;
}

.bg-gradient-to-br {
    background-image: linear-gradient(135deg, var(--primary-color), #60a5fa) !important;
    background-color: var(--primary-color) !important;
}

.bg-white\/20 {
    background-color: rgba(255, 255, 255, 0.2) !important;
}

.hover\:bg-white\/30:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

.landing-hero {
    border-bottom: 1px solid var(--border-color);
}

.landing-features {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.shadow,
.shadow-md,
.shadow-lg,
.shadow-xl {
    box-shadow: var(--shadow) !important;
}

html.dark {
    color-scheme: dark;
    --primary-color: #60a5fa;
    --primary-hover: #93c5fd;
    --secondary-color: #9aa7b7;
    --success-color: #34d399;
    --danger-color: #f87171;
    --warning-color: #fbbf24;
    --light-color: rgba(30, 41, 59, 0.72);
    --dark-color: #f8fafc;
    --bg-color: #0f141a;
    --card-bg: rgba(17, 24, 39, 0.9);
    --surface-solid: #151c25;
    --surface-muted: rgba(21, 28, 37, 0.88);
    --text-color: #e5edf6;
    --text-muted: #9aa7b7;
    --border-color: rgba(148, 163, 184, 0.2);
    --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
    --shadow-hover: 0 24px 64px rgba(0, 0, 0, 0.42);
    --focus-ring: rgba(96, 165, 250, 0.24);
}

@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {
        color-scheme: dark;
        --primary-color: #60a5fa;
        --primary-hover: #93c5fd;
        --secondary-color: #9aa7b7;
        --success-color: #34d399;
        --danger-color: #f87171;
        --warning-color: #fbbf24;
        --light-color: rgba(30, 41, 59, 0.72);
        --dark-color: #f8fafc;
        --bg-color: #0f141a;
        --card-bg: rgba(17, 24, 39, 0.9);
        --surface-solid: #151c25;
        --surface-muted: rgba(21, 28, 37, 0.88);
        --text-color: #e5edf6;
        --text-muted: #9aa7b7;
        --border-color: rgba(148, 163, 184, 0.2);
        --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
        --shadow-hover: 0 24px 64px rgba(0, 0, 0, 0.42);
        --focus-ring: rgba(96, 165, 250, 0.24);
    }

    html:not([data-theme="light"]) {
        background: #0f141a;
    }

    .alert-success {
        background: rgba(22, 101, 52, 0.22);
        color: #bbf7d0;
        border-color: rgba(52, 211, 153, 0.28);
    }

    .alert-error {
        background: rgba(127, 29, 29, 0.24);
        color: #fecaca;
        border-color: rgba(248, 113, 113, 0.28);
    }

    .loading-overlay {
        background: rgba(15, 20, 26, 0.92);
    }
}

@media (max-width: 768px) {
    .container {
        width: min(100vw - 20px, 1200px);
        padding: 14px 0 28px;
    }

    .navbar {
        padding: 0.75rem 1rem;
    }

    .nav-brand a {
        font-size: 1.2rem;
    }

    .auth-container,
    .card,
    .profile-header,
    .profile-stats,
    .profile-details-card,
    .map-sidebar,
    .friend-request-card,
    .friend-card,
    .search-result-card,
    .empty-state {
        padding: 1rem;
        border-radius: 14px;
    }

    .details-list {
        grid-template-columns: 1fr;
        gap: 0.25rem 0;
    }

    .map-page {
        gap: 1rem;
    }
}

/* ===== eSIM-style entry layout ===== */
.entry-shell {
    width: min(100vw - 24px, 920px);
    margin: 0 auto;
    padding: 12px 0 28px;
    display: grid;
    gap: 10px;
}

.entry-top,
.entry-panel {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.entry-top {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.entry-brand {
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0;
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.entry-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.entry-btn {
    min-height: 40px;
    padding: 0 13px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-solid);
    color: var(--text-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

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

.entry-btn-primary {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.entry-btn-primary:hover {
    background: var(--primary-hover);
    color: #fff;
}

.entry-btn-block {
    width: 100%;
}

.entry-panel {
    padding: 13px;
}

.entry-hero h1 {
    margin: 0;
    font-size: clamp(32px, 6vw, 56px);
    line-height: 1.05;
    letter-spacing: 0;
}

.entry-hero p {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.entry-chip-row {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.entry-chip {
    min-height: 28px;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--surface-solid);
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.entry-section-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-color);
}

.entry-feature-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.entry-feature {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-muted);
    padding: 12px;
    display: grid;
    gap: 8px;
}

.entry-feature-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--surface-solid);
    color: var(--primary-color);
    display: inline-grid;
    place-items: center;
    font-size: 14px;
}

.entry-feature h3 {
    margin: 0;
    font-size: 16px;
    line-height: 1.2;
    color: var(--text-color);
}

.entry-feature p {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.entry-auth-wrap {
    min-height: min(620px, calc(100vh - 180px));
    display: grid;
    align-content: start;
    justify-items: center;
    padding-top: 2px;
}

.entry-auth-panel {
    width: min(430px, 100%);
}

.entry-title {
    margin: 0;
    font-size: 36px;
    line-height: 1.08;
    font-weight: 900;
    letter-spacing: 0;
    color: var(--text-color);
}

.entry-sub {
    margin: 6px 0 0;
    color: var(--text-muted);
    font-size: 13px;
}

.entry-alert {
    margin-top: 10px;
    border: 1px solid color-mix(in srgb, var(--danger-color) 42%, var(--border-color));
    border-radius: 10px;
    background: color-mix(in srgb, var(--danger-color) 10%, transparent);
    color: var(--danger-color);
    padding: 9px 10px;
    font-size: 12px;
}

.entry-form {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.entry-field {
    display: grid;
    gap: 6px;
}

.entry-field > span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    color: var(--text-muted);
}

.entry-field input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--surface-solid);
    color: var(--text-color);
    padding: 0 12px;
    font-size: 15px;
}

.entry-field input:focus-visible,
.entry-btn:focus-visible {
    outline: 2px solid color-mix(in srgb, var(--primary-color) 40%, transparent);
    outline-offset: 2px;
}

.entry-input-wrap {
    position: relative;
}

.entry-input-wrap input {
    padding-right: 46px;
}

.entry-input-btn {
    position: absolute;
    top: 50%;
    right: 6px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-solid);
    color: var(--text-muted);
    cursor: pointer;
}

.entry-help {
    margin: 4px 0 0;
    font-size: 11px;
    color: var(--text-muted);
}

.entry-help.is-pending {
    color: var(--text-muted);
}

.entry-help.is-valid {
    color: var(--success-color);
}

.entry-help.is-invalid {
    color: var(--danger-color);
}

.entry-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.entry-upload {
    border: 1px dashed var(--border-color);
    border-radius: 12px;
    background: var(--surface-muted);
    min-height: 108px;
    padding: 10px;
    display: grid;
    place-items: center;
    text-align: center;
    cursor: pointer;
}

.entry-upload img {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    object-fit: cover;
}

.entry-foot {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

.entry-foot a {
    color: var(--primary-color);
    font-weight: 700;
}

/* ===== eSIM-style dashboard top/settings flow ===== */
.map-fab {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    color: var(--text-color);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.map-fab:hover {
    background: var(--surface-solid);
}

.map-profile-chip {
    min-height: 44px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.map-profile-name {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-color);
}

.map-profile-id {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}

.map-fab-icon {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
}

.map-fab-small {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    font-size: 20px;
    font-weight: 700;
}

.map-nav-shell {
    border: 1px solid var(--border-color);
    border-radius: 999px;
    background: var(--card-bg);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    padding: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.map-nav-btn {
    min-width: 42px;
    min-height: 36px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

.map-nav-btn:hover {
    background: var(--surface-muted);
    color: var(--text-color);
}

.map-nav-btn.is-active {
    border-color: var(--border-color);
    background: var(--surface-muted);
    color: var(--primary-color);
}

.map-nav-badge {
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--danger-color);
    color: #fff;
    font-size: 11px;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    padding: 0 5px;
}

.sheet-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(5, 10, 20, 0.42);
    z-index: 2000;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
}

.sheet-overlay-high {
    z-index: 2100;
}

.sheet {
    width: min(100%, 500px);
    max-height: 85vh;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.sheet-wide {
    max-width: 520px;
}

.sheet-grab {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: 2px;
    margin: 12px auto 8px;
}

.sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px 14px;
}

.sheet-title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-color);
}

.sheet-close {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: var(--surface-muted);
    color: var(--text-color);
    cursor: pointer;
}

.sheet-body {
    padding: 0 18px 18px;
    overflow-y: auto;
    flex: 1;
}

.settings-list {
    display: grid;
    gap: 8px;
}

.settings-item {
    min-height: 56px;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--surface-muted);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 14px;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}

.settings-item:hover {
    border-color: color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
}

.settings-item-copy {
    flex: 1;
    display: grid;
    gap: 1px;
}

.settings-item-copy p {
    margin: 0;
    color: var(--text-muted);
    font-size: 12px;
}

.settings-item-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.settings-item-warn {
    border-color: color-mix(in srgb, var(--warning-color) 45%, var(--border-color));
    background: color-mix(in srgb, var(--warning-color) 12%, var(--surface-muted));
}

.settings-item-warn .settings-item-copy p,
.settings-item-warn .settings-item-meta {
    color: color-mix(in srgb, var(--warning-color) 65%, var(--text-color));
}

.settings-item-danger {
    border-color: color-mix(in srgb, var(--danger-color) 42%, var(--border-color));
    background: color-mix(in srgb, var(--danger-color) 10%, var(--surface-muted));
    color: var(--danger-color);
}

.sheet-description {
    margin: 0 0 14px;
    color: var(--text-muted);
    font-size: 14px;
}

.fake-map {
    height: 200px;
    border-radius: 12px;
    margin-bottom: 14px;
    border: 1px solid var(--border-color);
}

.fake-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.fake-field {
    display: grid;
    gap: 5px;
}

.fake-field > span {
    font-size: 12px;
    color: var(--text-muted);
}

.fake-input {
    min-height: 42px;
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-solid);
    color: var(--text-color);
    padding: 0 10px;
}

.fake-section-title {
    display: block;
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.fake-preset-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fake-preset-btn {
    min-height: 34px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--surface-muted);
    color: var(--text-color);
    padding: 0 11px;
    font-size: 13px;
    cursor: pointer;
}

.fake-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.fake-action-main {
    flex: 1;
}

.fake-action-sub {
    min-width: 88px;
}

@media (max-width: 860px) {
    .entry-feature-grid {
        grid-template-columns: 1fr;
    }

    .entry-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .entry-shell {
        width: min(100vw - 16px, 920px);
        padding-bottom: 22px;
    }

    .entry-auth-wrap {
        min-height: auto;
    }

    .sheet-head,
    .sheet-body {
        padding-left: 14px;
        padding-right: 14px;
    }

    .fake-grid {
        grid-template-columns: 1fr;
    }
}
