:root {
    --paper: #FDFBF7;
    --paper-dark: #F5F0E8;
    --ink: #2C2A26;
    --ink-light: #5C5852;
    --accent: #8B7355;
    --accent-light: #C4B5A0;
    --grid: #E8E2D9;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: var(--paper-dark);
    color: var(--ink);
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
    -webkit-text-size-adjust: 100%;
    overscroll-behavior: none;
}

.top-toolbar {
    padding-top: max(18px, env(safe-area-inset-top));
    margin-bottom: 10px;
}

@media (min-width: 640px) {
    .top-toolbar {
        padding-top: 0;
        margin-bottom: 1.5rem;
    }
}

.font-display {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.report-container {
    max-width: 480px;
    width: calc(100% - 32px);
    margin: 0 auto;
    background: linear-gradient(180deg, var(--paper) 0%, #FFFCF8 100%);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.05),
        0 10px 30px rgba(0, 0, 0, 0.08),
        inset 0 0 60px rgba(139, 115, 85, 0.03);
    border-radius: 8px;
    position: relative;
}

@media (min-width: 640px) {
    .report-container {
        width: 100%;
    }
}

.report-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    opacity: 0.3;
    border-radius: 8px;
    background: radial-gradient(ellipse at top, rgba(139, 115, 85, 0.03) 0%, transparent 50%);
}

.header-area {
    text-align: center;
    padding: 36px 28px 20px;
    position: relative;
}

.header-decoration {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.header-line {
    width: 48px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-light), transparent);
}

.date-input {
    text-align: center;
    border: none;
    font-size: 1.25rem;
    color: var(--ink);
    outline: none;
    background: transparent;
    letter-spacing: 0.12em;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    width: 200px;
    text-transform: uppercase;
}

.table-wrapper {
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

.report-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.report-table th {
    background: transparent;
    font-weight: 600;
    color: var(--accent);
    font-size: 0.85rem;
    letter-spacing: 0.15em;
    height: 44px;
    border-bottom: 2px solid var(--grid);
    vertical-align: bottom;
    padding-bottom: 8px;
}

.report-table th:first-child {
    color: var(--accent);
    font-size: 0.85rem;
}

.report-table td {
    text-align: center;
    padding: 0;
    height: 42px;
    vertical-align: middle;
    border-bottom: 1px solid var(--grid);
    border-right: 1px solid rgba(232, 226, 217, 0.4);
}

.report-table td:last-child {
    border-right: none;
}

.report-table td:first-child {
    width: 18%;
    font-weight: 500;
    color: var(--ink-light);
    background: transparent;
    font-size: 0.85rem;
    border-right: 1px solid rgba(232, 226, 217, 0.4);
    vertical-align: middle;
}

.report-table tr:last-child td {
    border-bottom: none;
}

.editable-cell {
    position: relative;
    height: 42px;
}

.editable-cell input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    text-align: center;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 400;
    outline: none;
    color: var(--ink-light);
    line-height: normal;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editable-cell input::placeholder {
    color: var(--grid);
}

.icon-sun,
.icon-moon {
    width: 14px;
    height: 14px;
    margin-bottom: 4px;
}

.icon-sun {
    color: #D4A574;
}

.icon-moon {
    width: 10px;
    height: 10px;
    color: #8B9DC3;
}

.bottom-section {
    padding: 20px 28px 28px;
    position: relative;
    z-index: 1;
}

.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.section-divider-text {
    font-size: 0.65rem;
    color: var(--accent-light);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    font-family: "Cormorant Garamond", serif;
}

.reflection-item {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    position: relative;
    padding-left: 16px;
}

.reflection-item::before {
    content: "✦";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent-light);
    font-size: 0.65rem;
    opacity: 0.6;
}

.reflection-item:hover .remove-btn {
    opacity: 1;
}

.remove-btn {
    position: absolute;
    right: -20px;
    top: 2px;
    color: #C9B8A8;
    opacity: 0;
    transition: all 0.2s;
    cursor: pointer;
    padding: 2px;
    font-size: 0.8rem;
    border: none;
    background: transparent;
    line-height: 1;
}

.remove-btn:hover {
    color: #B8A090;
}

@media (max-width: 640px) {
    .remove-btn {
        opacity: 1;
        right: -16px;
    }
}

.add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 8px;
    margin-top: 4px;
    transition: all 0.2s;
    font-family: "Cormorant Garamond", serif;
    letter-spacing: 0.05em;
    border: none;
    background: transparent;
    width: 100%;
}

.add-btn:hover {
    color: var(--accent);
}

.list-content {
    flex: 1;
    width: 100%;
    overflow: hidden;
}

.list-content input {
    width: 100%;
    border: none;
    border-bottom: 1px solid var(--grid);
    outline: none;
    background: transparent;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 2px 0;
    color: var(--ink-light);
    transition: border-color 0.3s;
    line-height: 1.5;
    box-sizing: border-box;
    height: 28px;
}

.list-content input:focus {
    border-bottom-color: var(--accent-light);
}

.list-content input::placeholder {
    color: var(--grid);
    font-size: 0.8rem;
}

.footer-text {
    text-align: center;
    font-size: 0.6rem;
    color: var(--accent-light);
    padding: 16px 0 24px;
    letter-spacing: 0.15em;
    font-family: Georgia, "Times New Roman", serif;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

.app-title,
.modal-title {
    color: var(--ink);
}

.modal-title {
    margin: 0;
    padding: 10px 0;
}

.button-reset,
.modal-close {
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    cursor: pointer;
}

.toolbar-button-secondary {
    color: var(--accent-light);
}

.toolbar-button-secondary:hover {
    color: var(--accent);
}

.toolbar-button-primary,
.modal-download {
    background: var(--accent);
}

.toolbar-button-primary:not(:disabled):hover,
.modal-download:hover {
    background: #7A6548;
}

.modal-backdrop {
    background: rgba(44, 42, 38, 0.92);
    backdrop-filter: blur(8px);
}

.modal-panel {
    background: var(--paper);
}

.modal-header {
    border-color: var(--grid);
    padding: 0.5rem 0.875rem;
}

.modal-close {
    color: var(--accent-light);
    font-size: 1.375rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--ink);
}

.modal-preview {
    background: var(--paper-dark);
    padding: 1rem;
}

.modal-image {
    max-height: 64vh;
}

.modal-tip {
    color: var(--accent-light);
    margin: 0 0 0.625rem;
}

.modal-actions {
    padding: 0.875rem 1rem 1rem;
}

.modal-download {
    text-decoration: none;
}

button:disabled {
    cursor: wait;
    opacity: 0.75;
}

.fixed { position: fixed; }
.inset-0 { inset: 0; }
.z-50 { z-index: 50; }
.hidden { display: none; }
.flex { display: flex; }
.inline-block { display: inline-block; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.w-full { width: 100%; }
.h-auto { height: auto; }
.max-w-\[480px\] { max-width: 480px; }
.max-w-full { max-width: 100%; }
.max-h-\[90vh\] { max-height: 90vh; }
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.border-b {
    border-bottom-width: 1px;
    border-bottom-style: solid;
}
.p-0 { padding: 0; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}
.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}
.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.pr-2 { padding-right: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.space-x-3 > :not([hidden]) ~ :not([hidden]) { margin-left: 0.75rem; }
.text-center { text-align: center; }
.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}
.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}
.text-white { color: #FFF; }
.font-light { font-weight: 300; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.tracking-wider { letter-spacing: 0.05em; }
.transition-all { transition: all 0.2s ease; }
.transition-colors { transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease; }
.shadow-md { box-shadow: 0 10px 20px rgba(139, 115, 85, 0.18); }
.shadow-lg { box-shadow: 0 16px 32px rgba(44, 42, 38, 0.18); }
.shadow-2xl { box-shadow: 0 28px 60px rgba(44, 42, 38, 0.24); }

@media (min-width: 640px) {
    .sm\:p-8 { padding: 2rem; }
}

@media print {
    .no-print {
        display: none !important;
    }
}
