* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a2e;
    color: #eee;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 16px;
}
a { color: #e94560; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.nav {
    width: 100%;
    max-width: 1440px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    flex-wrap: wrap;
    gap: 8px;
}
.nav .logo-group { display: flex; flex-direction: column; }
.nav .logo { font-size: 22px; font-weight: 700; color: #e94560; }
.nav .tagline { font-size: 11px; color: #666; font-style: italic; }
.nav .links { display: flex; gap: 12px; font-size: 14px; align-items: center; flex-wrap: wrap; }
.nav .sht-now {
    background: #e94560; color: #fff; border: none; border-radius: 8px;
    padding: 6px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
    transition: transform .1s;
}
.nav .sht-now:hover { background: #c73652; transform: scale(1.05); }
.nav .sht-now:active { transform: scale(.95); }

/* Avatar Dropdown */
.avatar-dropdown { position: relative; }
.avatar-circle {
    width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
    object-fit: cover; border: 2px solid #e94560;
    transition: transform .1s;
}
.avatar-circle:hover { transform: scale(1.1); }
.dropdown-menu {
    display: none; position: absolute; right: 0; top: 48px;
    background: #16213e; border: 1px solid #0f3460; border-radius: 10px;
    overflow: hidden; box-shadow: 0 8px 32px rgba(0,0,0,.6);
    z-index: 100; min-width: 180px;
}
.dropdown-menu.show { display: block; }
.dropdown-menu a {
    display: block; padding: 12px 16px; color: #eee;
    font-size: 14px; transition: background .15s;
    text-decoration: none; white-space: nowrap;
}
.dropdown-menu a:hover { background: #0f3460; color: #e94560; text-decoration: none; }
.dropdown-menu a.dd-medical-btn {
    margin: 6px 10px; padding: 10px 14px; border-radius: 8px;
    background: #1a365d; border: 1px solid #2a4a7f; color: #a0c4ff;
    text-align: center; font-weight: 600; font-size: 13px;
}
.dropdown-menu a.dd-medical-btn:hover { background: #2a4a7f; color: #fff; }

/* Header buttons (not logged in) */
.header-btn {
    display: inline-block; padding: 8px 20px;
    border-radius: 8px; font-size: 14px; font-weight: 700;
    background: #e94560; color: #fff !important; text-decoration: none !important;
    transition: transform .1s;
}
.header-btn:hover { transform: scale(1.05); background: #c73652; text-decoration: none !important; }
.btn-register { background: #0f3460 !important; }
.btn-register:hover { background: #1a2a50 !important; }

/* Avatar preview (profile page) */
.avatar-preview {
    width: 100px; height: 100px; border-radius: 50%;
    object-fit: cover; border: 3px solid #e94560;
}
.avatar-preview-lg {
    width: 120px; height: 120px; border-radius: 50%;
    object-fit: cover; border: 3px solid #e94560;
}
.top-produce {
    display: flex; gap: 4px; justify-content: center; align-items: center;
}
.top-produce .tp-item {
    font-size: 22px; cursor: default;
    background: #0f3460; border-radius: 8px; padding: 4px 6px;
    line-height: 1;
}
.top-produce .tp-item .tp-rating {
    display: block; font-size: 9px; text-align: center; color: #e94560; font-weight: 700;
}

/* Profile header layout */
.profile-header {
    display: flex; gap: 28px; align-items: flex-start;
    padding-bottom: 24px; border-bottom: 1px solid #0f3460; margin-bottom: 24px;
}
.profile-header-left {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    flex-shrink: 0;
}
.profile-header-right { flex: 1; min-width: 0; }
.profile-name-row {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-bottom: 16px;
}
.profile-name-row h1 { color: #e94560; }
.profile-user-num {
    font-size: 16px; font-weight: 600; color: #666;
}
.profile-badge {
    font-size: 11px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; padding: 3px 10px; border-radius: 6px;
}
.profile-badge.admin {
    background: linear-gradient(135deg, #e94560, #c73652);
    color: #fff; box-shadow: 0 2px 8px rgba(233,69,96,.3);
}
.profile-info-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px;
}
.profile-info-item {
    display: flex; flex-direction: column; gap: 2px;
}
.profile-info-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .8px;
    color: #666; font-weight: 600;
}
.profile-info-value {
    font-size: 16px; font-weight: 600; color: #ccc;
}
.btn-sm {
    padding: 6px 18px; font-size: 12px; font-weight: 700;
    background: #e94560; border: none; border-radius: 8px;
    color: #fff; cursor: pointer; transition: all .15s;
}
.btn-sm:hover { background: #c73652; transform: scale(1.03); }

@media (max-width: 600px) {
    .profile-header { flex-direction: column; align-items: center; text-align: center; }
    .profile-name-row { justify-content: center; }
    .profile-info-grid { grid-template-columns: 1fr; text-align: left; }
}

/* Submenu bar */
.submenu {
    display: flex; gap: 0; width: 100%; max-width: 1440px;
    margin-top: 20px; border-radius: 12px 12px 0 0; overflow: hidden;
}
.submenu .sub-btn {
    flex: 1; padding: 12px 0; font-size: 14px; font-weight: 700;
    border: none; background: #0f3460; color: #888; cursor: pointer;
    transition: background .2s, color .2s;
}
.submenu .sub-btn.active { background: #16213e; color: #e94560; }
.submenu .sub-btn:hover:not(.active) { background: #1a2a50; color: #ccc; }

/* Feed panels */
.feed-panel { display: none; }
.feed-panel.active { display: block; }
.feed-heading {
    text-align: center; font-size: 18px; color: #e94560;
    margin: 0 0 8px; padding-bottom: 8px; border-bottom: 1px solid #0f3460;
}

/* Feed avatars */
.feed-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0; border: 1px solid #0f3460;
}

/* Memberlist */
.member-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px; border-bottom: 1px solid #0f3460;
}
.member-item:last-child { border-bottom: none; }
.member-avatar {
    width: 44px; height: 44px; border-radius: 50%;
    object-fit: cover; flex-shrink: 0;
}
.member-info { flex: 1; min-width: 0; }
.member-name { font-weight: 700; font-size: 16px; display: block; }
.member-detail { font-size: 12px; color: #888; }
.member-joined { font-size: 12px; color: #666; white-space: nowrap; }

/* Cards */
.card {
    background: #16213e;
    border-radius: 16px;
    padding: 32px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,.4);
    margin-top: 20px;
    overflow: hidden;
}
.card.wide { max-width: 1440px; overflow: visible; }
.card h1 {
    text-align: center;
    font-size: 28px;
    margin-bottom: 24px;
    color: #e94560;
}

/* Forms */
.checkbox-row {
    display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.checkbox-row input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: #e94560; cursor: pointer;
}
.checkbox-row label { font-size: 14px; cursor: pointer; }
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    margin-bottom: 6px;
}
.form-group input {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #0f3460;
    color: #eee;
    font-size: 15px;
    box-sizing: border-box;
    max-width: 100%;
}
.form-group input:focus { outline: 2px solid #e94560; border-color: transparent; }
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid #333;
    background: #0f3460;
    color: #eee;
    font-size: 15px;
    box-sizing: border-box;
    max-width: 100%;
}
.form-group select:focus { outline: 2px solid #e94560; border-color: transparent; }
.btn {
    display: block;
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 700;
    background: #e94560;
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: transform .1s;
}
.btn:hover { background: #c73652; transform: scale(1.02); }
.btn:active { transform: scale(.97); }
.error-msg {
    background: #e9456022;
    border: 1px solid #e94560;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    font-size: 14px;
    color: #ff6b81;
}
.subtle { text-align: center; margin-top: 16px; font-size: 14px; color: #888; }
.subtle a { color: #e94560; }

/* Profile fields */
.field { margin-bottom: 18px; }
.field label {
    display: block; font-size: 12px; text-transform: uppercase;
    letter-spacing: 1px; color: #888; margin-bottom: 4px;
}
.field .value { font-size: 18px; font-weight: 600; }
.field-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    margin-bottom: 18px;
}
.field-row .field { margin-bottom: 0; }
.form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    margin-bottom: 16px;
}
.form-row .form-group { margin-bottom: 0; }
.section-title {
    margin: 28px 0 14px; font-size: 13px; text-transform: uppercase;
    letter-spacing: 1px; color: #e94560; border-bottom: 1px solid #0f3460;
    padding-bottom: 8px;
}
.toggle-row {
    display: flex; justify-content: space-between;
    align-items: center; margin-bottom: 18px;
}
.toggle-row label {
    font-size: 12px; text-transform: uppercase;
    letter-spacing: 1px; color: #888;
}
select {
    background: #0f3460; color: #eee; border: 1px solid #333;
    border-radius: 8px; padding: 6px 12px; font-size: 14px; cursor: pointer;
}
select:hover { background: #e94560; }
.tally-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 12px; margin: 20px 0;
}
.tally-box {
    background: #0f3460; border-radius: 12px;
    padding: 16px; text-align: center;
}
.tally-box .num { font-size: 32px; font-weight: 700; color: #e94560; }
.tally-box .lbl {
    font-size: 11px; text-transform: uppercase;
    letter-spacing: 1px; color: #888; margin-top: 4px;
}
.sht-btn {
    display: block; width: 100%; padding: 14px;
    font-size: 20px; font-weight: 700; background: #e94560;
    border: none; border-radius: 12px; color: #fff;
    cursor: pointer; transition: transform .1s;
}
.sht-btn:hover { background: #c73652; transform: scale(1.02); }
.sht-btn:active { transform: scale(.97); }

/* Log Chooser Popup */
.log-chooser-overlay {
    display: none; position: fixed; inset: 0; z-index: 8500;
    background: rgba(0,0,0,.8); align-items: center; justify-content: center;
}
.log-chooser-overlay.show { display: flex; }
.log-chooser-box {
    background: #16213e; border-radius: 16px; padding: 32px 28px 28px;
    max-width: 680px; width: 95%; position: relative;
    box-shadow: 0 12px 48px rgba(0,0,0,.6);
}
.log-chooser-close {
    position: absolute; top: 12px; right: 16px;
    background: none; border: none; color: #888; font-size: 28px;
    cursor: pointer; line-height: 1;
}
.log-chooser-close:hover { color: #fff; }
.log-chooser-box h2 {
    text-align: center; color: #e94560; margin: 0 0 24px;
    font-size: 22px; font-weight: 700;
}
.log-chooser-cards {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}
.log-chooser-card {
    flex: 1 1 calc(50% - 8px); max-width: calc(50% - 8px); background: #1a1a2e; border: 2px solid #333;
    border-radius: 14px; padding: 24px 16px; text-align: center;
    cursor: pointer; transition: border-color .2s, transform .15s, box-shadow .2s;
}
.log-chooser-card:hover {
    border-color: #e94560; transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(233,69,96,.25);
}
.lcc-icon { font-size: 42px; margin-bottom: 10px; }
.lcc-title {
    font-size: 16px; font-weight: 700; color: #fff;
    margin-bottom: 8px;
}
.lcc-desc { font-size: 12px; color: #888; line-height: 1.4; }

@media (max-width: 550px) {
    .log-chooser-cards { flex-direction: column; }
    .log-chooser-card { padding: 18px 14px; }
    .lcc-icon { font-size: 32px; }
}

/* Profile Tabs */
.profile-tabs {
    display: flex; gap: 0; width: 100%; max-width: 1440px; margin-top: 20px;
}
.profile-tabs .tab-btn {
    flex: 1; padding: 12px 0; font-size: 14px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1px; border: none;
    background: #0f3460; color: #888; cursor: pointer;
    transition: background .2s, color .2s;
}
.profile-tabs .tab-btn:first-child { border-radius: 12px 0 0 0; }
.profile-tabs .tab-btn:last-child { border-radius: 0 12px 0 0; }
.profile-tabs .tab-btn.active { background: #16213e; color: #e94560; }
.profile-tabs .tab-btn:hover:not(.active) { background: #1a2a50; color: #ccc; }
.tab-panel { display: none; width: 100%; max-width: 1440px; }
.tab-panel.active { display: block; }
.card.tab-card { margin-top: 0; border-radius: 0 0 16px 16px; }

/* Media sub-tabs */
.media-subtabs { display: flex; gap: 0; margin-bottom: 16px; border-radius: 8px; overflow: hidden; }
.media-sub {
    flex: 1; padding: 10px 0; font-size: 13px; font-weight: 700;
    border: none; background: #0f3460; color: #888; cursor: pointer;
    transition: background .2s, color .2s;
}
.media-sub.active { background: #e94560; color: #fff; }
.media-sub:hover:not(.active) { background: #1a2a50; color: #ccc; }
.media-panel { display: none; }
.media-panel.active { display: block; }
.logsub-panel { display: none; }
.logsub-panel.active { display: block; }
.log-sub {
    flex: 1; padding: 10px 0; font-size: 13px; font-weight: 700;
    border: none; background: #0f3460; color: #888; cursor: pointer;
    transition: background .2s, color .2s;
}
.log-sub.active { background: #e94560; color: #fff; }
.log-sub:hover:not(.active) { background: #1a2a50; color: #ccc; }
.media-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.media-card {
    background: #0f3460; border-radius: 12px; overflow: hidden;
    transition: transform .15s, box-shadow .15s;
}
.media-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.media-card img {
    width: 100%; aspect-ratio: 1; object-fit: cover; cursor: pointer;
    display: block;
}
.media-info { padding: 10px 12px; }
.media-label {
    font-size: 13px; font-weight: 600;
    color: #eee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.media-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 4px;
}
.media-date {
    font-size: 11px; color: #666; padding: 0;
}
.media-badge {
    font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px;
    white-space: nowrap;
}
.media-badge.public { background: rgba(74,222,128,.15); color: #4ade80; }
.media-badge.private { background: rgba(233,69,96,.15); color: #e94560; }
.media-toggle { cursor: pointer; transition: opacity .2s, transform .15s; user-select: none; }
.media-toggle:hover { transform: scale(1.08); opacity: .85; }

/* Feed */
/* Wall of Shts Table */
.wall-table-wrap { overflow-x: auto; }
.wall-table {
    width: 100%; border-collapse: collapse; font-size: 14px;
}
.wall-table thead th {
    text-align: left; padding: 8px 10px; color: #8899aa; font-weight: 600;
    font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
    border-bottom: 2px solid #0f3460; white-space: nowrap;
}
.wall-table tbody tr { border-bottom: 1px solid #0f3460; }
.wall-table tbody tr:last-child { border-bottom: none; }
.wall-table tbody tr:hover { background: rgba(15,52,96,.25); }
.wall-table td { padding: 10px 10px; vertical-align: middle; }
.wt-avatar { width: 24px; height: 24px; border-radius: 50%; vertical-align: middle; margin-right: 6px; }
.wt-user { white-space: nowrap; }
.wt-user a { color: #e94560; text-decoration: none; font-weight: 600; }
.wt-user a:hover { text-decoration: underline; }
.wt-anon { color: #666; }
.wt-action { color: #ccc; max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wt-loc { color: #8899aa; text-align: center; white-space: nowrap; }
.wt-stats { color: #8899aa; white-space: nowrap; font-size: 13px; }
.wt-photo .feed-thumbs { padding-left: 0; margin-top: 0; }
.wt-photo .photo-thumb, .wt-thumb { width: 36px; height: 36px; }
.wt-center { text-align: center; }
.wt-time { color: #555; font-size: 12px; white-space: nowrap; }

/* Sht pic blur */
.sht-blurred { filter: blur(12px); transition: filter .3s; cursor: pointer; }
.sht-blurred:hover { filter: blur(8px); }
.sht-revealed { filter: none; }

/* Sht confirm popup */
.sht-confirm-overlay {
    display: none; position: fixed; inset: 0; z-index: 10000;
    background: rgba(0,0,0,.8); justify-content: center; align-items: center;
}
.sht-confirm-overlay.active { display: flex; }
.sht-confirm-box {
    background: #16213e; border: 2px solid #e94560; border-radius: 20px;
    padding: 32px 40px; text-align: center; max-width: 420px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    animation: shtPop .3s ease;
}
@keyframes shtPop { from { transform: scale(.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.sht-confirm-emoji { font-size: 64px; margin-bottom: 12px; }
.sht-confirm-box h3 { color: #e94560; font-size: 20px; margin-bottom: 8px; line-height: 1.3; }
.sht-confirm-sub { color: #888; font-size: 14px; margin-bottom: 24px; }
.sht-confirm-btns { display: flex; gap: 12px; justify-content: center; }
.sht-confirm-no {
    padding: 12px 24px; border-radius: 10px; border: 2px solid #555;
    background: transparent; color: #ccc; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all .2s;
}
.sht-confirm-no:hover { border-color: #4ade80; color: #4ade80; }
.sht-confirm-yes {
    padding: 12px 24px; border-radius: 10px; border: none;
    background: #e94560; color: #fff; font-size: 15px; font-weight: 700;
    cursor: pointer; transition: all .2s;
}
.sht-confirm-yes:hover:not(:disabled) { background: #c73652; transform: scale(1.04); }
.sht-confirm-yes:disabled { cursor: not-allowed; }
.sht-confirm-timer { color: #e94560; font-size: 13px; margin-top: 12px; font-weight: 600; }

/* Feed cards (used by individual tabs) */
.feed-item {
    display: flex; flex-direction: column; gap: 0;
    padding: 14px 16px; border-bottom: 1px solid #0f3460;
}
.feed-item:last-child { border-bottom: none; }
.feed-item-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.feed-user {
    font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px;
    flex: 1; min-width: 0; flex-wrap: wrap;
}
.feed-user a { color: #e94560; text-decoration: none; white-space: nowrap; }
.feed-user a:hover { text-decoration: underline; }
.feed-time { font-size: 12px; color: #555; white-space: nowrap; margin-top: 2px; }
.feed-action { color: #888; font-weight: 400; font-size: 14px; }
.feed-action strong { color: #ccc; }
.feed-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; padding-left: 36px; }
.feed-tags .tag {
    background: #0f3460; padding: 2px 10px; border-radius: 6px;
    font-size: 12px; font-weight: 400; color: #8899aa;
}
.feed-thumbs {
    display: flex; gap: 8px; margin-top: 8px; padding-left: 36px; flex-wrap: wrap;
}

/* Lightbox */
.lightbox-overlay {
    display: none; position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,.85); justify-content: center; align-items: center;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
    max-width: 90vw; max-height: 90vh; border-radius: 10px;
    box-shadow: 0 0 40px rgba(0,0,0,.6);
}
.lightbox-close {
    position: absolute; top: 18px; right: 24px; font-size: 32px; color: #fff;
    background: rgba(0,0,0,.5); border: none; border-radius: 50%; width: 44px; height: 44px;
    cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1;
}
.lightbox-close:hover { background: #e94560; }

/* Photo thumbnails */
.photo-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.photo-thumb {
    width: 64px; height: 64px; border-radius: 8px; object-fit: cover;
    cursor: pointer; border: 2px solid #0f3460; transition: border-color .2s;
}
.photo-thumb:hover { border-color: #e94560; }
.feed-empty {
    text-align: center; padding: 40px 16px;
    color: #666; font-size: 15px;
}

/* Sht History Items */
.history-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; border-radius: 10px; background: #0f3460;
    margin-bottom: 8px;
}
.history-item:last-child { margin-bottom: 0; }
.history-left { display: flex; align-items: center; gap: 12px; }
.history-emoji { font-size: 22px; }
.history-label { font-size: 14px; color: #ccc; }
.history-right { display: flex; align-items: center; gap: 10px; }
.history-date { font-size: 12px; color: #888; text-align: right; line-height: 1.4; }
.history-remove {
    background: none; border: 1px solid #e94560; color: #e94560;
    padding: 4px 10px; border-radius: 6px; cursor: pointer;
    font-size: 11px; font-weight: 600; transition: all .15s;
}
.history-remove:hover { background: #e94560; color: #fff; }

/* Action icon buttons */
.wt-actions { white-space: nowrap; text-align: center; }
.act-btn {
    background: none; border: none; cursor: pointer;
    font-size: 16px; padding: 3px 5px; transition: all .15s;
    border-radius: 4px;
}
.act-btn.edit { color: #4ade80; }
.act-btn.del { color: #e94560; }
.act-btn:hover { transform: scale(1.2); }
.act-btn.del:hover { filter: drop-shadow(0 0 4px #e94560); }
.act-btn.edit:hover { filter: drop-shadow(0 0 4px #4ade80); }

/* Edit modal overlay */
.edit-overlay {
    display: none; position: fixed; inset: 0; z-index: 9000;
    background: rgba(0,0,0,.75); align-items: center; justify-content: center;
}
.edit-overlay.active { display: flex; }
.edit-modal {
    background: #16213e; border-radius: 12px; width: 95%; max-width: 520px;
    max-height: 85vh; overflow-y: auto; box-shadow: 0 8px 32px rgba(0,0,0,.5);
}
.edit-modal-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px 12px; border-bottom: 1px solid #1a1a3a;
}
.edit-modal-head h2 { margin: 0; font-size: 18px; color: #e94560; }
.edit-modal-close {
    background: none; border: none; color: #888; font-size: 26px;
    cursor: pointer; line-height: 1;
}
.edit-modal-close:hover { color: #fff; }
.edit-modal form { padding: 16px 20px; }
.edit-field { margin-bottom: 12px; }
.edit-field label { display: block; font-size: 13px; color: #aaa; margin-bottom: 4px; }
.edit-field input[type="text"],
.edit-field input[type="number"],
.edit-field select {
    width: 100%; padding: 8px 10px; border-radius: 6px;
    border: 1px solid #333; background: #1a1a2e; color: #eee;
    font-size: 14px; box-sizing: border-box;
}
.edit-field input[type="range"] { width: 100%; accent-color: #e94560; }
.edit-field.checkbox-row {
    display: flex; align-items: center; gap: 10px;
}
.edit-field.checkbox-row label { margin-bottom: 0; }
.edit-field.checkbox-row input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: #e94560; cursor: pointer;
}
.edit-photo-block { margin: 12px 0; }
.edit-photo-block > label { display: block; font-size: 13px; color: #aaa; margin-bottom: 6px; }
.edit-photo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.edit-photo-thumb {
    width: 80px; height: 80px; object-fit: cover; border-radius: 8px;
    cursor: pointer; border: 1px solid #333;
}
.del-pic-btn { background: #e94560 !important; color: #fff !important; }
.edit-photo-upload label { font-size: 12px; color: #888; margin-bottom: 4px; display: block; }
.edit-photo-upload input[type="file"] { font-size: 13px; color: #ccc; }
.edit-modal-foot {
    display: flex; gap: 10px; justify-content: center; margin-top: 16px;
    padding-bottom: 4px;
}

/* ========================================
   DETAIL POPUP (Wall of Sht row detail)
   ======================================== */
.detail-overlay {
    display: none; position: fixed; inset: 0; z-index: 8500;
    background: rgba(0,0,0,.8); align-items: center; justify-content: center;
    padding: 16px; overflow-y: auto;
}
.detail-overlay.active { display: flex; }
.detail-card {
    background: #16213e; border-radius: 14px; width: 95%; max-width: 440px;
    max-height: 90vh; overflow-y: auto; box-shadow: 0 8px 40px rgba(0,0,0,.6);
    position: relative; padding: 0 0 16px;
}
.detail-close {
    position: absolute; top: 10px; right: 14px; background: none; border: none;
    color: #888; font-size: 28px; cursor: pointer; z-index: 10; line-height: 1;
}
.detail-close:hover { color: #fff; }
.detail-header {
    display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px;
}
.detail-avatar {
    width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
    border: 2px solid #e94560;
}
.detail-username { font-weight: 700; font-size: 15px; }
.detail-username a { color: #e94560; text-decoration: none; }
.detail-username a:hover { text-decoration: underline; }
.detail-time { font-size: 12px; color: #666; }
.detail-food-pic {
    width: 100%; max-height: 300px; object-fit: cover; cursor: pointer;
    border-top: 1px solid #1a1a3a; border-bottom: 1px solid #1a1a3a;
}
.detail-title {
    font-size: 20px; font-weight: 800; color: #e94560;
    padding: 14px 20px 2px; line-height: 1.3;
}
.detail-subtitle {
    font-size: 14px; color: #aaa; padding: 0 20px 4px;
}
.detail-stats { padding: 8px 20px 0; }
.detail-stat-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,.06);
    font-size: 14px;
}
.detail-stat-row:last-child { border-bottom: none; }
.detail-stat-label { color: #aaa; white-space: nowrap; margin-right: 12px; }
.detail-stat-value {
    display: flex; align-items: center; gap: 8px; font-weight: 600; color: #eee;
    flex: 1; justify-content: flex-end; text-align: right;
}
.detail-rating-bar {
    width: 80px; height: 8px; background: #1a1a2e; border-radius: 4px;
    overflow: hidden; flex-shrink: 0;
}
.detail-rating-fill { height: 100%; border-radius: 4px; transition: width .3s; }
.detail-sht-section {
    margin: 16px 20px 0; padding-top: 12px;
    border-top: 1px dashed #333; text-align: center;
}
.detail-sht-warn {
    font-size: 13px; color: #f97316; margin-bottom: 10px; font-weight: 600;
}
.detail-sht-pic {
    width: 100%; max-height: 280px; object-fit: cover; border-radius: 10px;
    cursor: pointer;
}
.detail-close-btn {
    display: block; margin: 16px auto 0; padding: 8px 32px; font-size: 14px;
    background: #0f3460;
}
.wt-clickable { cursor: pointer; }
.wt-clickable:hover { background: rgba(233,69,96,.06); }

/* ========================================
   HAMBURGER MENU
   ======================================== */
.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    padding: 6px; flex-direction: column; gap: 5px; z-index: 200;
}
.hamburger span {
    display: block; width: 26px; height: 3px; background: #e94560;
    border-radius: 2px; transition: transform .25s, opacity .2s;
}
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ========================================
   RESPONSIVE — PHONE  (≤ 600px)
   ======================================== */
@media (max-width: 600px) {
    body { padding: 0 8px; }

    /* Nav hamburger */
    .hamburger { display: flex; }
    .nav { padding: 12px 10px; position: relative; }
    .nav .logo { font-size: 18px; }
    .nav .tagline { font-size: 9px; }
    .nav .links {
        display: none; flex-direction: column; width: 100%;
        background: #16213e; border-radius: 0 0 12px 12px;
        padding: 12px; gap: 8px; order: 3;
        border-top: 1px solid #0f3460;
    }
    .nav .links.open { display: flex; }
    .nav .sht-now { width: 100%; text-align: center; padding: 10px; font-size: 15px; }
    .avatar-dropdown { width: 100%; }
    .avatar-dropdown .avatar-circle { display: none; }
    .dropdown-menu {
        display: block !important; position: static !important;
        background: none; box-shadow: none; border: none;
        border-radius: 0; min-width: auto;
    }
    .dropdown-menu a {
        padding: 10px 12px; border-radius: 8px; background: #0f3460;
        margin-bottom: 4px; text-align: center;
    }
    .dropdown-menu a:hover { background: #1a2a50; }

    /* Header buttons when not logged in */
    .nav .links .header-btn { width: 100%; text-align: center; display: block; }

    /* Cards */
    .card { padding: 16px 12px; border-radius: 12px; margin-top: 12px; }

    /* Submenu / tabs */
    .submenu, .profile-tabs { flex-wrap: wrap; }
    .submenu .sub-btn, .profile-tabs .tab-btn { font-size: 11px; padding: 10px 4px; letter-spacing: 0; }
    .media-subtabs { flex-wrap: wrap; }
    .media-sub, .log-sub { font-size: 11px; padding: 8px 4px; }

    /* Wall table — horizontal scroll */
    .wall-table { font-size: 12px; }
    .wall-table thead th { padding: 6px 6px; font-size: 10px; }
    .wall-table td { padding: 8px 6px; }
    .wt-action { max-width: 120px; }

    /* Tally grid */
    .tally-grid { gap: 8px; }
    .tally-box { padding: 12px 8px; }
    .tally-box .num { font-size: 24px; }

    /* Sht button */
    .sht-btn { font-size: 16px; padding: 12px; }

    /* Forms */
    .form-row, .field-row { grid-template-columns: 1fr; gap: 10px; }
    input[type="datetime-local"] { font-size: 13px; padding: 8px 2px; max-width: calc(100% - 4px); }

    /* Feed */
    .feed-tags { padding-left: 0; }
    .feed-thumbs { padding-left: 0; }

    /* Media grid */
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }

    /* Profile */
    .profile-header { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
    .profile-name-row { justify-content: center; }
    .profile-info-grid { grid-template-columns: 1fr; text-align: left; }
    .avatar-preview-lg { width: 90px; height: 90px; }

    /* Memberlist */
    .member-item { padding: 10px 12px; gap: 10px; }
    .member-avatar { width: 36px; height: 36px; }
    .member-name { font-size: 14px; }

    /* Sht confirm popup */
    .sht-confirm-box { padding: 24px 20px; }
    .sht-confirm-emoji { font-size: 48px; }

    /* Edit modal */
    .edit-modal { max-width: 100%; border-radius: 12px 12px 0 0; }
    .edit-modal form { padding: 12px 14px; }

    /* Bristol scale */
    .bristol-select, .sht-bristol-select { grid-template-columns: repeat(4, 1fr); }

    /* Lightbox */
    .lightbox-overlay img { max-width: 95vw; max-height: 85vh; border-radius: 6px; }
}

/* ========================================
   RESPONSIVE — TABLET PORTRAIT (601–900px)
   ======================================== */
@media (min-width: 601px) and (max-width: 900px) {
    body { padding: 0 12px; }

    .hamburger { display: flex; }
    .nav .links {
        display: none; flex-direction: column; width: 100%;
        background: #16213e; border-radius: 0 0 12px 12px;
        padding: 12px; gap: 8px; order: 3;
        border-top: 1px solid #0f3460;
    }
    .nav .links.open { display: flex; }
    .nav .sht-now { width: 100%; text-align: center; }
    .avatar-dropdown { width: 100%; }
    .avatar-dropdown .avatar-circle { display: none; }
    .dropdown-menu {
        display: block !important; position: static !important;
        background: none; box-shadow: none; border: none;
        min-width: auto;
    }
    .dropdown-menu a {
        display: inline-block; padding: 10px 14px; border-radius: 8px;
        background: #0f3460; margin: 3px;
    }
    .nav .links .header-btn { display: inline-block; }

    /* Tables */
    .wall-table { font-size: 13px; }
    .wt-action { max-width: 200px; }

    /* Cards */
    .card { padding: 24px 18px; }

    /* Grid adjustments */
    .tally-grid { grid-template-columns: repeat(4, 1fr); }
    .form-row, .field-row { grid-template-columns: 1fr 1fr; }
    .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
}

/* ========================================
   RESPONSIVE — TABLET LANDSCAPE / ORIENTATION
   ======================================== */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: landscape) {
    .hamburger { display: none; }
    .nav .links { display: flex !important; }
    .avatar-dropdown .avatar-circle { display: block !important; }
    .dropdown-menu {
        display: none !important; position: absolute !important;
        background: #16213e !important; box-shadow: 0 8px 32px rgba(0,0,0,.6) !important;
        border: 1px solid #0f3460 !important; min-width: 180px !important;
    }
    .dropdown-menu.show { display: block !important; }
    .tally-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========================================
   RESPONSIVE — DESKTOP (> 1024px)
   ======================================== */
@media (min-width: 1025px) {
    .hamburger { display: none; }
}

/* ========================================
   SAFE AREA (notched phones)
   ======================================== */
@supports (padding: env(safe-area-inset-top)) {
    .nav { padding-top: calc(12px + env(safe-area-inset-top)); }
    body { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
}

/* ========================================
   TOUCH-FRIENDLY OVERRIDES
   ======================================== */
@media (pointer: coarse) {
    .act-btn { font-size: 20px; padding: 6px 8px; }
    .wall-table td { padding: 12px 8px; }
    .dropdown-menu a { padding: 14px 16px; }
    select, input[type="text"], input[type="number"], input[type="email"], input[type="password"] {
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
}
