[hidden] { display: none !important; }

:root {
 --bg: #f6f1e7;
 --bg-elevated: #fffdf7;
 --brand: #6b9080;
 --brand-soft: rgba(107, 144, 128, 0.12);
 --text: #3d3530;
 --text-secondary: #697065;
 --text-muted: #9a9e94;
 --border: rgba(108, 120, 98, 0.18);
 --shadow: 0 1px 3px rgba(60, 70, 50, 0.06);
 --shadow-md: 0 2px 8px rgba(60, 70, 50, 0.08);
 --radius: 10px;
 --serif: "Songti SC", "Georgia", serif;
 --wood: #9f8c76;
}

[data-theme="dark"] {
 --bg: #1a1c19;
 --bg-elevated: #232622;
 --brand: #8db9a3;
 --brand-soft: rgba(141, 185, 163, 0.12);
 --text: #e0ddd5;
 --text-secondary: #a8aaa3;
 --text-muted: #7a7d74;
 --border: rgba(218, 211, 190, 0.13);
 --shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
 --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.25);
 --wood: #b6a48a;
}

* {
 margin: 0;
 padding: 0;
 box-sizing: border-box;
}

body {
 background: var(--bg);
 color: var(--text);
 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
 line-height: 1.7;
 -webkit-font-smoothing: antialiased;
 -moz-osx-font-smoothing: grayscale;
 transition: background-color 0.4s ease, color 0.4s ease;
}

.back-home {
 position: fixed;
 top: 1.5rem;
 left: 1.5rem;
 z-index: 100;
 display: inline-flex;
 align-items: center;
 gap: 0.4rem;
 padding: 0.5rem 1rem;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: 999px;
 color: var(--text-secondary);
 text-decoration: none;
 font-size: 0.85rem;
 box-shadow: var(--shadow);
 transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.back-home:hover {
 color: var(--brand);
 border-color: var(--brand);
 transform: translateX(-2px);
}

.back-home .icon {
 width: 1rem;
 height: 1rem;
}

.theme-btn {
 position: fixed;
 top: 1.5rem;
 right: 1.5rem;
 z-index: 100;
 width: 2.6rem;
 height: 2.6rem;
 border-radius: 50%;
 border: 1px solid var(--border);
 background: var(--bg-elevated);
 color: var(--text-secondary);
 cursor: pointer;
 box-shadow: var(--shadow);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 transition: transform 0.3s ease, border-color 0.3s ease, color 0.3s ease;
 touch-action: manipulation;
 -webkit-tap-highlight-color: transparent;
}

.theme-btn:hover {
 color: var(--brand);
 border-color: var(--brand);
 transform: translateY(-1px);
}

.theme-btn:active {
 transform: scale(0.94);
}

.theme-btn .icon {
 width: 1.1rem;
 height: 1.1rem;
 display: block;
}

.theme-btn .icon-moon,
.theme-btn .icon-sun {
 position: absolute;
 transition: opacity 0.35s cubic-bezier(0.23, 1, 0.32, 1),
 transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.theme-btn .icon-sun {
 opacity: 0;
 transform: rotate(-90deg) scale(0.4);
}

.theme-btn .icon-moon {
 opacity: 1;
 transform: rotate(0) scale(1);
}

[data-theme="dark"] .theme-btn .icon-moon {
 opacity: 0;
 transform: rotate(90deg) scale(0.4);
}

[data-theme="dark"] .theme-btn .icon-sun {
 opacity: 1;
 transform: rotate(0) scale(1);
}

.wish-container {
 max-width: 860px;
 margin: 0 auto;
 padding: 5rem 1.5rem 4rem;
}

.wish-header {
 text-align: center;
 margin-bottom: 3rem;
}

.header-leaf {
 font-size: 2rem;
 margin-bottom: 0.5rem;
 animation: leafSway 4s ease-in-out infinite;
}

@keyframes leafSway {
 0%, 100% { transform: rotate(-5deg); }
 50% { transform: rotate(5deg); }
}

.wish-title {
 font-family: var(--serif);
 font-size: 2.4rem;
 font-weight: 600;
 letter-spacing: 0.12em;
 color: var(--text);
 margin-bottom: 0.5rem;
}

.header-line {
 width: 48px;
 height: 2px;
 background: var(--brand);
 margin: 0.5rem auto 1rem;
 border-radius: 1px;
}

.wish-subtitle {
 font-family: var(--serif);
 font-size: 0.95rem;
 color: var(--text-secondary);
 letter-spacing: 0.05em;
}

.wish-section {
 margin-bottom: 3rem;
}

.section-head {
 display: flex;
 align-items: baseline;
 gap: 0.75rem;
 margin-bottom: 1.2rem;
 padding-bottom: 0.6rem;
 border-bottom: 1px solid var(--border);
}

.section-title {
 font-family: var(--serif);
 font-size: 1.15rem;
 font-weight: 600;
 color: var(--text);
 letter-spacing: 0.05em;
}

.section-hint {
 font-size: 0.78rem;
 color: var(--text-muted);
}

.wish-wall {
 display: grid;
 grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
 gap: 1rem;
}

.wish-card {
 position: relative;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 1.2rem 1.3rem 1rem;
 box-shadow: var(--shadow);
 transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
 overflow: hidden;
}

.wish-card:hover {
 transform: translateY(-2px);
 box-shadow: var(--shadow-md);
 border-color: var(--brand);
}

.wish-card::before {
 content: "";
 position: absolute;
 top: 0;
 right: 0;
 width: 0;
 height: 0;
 border-style: solid;
 border-width: 0 18px 18px 0;
 border-color: transparent var(--bg) transparent transparent;
 pointer-events: none;
 opacity: 0.85;
}

.wish-card-content {
 font-size: 0.92rem;
 color: var(--text);
 line-height: 1.8;
 white-space: pre-wrap;
 word-break: break-word;
 margin-bottom: 0.75rem;
}

.wish-card-meta {
 display: flex;
 align-items: center;
 gap: 0.4rem;
 font-size: 0.74rem;
 color: var(--text-muted);
}

.wish-card-pin {
 color: var(--wood);
 font-weight: 500;
}

.wish-loading {
 grid-column: 1 / -1;
 text-align: center;
 padding: 3rem 0;
 color: var(--text-muted);
}

.loading-leaf {
 font-size: 1.6rem;
 margin-bottom: 0.6rem;
 animation: leafFall 2s ease-in-out infinite;
}

@keyframes leafFall {
 0%, 100% { transform: translateY(0) rotate(0); }
 50% { transform: translateY(8px) rotate(10deg); }
}

.wish-empty {
 grid-column: 1 / -1;
 text-align: center;
 padding: 3rem 1rem;
 color: var(--text-muted);
}

.wish-empty .empty-icon {
 font-size: 2.4rem;
 margin-bottom: 0.6rem;
}

.wish-empty .empty-text {
 font-size: 0.88rem;
}

.auth-view {
 max-width: 460px;
 margin: 0 auto 3rem;
}

.auth-card {
 position: relative;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 2rem 1.8rem 1.6rem;
 box-shadow: var(--shadow-md);
}

.auth-card-stamp {
 position: absolute;
 top: 0.9rem;
 right: 1.1rem;
 font-family: var(--serif);
 font-size: 0.7rem;
 letter-spacing: 0.15em;
 color: var(--wood);
 border: 1px solid var(--wood);
 padding: 0.15rem 0.5rem;
 border-radius: 4px;
 opacity: 0.7;
}

.auth-guide {
 text-align: center;
 padding: 0.6rem 0 0.4rem;
}

.auth-guide-mark {
 font-size: 2.2rem;
 line-height: 1;
 margin-bottom: 0.8rem;
}

.auth-guide-title {
 font-family: var(--serif);
 font-size: 1.2rem;
 letter-spacing: 0.08em;
 color: var(--text);
 margin: 0 0 0.6rem;
}

.auth-guide-desc {
 font-size: 0.88rem;
 line-height: 1.7;
 color: var(--text-muted);
 margin: 0 0 1.4rem;
}

.auth-tabs {
 position: relative;
 display: flex;
 border-bottom: 1px solid var(--border);
 margin-bottom: 1.4rem;
}

.auth-tab {
 flex: 1;
 padding: 0.6rem 0;
 background: transparent;
 border: none;
 cursor: pointer;
 font-size: 0.95rem;
 color: var(--text-muted);
 font-family: var(--serif);
 letter-spacing: 0.05em;
 transition: color 0.25s ease;
}

.auth-tab.active {
 color: var(--brand);
}

.auth-tab-indicator {
 position: absolute;
 bottom: -1px;
 left: 0;
 width: 50%;
 height: 2px;
 background: var(--brand);
 transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.auth-tab-indicator.right {
 transform: translateX(100%);
}

.auth-form {
 display: flex;
 flex-direction: column;
 gap: 1rem;
}

.form-field {
 display: flex;
 flex-direction: column;
 gap: 0.4rem;
}

.form-label {
 font-size: 0.8rem;
 color: var(--text-secondary);
 letter-spacing: 0.03em;
}

.form-row {
 display: flex;
 gap: 0.6rem;
 align-items: stretch;
}

.flex-1 {
 flex: 1;
 min-width: 0;
}

.input-wrap {
 position: relative;
 display: flex;
 align-items: center;
 background: var(--bg);
 border: 1px solid var(--border);
 border-radius: 8px;
 transition: border-color 0.25s ease, background-color 0.25s ease;
}

.input-wrap:focus-within {
 border-color: var(--brand);
 background: var(--bg-elevated);
}

.input-icon {
 margin-left: 0.7rem;
 color: var(--text-muted);
 flex-shrink: 0;
}

.form-input {
 flex: 1;
 width: 100%;
 padding: 0.65rem 0.8rem;
 background: transparent;
 border: none;
 outline: none;
 font-size: 0.9rem;
 color: var(--text);
 font-family: inherit;
}

.form-input::placeholder {
 color: var(--text-muted);
}

.form-error {
 background: var(--brand-soft);
 color: var(--brand);
 border: 1px solid var(--border);
 border-radius: 6px;
 padding: 0.5rem 0.8rem;
 font-size: 0.82rem;
 line-height: 1.5;
}

.btn-primary {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 0.35rem;
 background: var(--brand);
 color: #fff;
 border: 1px solid var(--brand);
 border-radius: 8px;
 padding: 0.6rem 1rem;
 font-size: 0.88rem;
 font-family: inherit;
 letter-spacing: 0.03em;
 cursor: pointer;
 transition: opacity 0.25s ease, transform 0.2s ease;
}

.btn-primary:hover {
 opacity: 0.92;
}

.btn-primary:active {
 transform: scale(0.97);
}

.btn-primary:disabled {
 opacity: 0.6;
 cursor: not-allowed;
}

.btn-primary.btn-block {
 width: 100%;
 padding: 0.75rem 1rem;
 font-size: 0.92rem;
}

.btn-primary.btn-sm {
 padding: 0.45rem 0.85rem;
 font-size: 0.82rem;
}

.btn-primary .icon {
 width: 0.95rem;
 height: 0.95rem;
}

.btn-ghost {
 display: inline-flex;
 align-items: center;
 justify-content: center;
 gap: 0.3rem;
 background: transparent;
 color: var(--brand);
 border: 1px solid var(--border);
 border-radius: 8px;
 padding: 0.55rem 0.9rem;
 font-size: 0.85rem;
 font-family: inherit;
 cursor: pointer;
 white-space: nowrap;
 transition: border-color 0.25s ease, color 0.25s ease;
}

.btn-ghost:hover {
 border-color: var(--brand);
}

.btn-ghost:disabled {
 color: var(--text-muted);
 cursor: not-allowed;
 border-color: var(--border);
}

.btn-ghost.btn-sm {
 padding: 0.4rem 0.75rem;
 font-size: 0.8rem;
}

.auth-submit {
 margin-top: 0.4rem;
 font-family: var(--serif);
 letter-spacing: 0.1em;
}

.send-code-btn {
 flex-shrink: 0;
 min-width: 6.5rem;
}

.captcha-img {
 height: 40px;
 width: 100px;
 border-radius: 6px;
 border: 1px solid var(--border);
 background: var(--bg);
 cursor: pointer;
 flex-shrink: 0;
 object-fit: cover;
}

.auth-footer-note {
 text-align: center;
 margin-top: 1rem;
 font-family: var(--serif);
 font-size: 0.82rem;
 color: var(--text-muted);
 letter-spacing: 0.08em;
}

.mine-view {
 margin-bottom: 3rem;
}

.mine-head {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 1rem;
 padding: 1rem 1.2rem;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 box-shadow: var(--shadow);
 margin-bottom: 1.2rem;
}

.mine-user {
 display: flex;
 align-items: center;
 gap: 0.8rem;
 min-width: 0;
}

.mine-head-actions {
 display: flex;
 align-items: center;
 gap: 0.5rem;
 flex-shrink: 0;
}

.mine-avatar {
 width: 2.4rem;
 height: 2.4rem;
 border-radius: 50%;
 background: var(--brand-soft);
 color: var(--brand);
 display: inline-flex;
 align-items: center;
 justify-content: center;
 font-family: var(--serif);
 font-size: 1rem;
 font-weight: 600;
 flex-shrink: 0;
 border: 1px solid var(--border);
}

.mine-meta {
 min-width: 0;
}

.mine-name {
 font-size: 0.95rem;
 color: var(--text);
 font-weight: 500;
 overflow: hidden;
 text-overflow: ellipsis;
 white-space: nowrap;
}

.mine-tip {
 font-size: 0.76rem;
 color: var(--text-muted);
 font-family: var(--serif);
 letter-spacing: 0.03em;
}

.compose-box {
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 1rem 1.1rem;
 box-shadow: var(--shadow);
 margin-bottom: 1.5rem;
}

.compose-textarea {
 width: 100%;
 background: transparent;
 border: none;
 outline: none;
 resize: vertical;
 min-height: 4.5rem;
 font-size: 0.92rem;
 line-height: 1.7;
 color: var(--text);
 font-family: inherit;
}

.compose-textarea::placeholder {
 color: var(--text-muted);
}

.compose-actions {
 display: flex;
 align-items: center;
 justify-content: space-between;
 margin-top: 0.6rem;
 padding-top: 0.6rem;
 border-top: 1px dashed var(--border);
}

.compose-counter {
 font-size: 0.76rem;
 color: var(--text-muted);
 font-variant-numeric: tabular-nums;
}

.mine-list-head {
 display: flex;
 align-items: baseline;
 gap: 0.6rem;
 margin-bottom: 0.8rem;
}

.mine-list-title {
 font-family: var(--serif);
 font-size: 1rem;
 color: var(--text);
 letter-spacing: 0.05em;
}

.mine-list-count {
 font-size: 0.78rem;
 color: var(--text-muted);
}

.mine-list {
 display: flex;
 flex-direction: column;
 gap: 0.8rem;
}

.mine-card {
 position: relative;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: var(--radius);
 padding: 1rem 1.2rem;
 box-shadow: var(--shadow);
 transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.mine-card:hover {
 transform: translateY(-1px);
 box-shadow: var(--shadow-md);
}

.mine-card.is-pinned {
 border-color: var(--wood);
}

.mine-card-content {
 font-size: 0.92rem;
 color: var(--text);
 line-height: 1.75;
 white-space: pre-wrap;
 word-break: break-word;
 padding-right: 2rem;
}

.mine-card-footer {
 display: flex;
 align-items: center;
 justify-content: space-between;
 gap: 0.6rem;
 margin-top: 0.7rem;
 padding-top: 0.6rem;
 border-top: 1px dashed var(--border);
}

.mine-card-tags {
 display: flex;
 align-items: center;
 gap: 0.4rem;
 flex-wrap: wrap;
}

.mine-tag {
 display: inline-flex;
 align-items: center;
 gap: 0.2rem;
 font-size: 0.72rem;
 padding: 0.15rem 0.55rem;
 border-radius: 999px;
 background: var(--brand-soft);
 color: var(--brand);
 letter-spacing: 0.03em;
}

.mine-tag.tag-show {
 background: rgba(159, 140, 118, 0.14);
 color: var(--wood);
}

.mine-card-time {
 font-size: 0.74rem;
 color: var(--text-muted);
 font-variant-numeric: tabular-nums;
}

.mine-card-delete {
 position: absolute;
 top: 0.7rem;
 right: 0.8rem;
 width: 1.8rem;
 height: 1.8rem;
 display: inline-flex;
 align-items: center;
 justify-content: center;
 background: transparent;
 border: none;
 color: var(--text-muted);
 cursor: pointer;
 border-radius: 6px;
 transition: color 0.25s ease, background-color 0.25s ease;
}

.mine-card-delete:hover {
 color: #c75450;
 background: rgba(199, 84, 80, 0.08);
}

.mine-card-delete .icon {
 width: 0.95rem;
 height: 0.95rem;
}

.wish-footer {
 text-align: center;
 margin-top: 4rem;
 padding-top: 2rem;
 border-top: 1px solid var(--border);
}

.wish-footer p {
 font-family: var(--serif);
 font-size: 0.9rem;
 color: var(--text-secondary);
 font-style: italic;
 margin-bottom: 0.8rem;
 letter-spacing: 0.04em;
}

.footer-link {
 font-size: 0.82rem;
 color: var(--text-muted);
 text-decoration: none;
 transition: color 0.25s ease;
}

.footer-link:hover {
 color: var(--brand);
}

.toast-container {
 position: fixed;
 bottom: 2rem;
 left: 50%;
 transform: translateX(-50%);
 z-index: 9999;
 display: flex;
 flex-direction: column;
 gap: 0.5rem;
 pointer-events: none;
}

.toast {
 padding: 0.6rem 1.1rem;
 background: var(--bg-elevated);
 border: 1px solid var(--border);
 border-radius: 8px;
 box-shadow: var(--shadow-md);
 font-size: 0.85rem;
 color: var(--text);
 opacity: 0;
 transform: translateY(10px);
 transition: opacity 0.3s ease, transform 0.3s ease;
 pointer-events: auto;
 max-width: 90vw;
}

.toast.show {
 opacity: 1;
 transform: translateY(0);
}

.toast.success {
 border-color: var(--brand);
 color: var(--brand);
}

.toast.error {
 border-color: #c75450;
 color: #c75450;
}

@media (max-width: 640px) {
 .wish-container {
 padding: 4rem 1rem 3rem;
 }

 .wish-title {
 font-size: 1.9rem;
 }

 .back-home span {
 display: none;
 }

 .back-home,
 .theme-btn {
 top: 1rem;
 }

 .back-home {
 left: 1rem;
 padding: 0.5rem 0.7rem;
 }

 .theme-btn {
 right: 1rem;
 }

 .wish-wall {
 grid-template-columns: 1fr;
 }

 .auth-card {
 padding: 1.6rem 1.3rem 1.3rem;
 }

 .mine-head {
 flex-wrap: wrap;
 padding: 0.9rem 1rem;
 }

 .mine-name {
 max-width: 60vw;
 }

 .section-head {
 flex-wrap: wrap;
 gap: 0.4rem 0.75rem;
 }
}