:root {
    color-scheme: light;
    --bg: #f6f4ec;
    --panel: #ffffff;
    --ink: #263846;
    --muted: #8b959c;
    --line: #ece7db;
    --gold: #d98508;
    --gold-weak: #fff8df;
    --green: #5aa316;
    --green-weak: #f2fbdf;
    --shadow: 0 18px 42px rgba(38, 56, 70, .1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    background: linear-gradient(180deg, #fffdf7 0%, var(--bg) 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    width: min(100%, 760px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 18px 14px 44px;
}

.home-hero {
    padding: 34px 8px 24px;
    text-align: center;
}

.brand-mark {
    display: grid;
    width: 108px;
    height: 108px;
    margin: 0 auto 22px;
    place-items: center;
    border: 1px solid rgba(216, 167, 60, .34);
    border-radius: 30px;
    color: #173333;
    background:
        linear-gradient(145deg, #f7dc78 0%, #32a889 58%, #f2c85a 100%);
    box-shadow: 0 16px 36px rgba(38, 56, 70, .14);
    font-size: 28px;
    font-weight: 900;
    line-height: 1.12;
}

.home-hero h1,
.detail-hero h1 {
    margin: 0;
    color: #183f36;
    font-size: clamp(34px, 8vw, 50px);
    letter-spacing: 0;
    line-height: 1.08;
}

.detail-hero p {
    max-width: 420px;
    margin: 14px auto 0;
    color: var(--muted);
    font-size: 18px;
    line-height: 1.6;
}

.module-section,
.source-panel,
.tool-panel,
.panel {
    margin-top: 22px;
}

.section-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 0 8px 12px;
    color: var(--ink);
    font-weight: 800;
}

.section-title small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.module-list {
    display: grid;
    gap: 14px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: min(100%, 520px);
    margin: 18px auto 0;
    padding: 8px;
    border: 1px solid rgba(233, 229, 218, .9);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 8px 24px rgba(38, 56, 70, .06);
}

.category-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 0;
    min-height: 52px;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
}

.category-card.active {
    border-color: rgba(24, 143, 117, .28);
    background: #fff;
    box-shadow: 0 8px 18px rgba(38, 56, 70, .08);
}

.category-card .category-icon {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 8px;
    color: #173333;
    background: linear-gradient(145deg, #f7dc78, #82cfbf);
    font-size: 16px;
    font-weight: 900;
}

.category-card strong,
.category-card small {
    display: block;
}

.category-card strong {
    color: var(--ink);
    font-size: 16px;
    line-height: 1.2;
}

.category-card small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.module-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 22px;
    gap: 16px;
    align-items: center;
    min-height: 104px;
    padding: 18px 20px;
    border: 1px solid rgba(233, 229, 218, .85);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 8px 26px rgba(38, 56, 70, .08);
}

.module-list.compact {
    gap: 10px;
}

.module-list.compact .module-card {
    min-height: 88px;
}

.module-icon {
    display: grid;
    width: 72px;
    height: 72px;
    place-items: center;
    border-radius: 8px;
    color: #173333;
    background: linear-gradient(145deg, #f7dc78, #c9e28c 58%, #82cfbf);
    font-size: 26px;
    font-weight: 900;
}

.tool-card:nth-child(2) .module-icon {
    background: linear-gradient(145deg, #f8c65b, #f38b67);
}

.tool-card:nth-child(3) .module-icon {
    background: linear-gradient(145deg, #86cb41, #5aa316);
}

.tool-card.meal-card .module-icon {
    color: #fff;
    background: linear-gradient(145deg, #ffb84d, #ff6f61 52%, #188f75);
}

.tool-card.news-card .module-icon {
    color: #173333;
    background: linear-gradient(145deg, #dff5ff, #76d2c3 58%, #f7dc78);
}

.muted-icon {
    color: #59706c;
    background: linear-gradient(145deg, #f2f3ef, #dfe8e2);
}

.module-copy {
    min-width: 0;
}

.module-copy strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: 24px;
    line-height: 1.22;
}

.module-copy small {
    display: block;
    margin-top: 8px;
    color: var(--muted);
    font-size: 16px;
}

.module-card i {
    color: #b9bec1;
    font-size: 38px;
    font-style: normal;
    line-height: 1;
}

.empty-card {
    padding: 30px 18px;
    border: 1px solid rgba(233, 229, 218, .85);
    border-radius: 8px;
    color: var(--muted);
    background: #fff;
    text-align: center;
    font-weight: 700;
}

.profile-panel,
.contact-panel {
    border: 1px solid rgba(233, 229, 218, .85);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(38, 56, 70, .08);
}

.profile-panel {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
    padding: 22px;
}

.profile-badge {
    display: grid;
    width: 86px;
    height: 86px;
    place-items: center;
    border-radius: 16px;
    color: #173333;
    background: linear-gradient(145deg, #f7dc78, #32a889 58%, #f2c85a);
    font-size: 22px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
}

.profile-panel h2 {
    margin: 0;
    color: var(--ink);
    font-size: 26px;
    line-height: 1.2;
}

.profile-panel p {
    margin: 10px 0 0;
    color: #66747c;
    line-height: 1.7;
}

.contact-panel {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 20px;
}

.contact-panel > strong {
    color: var(--ink);
    font-size: 18px;
}

.contact-row {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    padding: 14px;
    border-radius: 8px;
    background: #f9fcfa;
}

.contact-row span {
    color: var(--muted);
    font-weight: 800;
}

.contact-row span small {
    display: block;
    margin-top: 4px;
    color: #188f75;
    font-size: 12px;
}

.contact-row b {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ink);
    text-align: right;
}

.contact-row.clickable {
    cursor: pointer;
    background: #f4fbf8;
}

.contact-row.clickable b {
    color: #0970d6;
}

.qr-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(38, 56, 70, .42);
}

.qr-overlay[hidden] {
    display: none;
}

.qr-modal {
    width: min(100%, 360px);
    padding: 24px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 54px rgba(38, 56, 70, .24);
    text-align: center;
}

.qr-modal strong,
.qr-modal span {
    display: block;
}

.qr-modal strong {
    color: var(--ink);
    font-size: 22px;
}

.qr-modal img {
    display: block;
    width: min(100%, 260px);
    height: auto;
    margin: 20px auto 12px;
}

.qr-modal span {
    color: #66747c;
    font-weight: 800;
}

.qr-modal button {
    margin-top: 18px;
    padding: 10px 22px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #188f75;
    font-weight: 900;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: grid;
    grid-template-columns: 42px 1fr 42px;
    align-items: center;
    min-height: 58px;
    margin: -18px -14px 0;
    padding: 0 14px;
    border-bottom: 1px solid rgba(232, 226, 212, .75);
    background: rgba(255, 253, 247, .92);
    backdrop-filter: blur(14px);
}

.topbar a {
    font-size: 38px;
    line-height: 1;
}

.topbar span {
    overflow: hidden;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 20px;
    font-weight: 800;
}

.detail-hero {
    padding: 28px 6px 6px;
}

.type-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 12px;
    border-radius: 999px;
    color: #8a5400;
    background: #fff1c9;
    font-size: 13px;
    font-weight: 800;
}

.detail-hero h1 {
    margin-top: 12px;
    font-size: clamp(28px, 7vw, 40px);
}

.panel,
.tool-panel,
.source-panel {
    border: 1px solid rgba(233, 229, 218, .9);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--shadow);
}

.panel {
    padding: 22px;
}

.muted {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
}

.tool-panel {
    overflow: hidden;
    padding: 22px;
}

.tool-panel.warm {
    background: linear-gradient(180deg, #fff 0%, #fffaf0 100%);
}

.tool-panel.green {
    background: linear-gradient(180deg, #fff 0%, #fbfff2 100%);
}

.tool-form {
    display: grid;
    gap: 16px;
}

.tool-form label {
    display: grid;
    gap: 9px;
    color: #7a3e18;
    font-weight: 800;
}

.tool-form input,
.tool-form select {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border: 1px solid #efe3b8;
    border-radius: 8px;
    color: #523a2d;
    background: #fffdf1;
    font: inherit;
    font-size: 18px;
}

.green .tool-form label {
    color: #18251d;
}

.green .tool-form input,
.green .tool-form select {
    border-color: #d8edbd;
    color: #1d2a22;
    background: #f9fff0;
}

.primary-button {
    min-height: 58px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--gold);
    box-shadow: 0 12px 22px rgba(217, 133, 8, .24);
    font: inherit;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

.primary-button.dark {
    background: #211d1b;
    box-shadow: 0 12px 22px rgba(33, 29, 27, .22);
}

.formula-box,
.result-card,
.ming-result,
.process-list {
    margin-top: 20px;
}

.formula-box {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid #f1df9f;
    border-radius: 8px;
    background: var(--gold-weak);
    color: #735130;
}

.formula-box span {
    font-size: 18px;
}

.formula-box small {
    color: #9a7953;
    font-weight: 700;
}

.result-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.eyebrow {
    display: block;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.result-card strong {
    display: block;
    margin-top: 8px;
    font-size: 34px;
    line-height: 1.1;
}

.result-card p {
    margin: 12px 0 0;
    color: #5e6a70;
    line-height: 1.7;
}

.result-meta,
.chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.result-meta span,
.chips span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 999px;
    color: #66513c;
    background: #f5f0e6;
    font-size: 14px;
    font-weight: 800;
}

.compass-result strong {
    color: var(--gold);
}

.marriage-tool {
    display: grid;
    gap: 24px;
    margin-top: 22px;
}

.marriage-form,
.marriage-result-card {
    border: 1px solid #ffc2cf;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 42px rgba(180, 22, 71, .12);
}

.marriage-form {
    display: grid;
    gap: 26px;
    padding: 30px;
}

.marriage-form-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #970837;
    font-size: 22px;
    font-weight: 900;
}

.calendar-mark {
    position: relative;
    display: inline-grid;
    width: 26px;
    height: 26px;
    border-radius: 5px;
    background:
        linear-gradient(#5474a8 0 7px, transparent 7px),
        repeating-linear-gradient(90deg, transparent 0 6px, rgba(151, 8, 55, .14) 6px 7px),
        repeating-linear-gradient(0deg, #f8f0f2 0 6px, rgba(151, 8, 55, .14) 6px 7px);
    box-shadow: inset 0 0 0 1px rgba(151, 8, 55, .1);
}

.calendar-mark::before,
.calendar-mark::after {
    content: "";
    position: absolute;
    top: 10px;
    width: 3px;
    height: 3px;
    border-radius: 999px;
    background: #f63d6c;
}

.calendar-mark::before {
    left: 7px;
}

.calendar-mark::after {
    right: 7px;
}

.marriage-form label {
    display: grid;
    gap: 12px;
    color: #aa0638;
    font-size: 18px;
    font-weight: 900;
}

.marriage-form select {
    width: 100%;
    min-height: 68px;
    padding: 0 24px;
    border: 1px solid #ffb8c7;
    border-radius: 18px;
    color: #9e0a38;
    background: #fff0f4;
    font: inherit;
    font-size: 20px;
}

.marriage-result-card {
    overflow: hidden;
    padding: 34px 20px 28px;
}

.marriage-kicker {
    color: #aeb3ba;
    text-align: center;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .2em;
}

.marriage-headline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 18px;
    color: #980838;
}

.marriage-headline span,
.marriage-headline strong {
    font-size: clamp(34px, 11vw, 52px);
    font-weight: 900;
    line-height: 1;
}

.marriage-headline em {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 6px 16px;
    border-radius: 999px;
    color: #ff3568;
    background: #ffe4eb;
    font-size: clamp(16px, 4vw, 22px);
    font-style: normal;
    font-weight: 900;
}

.marriage-dial {
    position: relative;
    width: min(100%, 500px);
    aspect-ratio: 1;
    margin: 46px auto 26px;
    border: 3px solid #ffc3cf;
    border-radius: 999px;
    background:
        radial-gradient(circle, #fff 0 33%, transparent 34%),
        repeating-radial-gradient(circle, transparent 0 40%, rgba(255, 142, 166, .26) 40.5% 41%, transparent 41.5% 53%);
}

.marriage-dial::before {
    content: "";
    position: absolute;
    inset: 10%;
    border: 1px dashed rgba(255, 142, 166, .38);
    border-radius: 999px;
}

.dial-line {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92%;
    height: 3px;
    border-radius: 999px;
    background: #ffc3cf;
    transform: translate(-50%, -50%) rotate(calc((var(--destiny-index) * 30deg) + 90deg));
    transform-origin: center;
}

.dial-line::after {
    content: "";
    position: absolute;
    right: -7px;
    top: 50%;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #ff9aad;
    transform: translateY(-50%);
}

.dial-center {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    width: 28px;
    height: 28px;
    border: 7px solid #ffeaf0;
    border-radius: 999px;
    background: #a3083b;
    transform: translate(-50%, -50%);
}

.dial-cardinal {
    position: absolute;
    z-index: 4;
    color: #c8c8c8;
    padding: 2px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .86);
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
}

.dial-cardinal.north {
    top: 16%;
    left: 50%;
    transform: translateX(-50%);
}

.dial-cardinal.east {
    top: 50%;
    right: 20%;
    transform: translateY(-50%);
}

.dial-cardinal.south {
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
}

.dial-cardinal.west {
    top: 50%;
    left: 20%;
    transform: translateY(-50%);
}

.branch-dot {
    --angle: 0deg;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    display: grid;
    width: 66px;
    height: 66px;
    place-items: center;
    border: 1px solid #ececec;
    border-radius: 999px;
    color: #aaa;
    background: #fff;
    box-shadow: 0 4px 12px rgba(38, 56, 70, .12);
    transform: translate(-50%, -50%) rotate(var(--angle)) translateY(-205px) rotate(calc(-1 * var(--angle)));
}

.branch-dot strong {
    font-size: 22px;
    line-height: 1;
}

.branch-dot small {
    position: absolute;
    top: 48px;
    left: 50%;
    min-width: 70px;
    color: #d2c9cc;
    text-align: center;
    transform: translateX(-50%);
    font-size: 11px;
    line-height: 1.2;
}

.branch-dot.active {
    border-color: #ff6d8b;
    color: #fff;
    background: #ff3f70;
    box-shadow: 0 12px 24px rgba(255, 63, 112, .25);
}

.branch-dot.active small {
    color: #ff2f68;
    font-weight: 900;
}

.branch-dot.partner {
    border: 3px solid #ff9aad;
    color: #ff6d8b;
}

.branch-dot.active.partner {
    color: #fff;
}

.branch-0 { --angle: 180deg; }
.branch-1 { --angle: 210deg; }
.branch-2 { --angle: 240deg; }
.branch-3 { --angle: 270deg; }
.branch-4 { --angle: 300deg; }
.branch-5 { --angle: 330deg; }
.branch-6 { --angle: 0deg; }
.branch-7 { --angle: 30deg; }
.branch-8 { --angle: 60deg; }
.branch-9 { --angle: 90deg; }
.branch-10 { --angle: 120deg; }
.branch-11 { --angle: 150deg; }

.marriage-guide-card {
    margin-top: 18px;
    padding: 26px;
    border: 1px solid #ffb8c7;
    border-radius: 16px;
    color: #cd0a45;
    background: #fff0f4;
}

.marriage-guide-card h2 {
    margin: 0;
    text-align: center;
    color: #970837;
    font-size: 24px;
}

.guide-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 34px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin-top: 16px;
    padding: 18px 0 22px;
    border-top: 1px solid #ffc5d0;
    border-bottom: 1px solid #ffc5d0;
}

.guide-pair div {
    display: grid;
    gap: 4px;
    justify-items: center;
    text-align: center;
}

.guide-pair span {
    color: #ff8aa2;
    font-size: 13px;
}

.guide-pair strong {
    font-size: clamp(22px, 7vw, 30px);
    line-height: 1.1;
}

.guide-pair small {
    font-size: 15px;
}

.guide-pair i {
    color: #ffc1cc;
    text-align: center;
    font-size: 26px;
    font-style: normal;
}

.guide-note {
    margin-top: 20px;
    text-align: center;
}

.guide-note h3 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
    color: #970837;
    font-size: 20px;
}

.guide-note h3 span {
    width: 50px;
    height: 1px;
    background: #ff8aa2;
}

.guide-note p {
    margin: 14px auto 0;
    max-width: 520px;
    color: #d41b50;
    line-height: 1.8;
}

.marriage-steps {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    padding: 18px;
    border-radius: 12px;
    background: #fff7f9;
}

.marriage-steps h2 {
    margin: 0 0 6px;
    color: #970837;
    text-align: center;
    font-size: 22px;
}

.marriage-steps div {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    color: #9f5f72;
    line-height: 1.65;
}

.marriage-steps b {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 999px;
    color: #970837;
    background: #ffe4eb;
    font-size: 13px;
}

.process-list {
    display: grid;
    gap: 10px;
    padding: 18px;
    border-radius: 8px;
    background: #fafafa;
}

.process-list div {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 10px;
    align-items: start;
    color: #606a70;
    line-height: 1.65;
}

.process-list b {
    display: grid;
    width: 26px;
    height: 26px;
    place-items: center;
    border-radius: 999px;
    color: #7d8488;
    background: #e9e9e9;
    font-size: 13px;
}

.six-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.six-cell {
    display: grid;
    min-height: 102px;
    place-items: center;
    padding: 12px 8px;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    color: #bdc1c3;
    background: #fff;
    text-align: center;
}

.six-cell small {
    font-size: 12px;
    font-weight: 800;
}

.six-cell strong {
    font-size: clamp(24px, 7vw, 34px);
}

.six-cell.active {
    border-color: #df8500;
    color: #fff;
    background: #df8500;
    box-shadow: 0 12px 24px rgba(223, 133, 0, .22);
}

.ming-result {
    padding: 26px 18px;
    border-top: 6px solid var(--green);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.ming-result > span {
    color: var(--muted);
    font-weight: 800;
}

.ming-result > strong {
    display: block;
    margin-top: 12px;
    color: #1d1d1d;
    font-size: clamp(74px, 22vw, 116px);
    line-height: .9;
}

.ming-result h2 {
    margin: 16px 0 0;
    color: var(--green);
    font-size: 34px;
}

.ming-result .chips {
    justify-content: center;
}

.notice {
    margin: 20px auto 0;
    max-width: 420px;
    padding: 12px 14px;
    border-radius: 8px;
    color: #806232;
    background: #fff0b8;
    font-weight: 800;
    line-height: 1.55;
}

.meal-tool {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.meal-form,
.meal-result,
.meal-grid > div,
.meal-game {
    border: 1px solid rgba(223, 232, 226, .95);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(38, 56, 70, .08);
}

.meal-form {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.meal-form-head {
    display: grid;
    gap: 4px;
    padding-bottom: 4px;
}

.meal-form-head span,
.meal-result p,
.meal-grid span,
.meal-game span {
    margin: 0;
    color: #719186;
    font-size: 13px;
    font-weight: 900;
}

.meal-form-head strong {
    color: #183f36;
    font-size: 24px;
    line-height: 1.25;
}

.meal-form label {
    display: grid;
    gap: 8px;
    color: #47625b;
    font-size: 14px;
    font-weight: 900;
}

.meal-form select {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #d9e5dd;
    border-radius: 8px;
    color: #183f36;
    background: #f7fbf8;
    font: inherit;
}

.meal-button {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: #188f75;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
}

.meal-result {
    position: relative;
    overflow: hidden;
    padding: 30px 20px;
    text-align: center;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbf8 100%);
}

.meal-plate {
    position: relative;
    display: grid;
    width: 118px;
    height: 118px;
    margin: 0 auto 16px;
    place-items: center;
    border: 10px solid #f2f5ef;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #dce9df;
}

.meal-plate span {
    width: 62px;
    height: 62px;
    border-radius: 22px 999px 999px;
    background: linear-gradient(135deg, #ffb84d, #ff6f61);
    transform: rotate(-28deg);
}

.meal-plate i {
    position: absolute;
    right: 18px;
    bottom: 14px;
    width: 34px;
    height: 8px;
    border-radius: 999px;
    background: #188f75;
    transform: rotate(-34deg);
}

.meal-result h2 {
    margin: 8px 0 0;
    color: #183f36;
    font-size: clamp(32px, 9vw, 48px);
    line-height: 1.15;
}

.meal-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.meal-tags span {
    padding: 7px 11px;
    border-radius: 999px;
    color: #18735f;
    background: #eaf7f0;
    font-size: 13px;
    font-weight: 900;
}

.meal-grid {
    display: grid;
    gap: 12px;
}

.meal-grid > div {
    display: grid;
    gap: 6px;
    padding: 18px;
}

.meal-grid strong {
    color: #183f36;
    font-size: 22px;
}

.meal-game {
    padding: 18px;
    background: #fffaf0;
}

.meal-game p {
    margin: 8px 0 0;
    color: #624c20;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.7;
}

.admin-shell {
    width: min(100%, 920px);
}

.admin-hero {
    padding-bottom: 8px;
}

.admin-panel,
.admin-notice {
    margin-top: 18px;
    border: 1px solid rgba(233, 229, 218, .9);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

.admin-notice {
    padding: 14px 16px;
    font-weight: 900;
}

.admin-notice.success {
    color: #18735f;
    background: #eaf7f0;
}

.admin-notice.error {
    color: #9f321f;
    background: #fff0ea;
}

.admin-panel {
    padding: 16px;
}

.admin-actions {
    display: grid;
    gap: 10px;
}

.compact-actions {
    margin-top: 14px;
}

.admin-login {
    display: grid;
    gap: 14px;
    max-width: 440px;
    margin-inline: auto;
}

.admin-password-panel {
    display: grid;
    gap: 12px;
}

.admin-password-grid {
    display: grid;
    gap: 12px;
}

.admin-field {
    display: grid;
    gap: 8px;
    color: #47625b;
    font-size: 14px;
    font-weight: 900;
}

.admin-field input {
    width: 100%;
    min-height: 48px;
    padding: 0 12px;
    border: 1px solid #d9e5dd;
    border-radius: 8px;
    color: #183f36;
    background: #f7fbf8;
    font: inherit;
}

.admin-button {
    min-height: 50px;
    border: 0;
    border-radius: 8px;
    font: inherit;
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
}

.admin-button.secondary {
    color: #fff;
    background: #263846;
}

.admin-button.ghost {
    color: #263846;
    background: #f2f3ef;
}

.admin-table {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}

.admin-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 94px 110px;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #ece7db;
    border-radius: 8px;
    background: #fffdf7;
}

.admin-head {
    color: #7a3e18;
    background: #fff8df;
    font-size: 14px;
    font-weight: 900;
}

.admin-row strong,
.admin-row small {
    display: block;
}

.admin-row strong {
    color: #263846;
    font-size: 16px;
}

.admin-row small {
    margin-top: 4px;
    color: #8b959c;
    font-size: 13px;
    font-weight: 700;
}

.admin-row input {
    width: 22px;
    height: 22px;
    accent-color: #188f75;
}

.source-panel {
    padding: 18px;
}

.source-grid {
    display: grid;
    gap: 18px;
}

.source-figure {
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.source-figure img {
    display: block;
    width: 100%;
    height: auto;
}

.source-figure.daily-news-image {
    display: grid;
    justify-items: center;
}

.source-figure figcaption {
    padding: 10px 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.text-source-panel {
    padding: 18px;
}

.prompt-text {
    display: block;
    margin: 0;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: #fffdf7;
    font: 15px/1.75 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (min-width: 680px) {
    .app-shell {
        padding-inline: 24px;
    }

    .module-list.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-list.compact .module-card {
        grid-template-columns: 58px minmax(0, 1fr) 18px;
        padding: 16px;
    }

    .module-list.compact .module-icon {
        width: 58px;
        height: 58px;
        font-size: 22px;
    }

    .module-list.compact .module-copy strong {
        font-size: 19px;
    }

    .tool-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: end;
    }

    .tool-form label:first-of-type:nth-last-of-type(3),
    .tool-form label:first-of-type:nth-last-of-type(3) ~ label,
    .tool-form .primary-button {
        grid-column: auto;
    }

    .tool-form .primary-button {
        min-width: 160px;
    }

    .meal-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: end;
    }

    .meal-form-head {
        grid-column: 1 / -1;
    }

    .meal-button {
        grid-column: 1 / -1;
    }

    .meal-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .source-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .admin-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .compact-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .admin-password-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .marriage-form,
    .marriage-result-card {
        border-radius: 20px;
    }

    .marriage-form {
        padding: 24px 22px;
    }

    .marriage-result-card {
        padding: 28px 14px 22px;
    }

    .marriage-dial {
        width: min(100%, 380px);
    }

    .branch-dot {
        width: 52px;
        height: 52px;
        transform: translate(-50%, -50%) rotate(var(--angle)) translateY(calc((min(100vw, 408px) - 72px) / -2)) rotate(calc(-1 * var(--angle)));
    }

    .branch-dot strong {
        font-size: 19px;
    }

    .branch-dot small {
        top: 40px;
        min-width: 64px;
        font-size: 10px;
    }

    .dial-cardinal.east {
        right: 24%;
    }

    .dial-cardinal.west {
        left: 24%;
    }

    .guide-pair {
        grid-template-columns: 1fr;
    }
}
