/* 运势报告 · 移动端 App 页（桌面端重定向至 calculator） */
:root {
    --ft-page: #f7f3e9;
    --ft-card: #fffefb;
    --ft-ink: #2a2418;
    --ft-muted: #8a8074;
    --ft-line: rgba(120, 108, 92, 0.16);
    --ft-gold: #e8b86a;
}

[hidden] {
    display: none !important;
}

@media (min-width: 992px) {
    .ft-body {
        display: none;
    }
}

.ft-body {
    min-height: 100vh;
    margin: 0;
    font-family: 'Microsoft YaHei', 'PingFang SC', system-ui, sans-serif;
    color: var(--ft-ink);
    background: var(--ft-page);
    padding-bottom: calc(4.6rem + env(safe-area-inset-bottom));
}

.ft-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    padding: 0.55rem 0.75rem;
    padding-top: calc(0.55rem + env(safe-area-inset-top));
    background: color-mix(in srgb, var(--ft-page) 90%, white 10%);
    border-bottom: 1px solid var(--ft-line);
    backdrop-filter: blur(8px);
}

.ft-topbar .hd-menu-toggle {
    width: 2.35rem;
    height: 2.35rem;
}

.ft-title {
    margin: 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 800;
}

.ft-topbar-spacer {
    width: 2.35rem;
}

.ft-main {
    max-width: 520px;
    margin: 0 auto;
    padding: 0.75rem 0.85rem 1.5rem;
}

.ft-profile-card {
    position: relative;
    background: var(--ft-card);
    border: 1px solid var(--ft-line);
    border-radius: 16px;
    padding: 0.85rem 0.9rem;
    margin-bottom: 0.85rem;
    box-shadow: 0 6px 22px rgba(42, 30, 18, 0.06);
    cursor: pointer;
}

.ft-profile-card__change {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    border: none;
    background: transparent;
    color: #a67c2d;
    font-size: 0.72rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.2rem 0.35rem;
    font-family: inherit;
}

.ft-profile-line {
    margin: 0 0 0.35rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #4a4034;
}

.ft-profile-line:last-child {
    margin-bottom: 0;
}

.ft-empty {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--ft-card);
    border-radius: 16px;
    border: 1px solid var(--ft-line);
    margin-bottom: 1rem;
}

.ft-empty__text {
    margin: 0 0 1rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ft-muted);
}

.ft-empty__btn {
    display: inline-flex;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    border: 1px solid rgba(196, 146, 62, 0.55);
    background: linear-gradient(180deg, #f4d49a, #e8b86a);
    color: #3a2f1f;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    font-family: inherit;
}

.ft-section-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0.25rem 0 0.55rem;
}

.ft-section-head__bar {
    width: 4px;
    height: 1.1rem;
    border-radius: 2px;
    background: linear-gradient(180deg, #f4d49a, #d4a040);
}

.ft-section-head__title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
}

.ft-pro-bundle {
    margin: 0 0 0.85rem;
    border-radius: 14px;
    border: 1px solid rgba(212, 160, 64, 0.42);
    background: linear-gradient(180deg, rgba(255, 248, 230, 0.98), rgba(255, 236, 200, 0.78));
    box-shadow: 0 2px 10px rgba(90, 60, 20, 0.06);
    overflow: hidden;
}

.ft-pro-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.55rem;
    width: 100%;
    margin: 0;
    padding: 0.72rem 0.8rem;
    border: none;
    background: transparent;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    color: #5c4318;
}

.ft-pro-entry__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.28rem;
    min-width: 0;
    flex: 1 1 auto;
}

.ft-pro-entry__title-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.ft-pro-entry__tag {
    display: inline-block;
    padding: 0.18rem 0.62rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #f4d49a, #e8b86a);
    font-size: 0.78rem;
    font-weight: 800;
    color: #3a2f1f;
    line-height: 1.3;
}

.ft-pro-entry__lock {
    display: none;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 2px;
    background: rgba(120, 90, 40, 0.55);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.25);
    position: relative;
}

.ft-pro-entry__lock.is-visible {
    display: inline-block;
}

.ft-pro-entry__lock::after {
    content: '';
    position: absolute;
    left: 50%;
    top: -0.22rem;
    width: 0.42rem;
    height: 0.42rem;
    border: 1.5px solid rgba(120, 90, 40, 0.7);
    border-bottom: none;
    border-radius: 999px 999px 0 0;
    transform: translateX(-50%);
}

.ft-pro-entry__hint {
    margin: 0;
    font-size: 0.74rem;
    line-height: 1.45;
    color: #6b6154;
}

.ft-pro-entry__chevron {
    width: 0.55rem;
    height: 0.55rem;
    flex: 0 0 auto;
    border-right: 2px solid #a08040;
    border-bottom: 2px solid #a08040;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
    margin-top: -0.2rem;
}

.ft-pro-bundle.is-open .ft-pro-entry__chevron {
    transform: rotate(-135deg);
    margin-top: 0.15rem;
}

.ft-pro-panel {
    padding: 0 0.7rem 0.75rem;
    border-top: 1px solid rgba(212, 160, 64, 0.28);
}

.ft-pro-panel .ft-unlock-bar {
    margin: 0.65rem 0 0.55rem;
}

.ft-topic-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ft-topic-card {
    display: flex;
    flex-direction: column;
    background: var(--ft-card);
    border: 1px solid var(--ft-line);
    border-radius: 16px;
    padding: 0.85rem 0.85rem 0.75rem;
    box-shadow: 0 4px 18px rgba(42, 30, 18, 0.05);
    overflow: visible;
    min-height: 0;
}

.ft-topic-card__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(5.5rem, max-content);
    gap: 0.55rem 0.65rem;
    align-items: start;
    flex: 1 1 auto;
    min-height: 0;
    grid-template-rows: auto auto auto;
}

.ft-topic-card__main {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 0;
}

.ft-topic-card__kicker {
    display: inline-block;
    font-size: 0.62rem;
    font-weight: 700;
    color: #9a9084;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.ft-topic-card__title {
    display: block;
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.ft-topic-card__hint {
    display: block;
    font-size: 0.74rem;
    color: var(--ft-muted);
    margin-bottom: 0.45rem;
}

.ft-topic-card__section-box {
    margin: 0;
    padding: 0.42rem 0.45rem 0.4rem;
    border: 1px solid rgba(196, 146, 62, 0.28);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.65);
    box-sizing: border-box;
}

.ft-topic-card__sections {
    margin: 0;
    padding-left: 1.05rem;
    font-size: 0.72rem;
    line-height: 1.55;
    color: #5a5248;
}

.ft-topic-card__sections li {
    margin-bottom: 0.12rem;
}

.ft-topic-card__section--custom {
    display: flex;
    align-items: flex-start;
    gap: 0.3rem;
    list-style: disc;
    padding-right: 0.1rem;
}

.ft-topic-card__section--custom .ft-topic-card__q-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
    word-break: break-word;
}

.ft-topic-card__section--custom .ft-topic-card__q-remove {
    flex: 0 0 auto;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9a7a4a;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}

.ft-topic-card__questions {
    margin-top: 0.35rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.32rem;
}

.ft-topic-card__q-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.32rem;
    width: 100%;
}

.ft-topic-card__q-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.26rem;
}

.ft-topic-card__q-list[hidden],
.ft-topic-card__q-manage-hint[hidden] {
    display: none !important;
}

.ft-topic-card__q-item {
    display: flex;
    align-items: flex-start;
    gap: 0.32rem;
    padding: 0.3rem 0.38rem;
    border-radius: 8px;
    border: 1px solid rgba(196, 146, 62, 0.22);
    background: rgba(255, 252, 246, 0.92);
}

.ft-topic-card__q-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.7rem;
    line-height: 1.45;
    color: #5a4a34;
    word-break: break-word;
}

.ft-topic-card__q-remove {
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #9a7a4a;
    font-size: 0.95rem;
    line-height: 1;
    cursor: pointer;
}

.ft-topic-card__q-remove--text {
    width: auto;
    min-width: 2.3rem;
    height: auto;
    padding: 0.1rem 0.4rem;
    border: 1px solid rgba(160, 90, 70, 0.32);
    border-radius: 999px;
    background: rgba(255, 248, 244, 0.96);
    color: #8a4a38;
    font-size: 0.66rem;
    font-weight: 600;
    line-height: 1.3;
}

.ft-topic-card__q-remove--text:hover {
    background: rgba(255, 236, 228, 0.98);
    color: #6a3224;
}

.ft-topic-card__q-manage-hint {
    width: 100%;
    margin: 0;
    font-size: 0.66rem;
    line-height: 1.4;
    color: #9a7a4a;
    text-align: right;
}

.ft-topic-card__add-q,
.ft-topic-card__del-q {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0.26rem 0.68rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 650;
    cursor: pointer;
}

.ft-topic-card__add-q {
    border: 1px dashed rgba(166, 112, 42, 0.55);
    background: rgba(255, 250, 240, 0.95);
    color: #7a5a28;
}

.ft-topic-card__del-q {
    border: 1px solid rgba(160, 90, 70, 0.38);
    background: rgba(255, 248, 244, 0.96);
    color: #8a4a38;
}

.ft-topic-card__add-q:disabled,
.ft-topic-card__del-q:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ft-topic-card__del-q:hover:not(:disabled) {
    border-color: rgba(160, 90, 70, 0.55);
    background: rgba(255, 236, 228, 0.98);
}

.ft-topic-card__q-editor {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.35rem;
    border-radius: 10px;
    border: 1px solid rgba(196, 146, 62, 0.28);
    background: rgba(255, 255, 255, 0.85);
    box-sizing: border-box;
}

.ft-topic-card__q-editor[hidden] {
    display: none !important;
}

.ft-topic-card__q-input {
    width: 100%;
    min-height: 2.4rem;
    margin: 0;
    padding: 0.35rem 0.42rem;
    border: 1px solid rgba(196, 146, 62, 0.32);
    border-radius: 8px;
    background: #fffdf8;
    color: #3a2f1f;
    font: inherit;
    font-size: 0.76rem;
    line-height: 1.45;
    resize: vertical;
    box-sizing: border-box;
}

.ft-topic-card__q-editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    flex-wrap: wrap;
}

.ft-topic-card__q-max-hint {
    margin-right: auto;
    font-size: 0.64rem;
    color: #9a8a72;
}

.ft-topic-card__q-cancel,
.ft-topic-card__q-confirm {
    margin: 0;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font: inherit;
    font-size: 0.7rem;
    font-weight: 650;
    cursor: pointer;
}

.ft-topic-card__q-cancel {
    border: 1px solid rgba(140, 120, 90, 0.35);
    background: transparent;
    color: #6a5a44;
}

.ft-topic-card__q-confirm {
    border: 1px solid rgba(196, 146, 62, 0.5);
    background: linear-gradient(180deg, #f8e4b8, #e8b86a);
    color: #3a2f1f;
}

.ft-topic-card__methods {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    min-width: 5.5rem;
    max-width: 11.5rem;
    justify-self: end;
    align-self: start;
    align-items: flex-end;
    text-align: right;
}

.ft-method-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    color: #4a4034;
    cursor: pointer;
    user-select: none;
    max-width: 100%;
    word-break: keep-all;
}

.ft-method-item.is-disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.ft-method-item--unavailable {
    display: block;
    margin: 0.12rem 0;
    padding: 0.08rem 0;
    font-size: 0.68rem;
    font-weight: 500;
    color: #a8a095;
    cursor: default;
    user-select: none;
    text-align: right;
}

.ft-method-check {
    width: 0.95rem;
    height: 0.95rem;
    accent-color: #c4923e;
    flex-shrink: 0;
}

.ft-topic-card__copy {
    grid-column: 1 / -1;
    grid-row: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.35rem;
    margin-left: auto;
    padding: 0.42rem 0.85rem;
    border: 1px solid rgba(196, 146, 62, 0.45);
    border-radius: 999px;
    background: linear-gradient(180deg, #f8e4b8, #e8b86a);
    color: #3a2f1f;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.ft-topic-card__copy::before {
    content: '⎘';
    font-size: 0.85rem;
    opacity: 0.85;
}

.ft-topic-card__copy:disabled,
.ft-topic-card__copy.is-locked {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.15);
}

.ft-topic-card__copy.is-loading,
.ft-topic-card__copy.is-loading:disabled {
    cursor: wait;
    pointer-events: none;
    opacity: 0.9;
    filter: none;
}

.ft-topic-card__copy.is-loading::before {
    content: '';
    width: 0.78rem;
    height: 0.78rem;
    border: 2px solid rgba(58, 47, 31, 0.28);
    border-top-color: currentColor;
    border-radius: 50%;
    opacity: 1;
    animation: fortune-topic-copy-spin 0.7s linear infinite;
}

.ft-topic-card__copy.is-copied::before {
    content: '✓';
    opacity: 1;
}

@keyframes fortune-topic-copy-spin {
    to {
        transform: rotate(360deg);
    }
}

.app-notice-loading-row {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.app-notice-loading-spinner {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    border: 2px solid rgba(126, 96, 58, 0.28);
    border-top-color: #c4923e;
    border-radius: 50%;
    animation: fortune-topic-copy-spin 0.7s linear infinite;
}

.ft-notice__ok.is-loading {
    cursor: wait;
    opacity: 0.88;
    pointer-events: none;
}

.ft-topic-card__ai-jumps {
    grid-column: 1 / -1;
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.32rem;
    margin-top: 0.28rem;
}

.ft-topic-card__ai-jump {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0.32rem 0.2rem;
    border: 1px solid rgba(126, 96, 58, 0.28);
    border-radius: 999px;
    background: rgba(255, 252, 247, 0.96);
    color: #5a4a34;
    font-family: inherit;
    font-size: 0.68rem;
    font-weight: 650;
    line-height: 1.2;
    cursor: pointer;
}

.ft-topic-card__ai-jump.is-locked {
    opacity: 0.55;
    cursor: not-allowed;
    filter: grayscale(0.15);
}

.ft-topic-card__copy-hint,
.fortune-topic-card__copy-hint {
    display: none !important;
}

.ft-unlock-bar {
    margin: 0 0 0.75rem;
    padding: 0.75rem 0.85rem;
    border-radius: 14px;
    background: rgba(255, 248, 235, 0.96);
    border: 1px solid rgba(196, 146, 62, 0.35);
}

.ft-unlock-bar[hidden] {
    display: none !important;
}

.ft-unlock-bar__text {
    margin: 0 0 0.55rem;
    font-size: 0.76rem;
    line-height: 1.45;
    color: #5a4020;
}

.ft-unlock-bar__actions {
    display: flex;
    gap: 0.45rem;
}

.ft-unlock-bar__btn {
    flex: 1;
    min-height: 2.2rem;
    border-radius: 999px;
    border: 1px solid rgba(196, 146, 62, 0.45);
    background: #fff;
    color: #4a3620;
    font-size: 0.76rem;
    font-weight: 700;
    font-family: inherit;
}

.ft-unlock-bar__btn--primary {
    background: linear-gradient(180deg, #f8e4b8, #e8b86a);
    border-color: rgba(196, 146, 62, 0.55);
}

.ft-notice-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(30, 24, 16, 0.42);
}

.ft-notice-backdrop[hidden] {
    display: none !important;
}

.ft-notice {
    width: min(100%, 320px);
    background: var(--ft-card);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.15);
}

.ft-notice__title {
    margin: 0 0 0.55rem;
    font-size: 1rem;
    font-weight: 800;
}

.ft-notice__body {
    margin: 0 0 0.85rem;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ft-muted);
}

.ft-notice__ok {
    display: block;
    width: 100%;
    padding: 0.55rem;
    border: none;
    border-radius: 999px;
    background: linear-gradient(180deg, #f4d49a, #e8b86a);
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
}

.hd-mobile-bottom-nav a.hd-mobile-bottom-nav__btn {
    text-decoration: none;
    color: #6b6154;
}

.ft-body .hd-modal-backdrop:not([hidden]) {
    display: flex;
}

/* 手机端：隐藏「去开通」，仅保留邀请码 */
#ftUnlockPayBtn {
    display: none !important;
}

.ft-unlock-bar {
    margin: 0 0 0.65rem;
    padding: 0.62rem 0.75rem;
    border-radius: 12px;
}

.ft-unlock-bar__text {
    font-size: 0.72rem;
    margin-bottom: 0.45rem;
}

.ft-unlock-bar__actions {
    justify-content: center;
}

#ftUnlockInviteBtn {
    flex: 0 1 auto;
    min-width: 7.5rem;
    max-width: 11rem;
    min-height: 2rem;
    font-size: 0.74rem;
}

.ft-profile-card {
    padding: 0.75rem 0.82rem;
    margin-bottom: 0.72rem;
}

.ft-profile-line {
    font-size: 0.78rem;
}

.ft-topic-card__title {
    font-size: 0.88rem;
}

.ft-topic-card__copy {
    font-size: 0.72rem;
    min-height: 2rem;
    padding: 0.42rem 0.65rem;
}

/* 追问真人老师 · 右下角浮钮（与 calculator 一致） */
.ask-human-teacher-fab {
    position: fixed;
    right: max(1.1rem, env(safe-area-inset-right, 0px));
    bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 1300;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.7rem;
    height: 2.2rem;
    padding: 0 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 146, 27, 0.95);
    background: linear-gradient(145deg, rgba(255, 254, 236, 1), rgba(255, 212, 96, 1) 58%, rgba(255, 187, 68, 0.98));
    color: #4e2c06;
    text-decoration: none;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 12px 26px rgba(255, 153, 36, 0.44),
        0 0 0 2px rgba(255, 205, 112, 0.72);
    cursor: pointer;
}

.ask-human-teacher-fab__sub {
    font-size: 0.72em;
    font-weight: 600;
    opacity: 0.88;
}
