:root {
    --bg: #f7f2e8;
    --surface: #fffaf0;
    --surface-strong: #ffffff;
    --text: #15231e;
    --muted: #68746f;
    --line: rgba(34, 90, 72, 0.16);
    --accent: #225a48;
    --accent-soft: #dfeee7;
    --gold: #f0b45b;
    --danger: #b64032;
    --shadow: 0 18px 40px rgba(29, 48, 42, 0.12);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--bg);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
    background:
        linear-gradient(135deg, rgba(120, 168, 144, 0.24), transparent 34%),
        linear-gradient(315deg, rgba(240, 180, 91, 0.20), transparent 32%),
        var(--bg);
}

a {
    color: inherit;
}

button,
input,
textarea {
    font: inherit;
}

.app-shell,
.auth-shell {
    width: min(100%, 760px);
    margin: 0 auto;
    padding: max(18px, env(safe-area-inset-top)) 14px 36px;
}

.app-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin: 6px 0 18px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.02;
}

h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.22;
}

p {
    line-height: 1.45;
}

.brand-panel {
    min-height: 34vh;
    display: grid;
    align-content: end;
    padding: 24px 0;
}

.brand-panel h1 {
    max-width: 620px;
    font-size: 42px;
}

.brand-panel p:last-child {
    max-width: 520px;
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 17px;
}

.auth-card,
.quick-add {
    background: rgba(255, 250, 240, 0.86);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 14px;
    backdrop-filter: blur(16px);
}

.stack {
    display: grid;
    gap: 12px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

input,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-strong);
    color: var(--text);
    outline: none;
    padding: 15px 16px;
    font-size: 17px;
}

textarea {
    resize: vertical;
}

input:focus,
textarea:focus {
    border-color: rgba(34, 90, 72, 0.42);
    box-shadow: 0 0 0 4px rgba(34, 90, 72, 0.09);
}

button {
    min-height: 54px;
    border: 0;
    border-radius: 8px;
    background: #e4e8de;
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

button.primary {
    background: var(--accent);
    color: #fffaf0;
}

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

.tab-button {
    min-height: 46px;
    background: transparent;
    border: 1px solid var(--line);
    color: var(--muted);
}

.tab-button.active {
    background: var(--accent-soft);
    border-color: rgba(34, 90, 72, 0.24);
    color: var(--accent);
}

.hidden {
    display: none;
}

.status {
    margin: 12px 0;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--accent-soft);
    border: 1px solid rgba(34, 90, 72, 0.18);
    color: var(--accent);
    font-weight: 800;
}

.status.error {
    background: rgba(182, 64, 50, 0.10);
    border-color: rgba(182, 64, 50, 0.18);
    color: var(--danger);
}

.icon-action,
.delete-button {
    width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: none;
}

.icon-action {
    font-size: 22px;
    transform: rotate(45deg);
}

.tag-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 16px 0;
    scrollbar-width: none;
}

.tag-strip::-webkit-scrollbar {
    display: none;
}

.tag-strip a,
.item-tags a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}

.tag-strip a.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fffaf0;
}

.remember-list {
    display: grid;
    gap: 10px;
}

.remember-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 13px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(34, 90, 72, 0.12);
    box-shadow: 0 10px 26px rgba(29, 48, 42, 0.08);
}

.remember-item.done {
    opacity: 0.64;
}

.remember-item.done h2 {
    text-decoration: line-through;
}

.check-button {
    position: relative;
    width: 30px;
    min-height: 30px;
    margin-top: 1px;
    border-radius: 999px;
    border: 2px solid rgba(34, 90, 72, 0.42);
    background: transparent;
    box-shadow: none;
}

.check-button.checked {
    background: var(--accent);
    border-color: var(--accent);
}

.check-button.checked::after {
    content: "";
    position: absolute;
    left: 9px;
    top: 4px;
    width: 7px;
    height: 14px;
    border-right: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(42deg);
}

.item-content {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.item-content p {
    margin: 0;
    color: var(--muted);
    word-break: break-word;
}

.item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.item-tags a {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
    background: var(--accent-soft);
}

.delete-button {
    min-height: 34px;
    width: 34px;
    color: var(--danger);
    font-size: 24px;
    line-height: 1;
}

.empty {
    margin: 18px 0;
    color: var(--muted);
    text-align: center;
}

@media (min-width: 680px) {
    .quick-add .stack {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 180px;
    }

    .quick-add textarea,
    .quick-add button {
        grid-column: auto;
    }
}

@media (max-width: 430px) {
    .app-shell,
    .auth-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    h1 {
        font-size: 30px;
    }

    .brand-panel h1 {
        font-size: 36px;
    }
}
