* {
    box-sizing: border-box;
}

:root {
    --saffron: #FFC107;
    --orange: #FF8A00;
    --deep: #FF5722;
    --maroon: #7A1F35;
    --cream: #FFF8EF;
    --brown: #3E2723;
    --bg: #FFF4E6;
    --muted: #806F68;
    --border: #EAD9C7;
    --green: #2E7D32;
    --red: #B3261E;

    --shadow:
        0 8px 28px rgba(62, 39, 35, .10);
}

/* =========================================
   GLOBAL
========================================= */

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    background:
        radial-gradient(
            circle at top center,
            rgba(255, 193, 7, .16),
            transparent 32%
        ),
        linear-gradient(
            180deg,
            #FFFDF9 0%,
            #FFF8EF 48%,
            #FFF1DF 100%
        );

    color: var(--brown);

    font-family: 'Kalam', cursive;

    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
input,
textarea {
    font-family: 'Kalam', cursive;
}


/* =========================================
   ADMIN TOP BAR
   User WebView pages do NOT use this.
========================================= */

.topbar {
    min-height: 64px;

    background: var(--saffron);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    box-shadow:
        0 3px 12px rgba(62, 39, 35, .15);

    position: sticky;
    top: 0;

    z-index: 20;
}

.brand {
    color: #fff;
    font-size: 23px;
    font-weight: 700;
}

.admin-link {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: rgba(255, 255, 255, .20);

    color: #fff;

    font-size: 20px;
}

.back-link {
    color: #fff;
    font-size: 17px;
    font-weight: 700;
}


/* =========================================
   MAIN USER CONTAINER
========================================= */

.container {
    width: min(760px, calc(100% - 26px));

    margin: auto;

    padding:
        24px
        0
        110px;
}

.narrow {
    width: min(680px, calc(100% - 26px));
}


/* =========================================
   PAGE HEADING
========================================= */

.page-heading {
    text-align: center;

    padding:
        14px
        8px
        28px;
}

.om-small {
    color: var(--orange);

    font-size: 19px;

    font-weight: 700;

    margin-bottom: 3px;
}

.page-heading h1 {
    color: var(--maroon);

    margin: 0;

    font-size: 40px;

    line-height: 1.1;

    font-weight: 700;
}

.page-heading p {
    color: var(--muted);

    font-size: 17px;

    margin:
        9px
        0
        0;
}


/* =========================================
   POST LIST
========================================= */

.post-list {
    display: flex;

    flex-direction: column;

    gap: 17px;
}


/* =========================================
   POST CARD
========================================= */

.post-list-card {
    position: relative;

    display: block;

    padding:
        21px
        21px
        18px;

    background:
        linear-gradient(
            145deg,
            #FFFDF9,
            #FFF6EB
        );

    border:
        1px solid
        rgba(122, 31, 53, .10);

    border-radius: 26px;

    box-shadow:
        0 7px 22px rgba(62, 39, 35, .08),
        0 2px 5px rgba(62, 39, 35, .04);

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}


/* Android WebView touch effect */

.post-list-card:active {
    transform: scale(.985);

    box-shadow:
        0 4px 14px rgba(62, 39, 35, .08);
}


/* =========================================
   POST CARD TOP
========================================= */

.post-card-top {
    display: flex;

    align-items: center;

    justify-content: space-between;

    margin-bottom: 5px;
}

.post-dot {
    color: var(--orange);

    font-size: 20px;

    font-weight: 700;
}

.post-date {
    color: #927E74;

    font-size: 14px;
}


/* =========================================
   POST CARD HEADING
========================================= */

.post-list-card h2 {
    color: var(--maroon);

    margin:
        4px
        0
        6px;

    font-size: 25px;

    line-height: 1.25;

    font-weight: 700;
}


/* =========================================
   POST PREVIEW
========================================= */

.post-list-card p {
    color: var(--brown);

    font-size: 17px;

    line-height: 1.55;

    margin:
        0
        0
        13px;
}


/* =========================================
   READ MORE
========================================= */

.read-more {
    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 6px;

    color: var(--maroon);

    font-size: 16px;

    font-weight: 700;
}

.read-more span {
    font-family: Arial, sans-serif;

    font-size: 20px;

    transition:
        transform .2s ease;
}

.post-list-card:hover .read-more span {
    transform: translateX(3px);
}


/* =========================================
   FLOATING SEND POST BUTTON
========================================= */

.floating-btn {
    position: fixed;

    right: 18px;
    bottom: 18px;

    z-index: 50;

    display: flex;

    align-items: center;

    gap: 7px;

    background:
        linear-gradient(
            135deg,
            #7A1F35,
            #65152A
        );

    color: #fff;

    padding:
        13px
        19px;

    border-radius: 999px;

    font-size: 17px;

    font-weight: 700;

    box-shadow:
        0 10px 28px rgba(122, 31, 53, .28),
        0 3px 8px rgba(62, 39, 35, .12);

    transition:
        transform .15s ease;
}

.floating-btn:active {
    transform: scale(.96);
}

.plus {
    font-size: 24px;

    line-height: 1;
}


/* =========================================
   SINGLE POST PAGE
========================================= */

.single-post {
    background:
        linear-gradient(
            145deg,
            #FFFDF9,
            #FFF6EB
        );

    border:
        1px solid
        rgba(122, 31, 53, .10);

    border-radius: 26px;

    box-shadow: var(--shadow);

    padding:
        28px
        24px;
}

.single-post h1 {
    color: var(--maroon);

    font-size: 33px;

    line-height: 1.25;

    margin:
        4px
        0;
}

.single-post-body {
    font-size: 20px;

    line-height: 1.75;

    color: var(--brown);
}

.post-ending {
    text-align: center;

    color: var(--maroon);

    font-size: 20px;

    font-weight: 700;

    margin-top: 30px;
}


/* =========================================
   SECONDARY BUTTON
========================================= */

.secondary-btn {
    display: block;

    text-align: center;

    background:
        linear-gradient(
            135deg,
            var(--orange),
            var(--deep)
        );

    color: #fff;

    border-radius: 15px;

    padding: 12px;

    margin-top: 18px;

    font-size: 18px;

    font-weight: 700;

    box-shadow:
        0 6px 15px rgba(255, 87, 34, .18);
}


/* =========================================
   FORM / CARD
========================================= */

.form-card,
.card {
    background: var(--cream);

    border:
        1px solid
        rgba(122, 31, 53, .10);

    border-radius: 26px;

    box-shadow: var(--shadow);

    padding: 28px;
}

.form-card h1,
.card h1 {
    color: var(--maroon);

    font-size: 30px;

    margin:
        0
        0
        5px;
}

.muted {
    color: var(--muted);

    font-size: 16px;
}


/* =========================================
   FORM LABEL
========================================= */

label {
    display: block;

    color: var(--maroon);

    font-size: 18px;

    font-weight: 700;

    margin:
        18px
        0
        7px;
}


/* =========================================
   INPUT / TEXTAREA
========================================= */

input,
textarea {
    width: 100%;

    border:
        1px solid
        #DCC7B3;

    border-radius: 14px;

    padding:
        13px
        14px;

    background: #FFFDF9;

    color: var(--brown);

    font-size: 17px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

input:focus,
textarea:focus {
    border-color: var(--orange);

    box-shadow:
        0 0 0 3px rgba(255, 138, 0, .12);
}

textarea {
    resize: vertical;

    min-height: 190px;
}


/* =========================================
   PRIMARY BUTTON
========================================= */

.primary-btn {
    width: 100%;

    border: 0;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            var(--maroon),
            #65152A
        );

    color: #fff;

    padding:
        14px
        18px;

    margin-top: 20px;

    font-size: 19px;

    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 7px 18px rgba(122, 31, 53, .20);
}

.primary-btn:active {
    transform: scale(.99);
}

.link-btn {
    text-align: center;
}


/* =========================================
   SUCCESS / ERROR
========================================= */

.success,
.error {
    padding:
        12px
        14px;

    border-radius: 14px;

    margin:
        16px
        0;

    font-size: 16px;
}

.success {
    background: #EAF6EA;

    color: var(--green);
}

.error {
    background: #FFF0EE;

    color: var(--red);
}


/* =========================================
   SUCCESS CARD
========================================= */

.success-card {
    background: var(--cream);

    border:
        1px solid
        rgba(122, 31, 53, .10);

    border-radius: 26px;

    box-shadow: var(--shadow);

    text-align: center;

    padding:
        45px
        25px;
}

.success-icon {
    width: 64px;

    height: 64px;

    display: grid;

    place-items: center;

    margin: auto;

    border-radius: 50%;

    background: #EAF6EA;

    color: var(--green);

    font:
        700
        32px
        Arial;
}


/* =========================================
   EMPTY STATE
========================================= */

.empty-state {
    background:
        linear-gradient(
            145deg,
            #FFFDF9,
            #FFF6EB
        );

    border:
        1px solid
        rgba(122, 31, 53, .10);

    border-radius: 26px;

    box-shadow: var(--shadow);

    text-align: center;

    padding:
        42px
        20px;
}

.empty-state h2 {
    color: var(--maroon);

    margin:
        8px
        0;
}

.empty-state p {
    color: var(--muted);

    font-size: 16px;
}

.om-mark {
    text-align: center;

    color: var(--maroon);

    font-size: 44px;

    font-weight: 700;
}


/* =========================================
   LOGIN / SETUP
========================================= */

.center-page {
    min-height: 100vh;

    display: grid;

    place-items: center;

    padding: 20px;
}

.login-card,
.setup-card {
    width: min(440px, 100%);
}

.login-card h2,
.setup-card h2 {
    text-align: center;
}

.small-note {
    color: var(--muted);

    font-size: 14px;
}


/* =========================================
   ADMIN
========================================= */

.admin-container {
    width: min(
        1050px,
        calc(100% - 24px)
    );
}

.admin-section {
    margin-bottom: 38px;
}

.section-title {
    display: flex;

    align-items: center;

    gap: 9px;
}

.section-title h1 {
    color: var(--maroon);

    font-size: 27px;
}

.count-badge {
    background: var(--maroon);

    color: #fff;

    border-radius: 999px;

    padding:
        3px
        9px;
}


/* =========================================
   ADMIN POST
========================================= */

.admin-post {
    background: var(--cream);

    border:
        1px solid
        rgba(122, 31, 53, .10);

    border-radius: 26px;

    box-shadow: var(--shadow);

    padding: 19px;

    margin-bottom: 14px;
}

.admin-post.pending {
    border-left:
        6px solid
        var(--orange);
}

.admin-post.approved {
    border-left:
        6px solid
        var(--green);
}

.admin-post.rejected {
    border-left:
        6px solid
        #999;
}

.admin-post h2 {
    color: var(--maroon);

    font-size: 24px;

    margin:
        4px
        0;
}

.post-body {
    font-size: 17px;

    line-height: 1.6;

    overflow-wrap: anywhere;
}


/* =========================================
   ADMIN STATUS
========================================= */

.admin-status {
    display: inline-block;

    border-radius: 999px;

    padding:
        3px
        9px;

    font-size: 13px;

    font-weight: 700;
}

.pending-label {
    background: #FFF0D2;

    color: #8A5A00;
}

.approved-label {
    background: #EAF6EA;

    color: var(--green);
}

.rejected-label {
    background: #eee;

    color: #666;
}


/* =========================================
   ADMIN ACTIONS
========================================= */

.admin-actions {
    display: flex;

    gap: 8px;

    flex-wrap: wrap;

    margin-top: 16px;

    padding-top: 14px;

    border-top:
        1px solid
        var(--border);
}

.admin-actions form {
    margin: 0;
}

.admin-actions button,
.view-btn {
    border: 0;

    border-radius: 10px;

    padding:
        9px
        13px;

    font-size: 16px;

    font-weight: 700;

    cursor: pointer;
}

.approve-btn {
    background: #EAF6EA;

    color: var(--green);
}

.reject-btn {
    background: #FFF0D2;

    color: #8A5A00;
}

.delete-btn {
    background: #FFF0EE;

    color: var(--red);
}

.view-btn {
    background: #FBE9D7;

    color: var(--maroon);
}


/* =========================================
   ADMIN LOGOUT
========================================= */

.logout-btn {
    color: var(--maroon);

    background:
        rgba(255, 255, 255, .45);

    border-radius: 10px;

    padding:
        8px
        12px;

    font-weight: 700;
}

.admin-back {
    display: block;

    text-align: center;

    margin-top: 20px;

    color: var(--maroon);

    font-weight: 700;
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .brand {
        font-size: 19px;
    }

    .container,
    .narrow {
        width: calc(100% - 18px);
    }

    .page-heading {
        padding-top: 12px;
    }

    .page-heading h1 {
        font-size: 34px;
    }

    .page-heading p {
        font-size: 16px;
    }

    .post-list {
        gap: 14px;
    }

    .post-list-card {
        padding:
            18px
            18px
            17px;
    }

    .post-list-card h2 {
        font-size: 23px;
    }

    .post-list-card p {
        font-size: 16px;
    }

    .single-post {
        padding:
            23px
            18px;
    }

    .single-post h1 {
        font-size: 29px;
    }

    .single-post-body {
        font-size: 18px;
    }

    .form-card,
    .card {
        padding:
            22px
            18px;
    }

    .floating-btn {
        right: 12px;

        bottom: 12px;

        padding:
            12px
            15px;

        font-size: 16px;
    }

    .admin-post {
        padding: 17px;
    }

    .admin-actions {
        gap: 7px;
    }
}


/* =========================================
   VERY SMALL MOBILE
========================================= */

@media (max-width: 380px) {

    .page-heading h1 {
        font-size: 32px;
    }

    .post-list-card h2 {
        font-size: 21px;
    }

    .floating-btn {
        right: 10px;
        bottom: 10px;

        padding:
            11px
            14px;
    }

    .floating-btn .plus {
        font-size: 22px;
    }
}