:root {
    --page: #faf6f4;
    --card: #ffffff;
    --ink: #2f2320;
    --ink-2: #8a7a72;
    --hairline: #ece5e0;
    --raised: #f4eeea;
    --primary: #4a2c2a;
    --red: #b3261e;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
    background: #f8f3f2 url("bg-floral.jpg") center / cover fixed no-repeat;
    color: var(--ink);
    font-family: "Segoe UI", Tahoma, "Noto Kufi Arabic", "Noto Sans Arabic", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    padding: 40px 16px;
}
.card {
    max-width: 560px;
    margin: 0 auto;
    background: var(--card);
    border: 1px solid var(--hairline);
    border-radius: 16px;
    padding: 24px 22px 28px;
}
.profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    padding: 12px 0 20px;
    border-bottom: 1px solid var(--hairline);
    margin-bottom: 20px;
}
.brand {
    font-size: 14px;
    color: var(--ink-2);
}
.avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 4px;
    background: var(--raised);
}
.name { margin: 0; font-size: 26px; font-weight: 600; color: var(--ink); }
.bio { margin: 0; font-size: 14px; line-height: 22px; color: var(--ink-2); max-width: 40ch; }
.group-label { font-size: 20px; font-weight: 600; margin: 0 0 12px; color: var(--ink); }
.group-body { margin: 0 0 8px; color: var(--ink); }
.field-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ink);
    margin: 14px 0 6px;
}
.text-input {
    width: 100%;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 10px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--ink);
    background: #fff;
}
.text-input:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.hint { font-size: 12px; line-height: 20px; color: var(--ink-2); margin: 6px 0 0; }
.song-preview {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}
.song-preview-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
}
.song-preview-row img {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--raised);
    flex-shrink: 0;
}
.song-preview-row .disc {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--raised);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.song-preview-row .platform { font-size: 13px; font-weight: 600; color: var(--ink); }
.song-preview-row .ok { font-size: 12px; color: var(--ink-2); }
.box {
    width: 100%;
    min-height: 110px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    line-height: 24px;
    color: var(--ink);
    background: #fff;
    resize: vertical;
}
.box:focus { outline: 2px solid var(--primary); outline-offset: -1px; }
.meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--ink-2);
    margin-top: 6px;
}
.actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 16px;
}
.btn {
    border-radius: 8px;
    padding: 10px 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
}
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--hairline); }
.btn:disabled { opacity: 0.6; cursor: default; }
.emoji-toggle {
    border: 1px solid var(--hairline);
    background: #fff;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.emoji-toggle[aria-expanded="true"] { border-color: var(--primary); background: var(--raised); }
.picker {
    margin-top: 10px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    background: #fff;
    max-height: 260px;
    overflow-y: auto;
    padding: 8px 10px;
}
.picker-group + .picker-group { margin-top: 8px; }
.picker-label { font-size: 12px; color: var(--ink-2); margin-bottom: 4px; }
.picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 2px; }
.picker-grid button {
    border: none;
    background: none;
    font-size: 22px;
    line-height: 1;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
}
.picker-grid button:hover, .picker-grid button:focus-visible { background: var(--raised); }
.note { font-size: 12px; line-height: 20px; color: var(--ink-2); margin: 12px 0 0; }
.error { color: var(--red); font-size: 13px; margin: 10px 0 0; }

.links-box {
    min-height: 84px;
    direction: ltr;
    text-align: left;
    font-size: 13px;
    line-height: 22px;
}

.attach-btn { width: 100%; margin-top: 8px; }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.files li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--hairline);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--ink);
    background: #fff;
}
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files button {
    border: none;
    background: none;
    color: var(--red);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    padding: 6px 4px;
    flex-shrink: 0;
}

.attach-btn.upload-first, .attach-btn {
    width: 100%;
    margin-top: 0;
    padding: 18px 14px;
    border-style: dashed;
    border-width: 1.5px;
}
.link-label { margin-top: 18px; }

/* ===== multi-user additions ===== */
.disc-avatar {
    width: 96px; height: 96px; border-radius: 50%;
    background: var(--raised);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 44px; margin-top: 4px;
}
.topnav {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px; font-size: 13px; color: var(--ink-2);
}
.topnav a { color: var(--ink-2); text-decoration: none; }
.topnav a:hover { text-decoration: underline; }
.linkbtn { border: none; background: none; font: inherit; color: var(--ink-2); cursor: pointer; padding: 6px 2px; }
.linkbtn:hover { text-decoration: underline; }

/* roomy auth forms */
.tabs { display: flex; gap: 10px; margin: 4px 0 18px; }
.tabs button {
    flex: 1; padding: 14px 10px; min-height: 52px;
    border: 1.5px solid var(--hairline); border-radius: 12px;
    background: #fff; color: var(--ink-2);
    font: inherit; font-size: 16px; font-weight: 600; cursor: pointer;
}
.tabs button.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.auth-form label.field-label { font-size: 15px; margin: 16px 0 8px; }
.auth-form .text-input {
    padding: 14px 16px; min-height: 52px; font-size: 16px;
    border-radius: 10px; border: 1.5px solid var(--hairline);
}
.auth-form .btn.primary {
    width: 100%; margin-top: 22px; padding: 15px 18px;
    min-height: 54px; font-size: 16px; border-radius: 12px;
}
.auth-note { font-size: 13px; color: var(--ink-2); margin-top: 14px; text-align: center; }
.auth-note a { color: var(--primary); }

/* link box (share link) */
.sharebox {
    display: flex; gap: 8px; align-items: center;
    border: 1.5px dashed var(--hairline); border-radius: 12px;
    padding: 10px 12px; background: #fff; margin-top: 6px;
}
.sharebox code {
    flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    direction: ltr; text-align: left; font-size: 13px; color: var(--ink);
}
.sharebox .btn { padding: 10px 16px; min-height: 44px; }

/* song entries in inbox */
.song-item {
    border: 1px solid var(--hairline); border-radius: 12px;
    padding: 14px 14px 10px; margin-top: 12px; background: #fff;
    display: flex; flex-direction: column; gap: 8px;
}
.song-item .song-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.song-item .song-from { font-weight: 600; font-size: 14px; }
.song-item .song-date { font-size: 11px; color: var(--ink-2); }
.song-item audio { width: 100%; height: 44px; }
.link-chips { display: flex; flex-direction: column; gap: 6px; }
.link-chips a {
    display: block; direction: ltr; text-align: left;
    border: 1px solid var(--hairline); border-radius: 8px;
    padding: 10px 12px; font-size: 13px; color: var(--primary);
    text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    background: var(--raised);
}
.song-note { font-size: 14px; line-height: 24px; color: var(--ink); white-space: pre-wrap; }
.song-file-name { font-size: 13px; color: var(--ink-2); direction: ltr; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.song-actions { display: flex; gap: 14px; border-top: 1px solid var(--hairline); padding-top: 8px; }
.song-actions button {
    border: none; background: none; font: inherit; font-size: 13px;
    color: var(--ink-2); cursor: pointer; padding: 6px 2px;
}
.song-actions button.danger { color: var(--red); }
.reported-tag { font-size: 11px; color: var(--red); }
.empty { text-align: center; color: var(--ink-2); padding: 30px 0 10px; font-size: 14px; }

/* google sign-in */
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; color: var(--ink-2); font-size: 13px; }
.oauth-divider::before, .oauth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--hairline); }
.google-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; margin-top: 14px; padding: 14px 18px; min-height: 54px;
    border-radius: 12px; font-size: 16px; font-weight: 600;
    text-decoration: none; border: 1.5px solid var(--hairline);
}


/* ===== nav bar (no dead ends) ===== */
.navbar {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: -4px -4px 18px; padding: 8px 10px;
    border-bottom: 1px solid var(--hairline);
}
.navbar .nav-brand {
    font-size: 14px; color: var(--ink); font-weight: 600;
    text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.navbar .nav-links { display: flex; align-items: center; gap: 4px; }
.navbar .nav-links a, .navbar .nav-links button {
    border: none; background: none; font: inherit; font-size: 13px; font-weight: 600;
    color: var(--ink-2); cursor: pointer; padding: 10px 10px; min-height: 40px;
    border-radius: 8px; text-decoration: none;
    display: inline-flex; align-items: center;
}
.navbar .nav-links a:hover, .navbar .nav-links button:hover { background: var(--raised); color: var(--ink); }
.navbar .nav-links .active { color: var(--primary); }

/* ===== distinctive memorable touches (soft) ===== */
.disc-avatar {
    border: 3px solid #f3dfe3;
    box-shadow: 0 0 0 6px rgba(243, 223, 227, .45);
    animation: gentle-float 5s ease-in-out infinite;
}
@keyframes gentle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}
.brand { letter-spacing: .4px; }
.btn.primary {
    background: linear-gradient(135deg, #4a2c2a 0%, #6d4340 100%);
    box-shadow: 0 3px 10px rgba(74, 44, 42, .18);
}
.tabs button.active { background: linear-gradient(135deg, #4a2c2a 0%, #6d4340 100%); }
.card { box-shadow: 0 6px 24px rgba(74, 44, 42, .07); }
.footer-cta { text-align: center; margin-top: 18px; font-size: 13px; color: var(--ink-2); }
.footer-cta a { color: var(--primary); font-weight: 600; text-decoration: none; }
