:root {
    --ink: #242424;
    --muted: #8a8a8a;
    --line: #ececec;
    --canvas: #f5f5f5;
    --pink: #e65c92;
    --pink-soft: #fff0f6;
    --yellow: #f6d470;
    --green: #4caf68;
    --purple: #a857e7;
    --frame: 440px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--canvas);
    font-family: Orbit, "Gowun Dodum", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    word-break: keep-all;
}

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

button,
input {
    color: inherit;
    font: inherit;
}

button {
    border: 0;
}

.app-frame {
    position: relative;
    width: min(100%, var(--frame));
    min-height: 100vh;
    margin: 0 auto;
    padding-bottom: 86px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 0 28px rgba(0, 0, 0, .08);
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    height: 48px;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    border-bottom: 1px solid #f2f2f2;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(10px);
}

.wordmark {
    align-self: center;
    margin-left: 16px;
    display: grid;
    justify-items: center;
    transform: rotate(-2deg);
}

.wordmark span {
    padding: 4px 7px 3px;
    border: 2px solid #141414;
    border-radius: 8px;
    color: #141414;
    background: #f5d748;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 2px 2px 0 #141414;
}

.wordmark small {
    margin-top: 2px;
    font-size: 7px;
    font-weight: 700;
}

.app-header form {
    display: contents;
}

.header-action {
    min-width: 62px;
    display: grid;
    place-items: center;
    background: var(--yellow);
    cursor: pointer;
    font-size: 15px;
}

.app-main {
    min-height: calc(100vh - 144px);
}

.ticket-card {
    margin: 10px 16px 14px;
    overflow: hidden;
    border: 1px solid #3d3440;
    border-radius: 11px;
    background: #fff;
    box-shadow: 3px 4px 0 rgba(230, 92, 146, .18);
}

.ticket-titlebar {
    height: 28px;
    padding: 0 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-bottom: 1px solid #5e485b;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, .55) 0 1px, transparent 1px 3px),
        #f3cce3;
    font-size: 11px;
}

.ticket-titlebar span {
    margin-right: auto;
}

.ticket-titlebar i {
    width: 12px;
    height: 12px;
    border: 1px solid #4f4350;
    background: #ffffd4;
}

.ticket-titlebar i:last-child {
    background: #f09ab5;
}

.ticket-body {
    min-height: 68px;
    padding: 12px 12px 12px 14px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.ticket-body > div {
    min-width: 0;
    flex: 1;
}

.ticket-body strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.ticket-body p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.ticket-body > a {
    width: 64px;
    height: 56px;
    display: grid;
    place-items: center;
    align-content: center;
    border: 1px solid #4f4350;
    border-radius: 10px;
    background: linear-gradient(#fffbe7, #f4d886);
    box-shadow: inset 0 -3px 0 rgba(94, 72, 45, .13);
}

.ticket-body > a b {
    color: var(--pink);
    font-size: 22px;
    line-height: 1;
}

.ticket-body > a span {
    color: #806f5d;
    font-size: 9px;
}

.message-stack {
    margin: 0 16px 14px;
    display: grid;
    gap: 7px;
}

.message-card {
    position: relative;
    min-height: 64px;
    padding: 9px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #f0edf0;
    border-radius: 18px;
    background: #fff;
}

.message-card.primary {
    box-shadow: 0 7px 18px rgba(94, 48, 76, .08);
}

.message-card.secondary {
    min-height: 48px;
    margin-inline: 8px;
    border-radius: 14px;
    background: #fdfbfe;
    opacity: .72;
}

.message-card img {
    width: 48px;
    height: 48px;
    flex: none;
    border: 3px solid #f5bdd2;
    border-radius: 50%;
    object-fit: cover;
}

.message-card.secondary img {
    width: 30px;
    height: 30px;
    border-width: 2px;
}

.message-card > div {
    min-width: 0;
    flex: 1;
}

.message-card strong,
.message-card p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.message-card strong {
    display: block;
    font-size: 12px;
}

.message-card p {
    margin: 3px 0 0;
    color: #8d858a;
    font-size: 10px;
}

.message-card > b {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--pink);
    background: var(--pink-soft);
    font-size: 25px;
    font-weight: 400;
}

.message-badge {
    position: absolute;
    top: 7px;
    left: 50px;
    width: 17px;
    height: 17px;
    display: grid;
    place-items: center;
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    background: var(--pink);
    font-size: 8px;
}

.message-card.secondary > span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--pink);
}

.reading-form {
    margin: 18px 14px 24px;
    padding: 22px 18px;
    display: grid;
    gap: 18px;
    border: 1px solid #e6e6e6;
    border-radius: 17px;
    background: #fffdf8;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .06);
}

.form-intro {
    text-align: center;
}

.mini-label {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    color: var(--pink);
    background: var(--pink-soft);
    font-size: 10px;
}

.form-intro h1 {
    margin: 12px 0 7px;
    font-size: 23px;
    letter-spacing: -.04em;
}

.form-intro p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
}

.field {
    display: grid;
    gap: 7px;
}

.field > span,
.reading-form legend {
    color: #535353;
    font-size: 12px;
    font-weight: 700;
}

.field small {
    color: #aaa;
    font-size: 9px;
    font-weight: 400;
}

.field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
    outline: none;
    background: #fff;
}

.field input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 3px var(--pink-soft);
}

.reading-form fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.reading-form legend {
    margin-bottom: 7px;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    overflow: hidden;
    border: 1px solid #e4e4e4;
    border-radius: 10px;
}

.segmented.three {
    grid-template-columns: repeat(3, 1fr);
}

.segmented label {
    position: relative;
}

.segmented input {
    position: absolute;
    opacity: 0;
}

.segmented span {
    min-height: 43px;
    display: grid;
    place-items: center;
    border-right: 1px solid #e4e4e4;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
}

.segmented label:last-child span {
    border-right: 0;
}

.segmented input:checked + span {
    color: #fff;
    background: var(--pink);
}

.pill-button {
    min-height: 46px;
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 999px;
    color: #fff;
    background: var(--pink);
    box-shadow: 0 5px 0 #bd3f70;
    cursor: pointer;
    font-weight: 700;
    text-align: center;
}

.pill-button span {
    font-size: 22px;
    line-height: 1;
}

.pill-button:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #bd3f70;
}

.pill-button:disabled {
    background: #bdbdbd;
    box-shadow: none;
    cursor: not-allowed;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.product-card {
    min-width: 0;
    display: block;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.product-card > img {
    width: 100%;
    aspect-ratio: 1;
    display: block;
    object-fit: cover;
}

.product-card > div {
    min-height: 88px;
    padding: 8px 8px 9px;
}

.product-card h2 {
    margin: 0 0 4px;
    font-size: 13px;
}

.product-card p {
    min-height: 25px;
    margin: 0;
    overflow: hidden;
    color: #999;
    font-size: 10px;
    line-height: 1.4;
}

.product-card footer {
    margin-top: 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.product-card footer span {
    color: var(--pink);
    font-size: 9px;
}

.product-card footer b {
    padding: 5px 9px;
    border-radius: 999px;
    color: #fff;
    background: var(--pink);
    font-size: 8px;
    white-space: nowrap;
}

.recent-section {
    padding: 28px 20px;
    border-top: 8px solid #f7f7f7;
}

.section-heading span {
    color: var(--pink);
    font-size: 9px;
    letter-spacing: .1em;
}

.section-heading h2 {
    margin: 5px 0 14px;
    font-size: 19px;
}

.saved-reading {
    padding: 14px 2px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--line);
}

.saved-reading span {
    display: grid;
    gap: 3px;
}

.saved-reading strong {
    font-size: 12px;
}

.saved-reading small {
    color: var(--muted);
    font-size: 9px;
}

.saved-reading b {
    color: var(--pink);
    font-size: 22px;
}

.empty-copy {
    padding: 24px 0;
    color: var(--muted);
    font-size: 11px;
}

.about-section {
    padding: 32px 24px 44px;
    border-top: 8px solid #f7f7f7;
    color: #777;
    background: #fafafa;
    font-size: 11px;
}

.about-section h2 {
    margin: 0 0 7px;
    color: #454545;
    font-size: 16px;
}

.about-section p {
    margin: 0 0 16px;
}

.about-section ul {
    margin: 0;
    padding-left: 17px;
    line-height: 2;
}

.login-hero {
    min-height: 150px;
    padding: 20px;
    display: grid;
    place-items: center;
    background: #fffdf4;
}

.welcome-stamp {
    width: 275px;
    height: 112px;
    display: grid;
    place-items: center;
    align-content: center;
    border-radius: 50%;
    background: var(--yellow);
    transform: rotate(-2deg);
    text-align: center;
}

.welcome-stamp small {
    color: #8b7c50;
    font-size: 9px;
}

.welcome-stamp strong {
    margin: 3px 0;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    text-shadow: 2px 2px 0 #6f7a35;
}

.welcome-stamp span {
    color: #7f713f;
    font-size: 10px;
}

.selected-product {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 14px;
}

.selected-product img {
    width: 76px;
    height: 76px;
    border-radius: 10px;
    object-fit: cover;
}

.selected-product div {
    display: grid;
    gap: 3px;
}

.selected-product small {
    color: var(--pink);
    font-size: 9px;
}

.selected-product strong {
    font-size: 19px;
}

.selected-product span {
    color: var(--muted);
    font-size: 10px;
}

.social-login {
    display: grid;
}

.social-login form {
    display: contents;
}

.social-button {
    width: 100%;
    min-height: 72px;
    padding: 0 22px;
    display: grid;
    grid-template-columns: 30px 1fr 24px;
    align-items: center;
    border-bottom: 1px solid var(--line);
    background: #fff;
    cursor: pointer;
    font-size: 17px;
    text-align: left;
}

.social-button b {
    font-size: 19px;
}

.social-button i {
    font-size: 23px;
    font-style: normal;
    font-weight: 400;
}

.social-button.kakao {
    background: var(--yellow);
}

.social-button.demo {
    color: #fff;
    background: var(--green);
}

.social-button.disabled {
    color: #888;
    cursor: not-allowed;
}

.result-page,
.checkout-page {
    background: #f8f8f8;
}

.result-product-header,
.checkout-product {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
}

.result-product-header img,
.checkout-product img {
    width: 98px;
    height: 98px;
    border-radius: 13px;
    object-fit: cover;
}

.result-product-header div,
.checkout-product div {
    min-width: 0;
}

.result-product-header span,
.checkout-product small {
    color: var(--pink);
    font-size: 9px;
}

.result-product-header h1,
.checkout-product h1 {
    margin: 6px 0 0;
    font-size: 24px;
    line-height: 1.35;
}

.result-summary-card {
    margin: 12px;
    padding: 30px 24px;
    border: 1px solid #ebdfe5;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 7px 20px rgba(89, 55, 70, .06);
    text-align: center;
}

.result-label {
    width: max-content;
    margin: 0 auto 20px;
    padding: 5px 10px;
    border-radius: 999px;
    color: var(--pink);
    background: var(--pink-soft);
    font-size: 9px;
}

.result-overline {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 10px;
}

.result-summary-card h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1.45;
}

.keyword-chip {
    margin: 17px auto;
    padding: 6px 12px;
    display: inline-block;
    border-radius: 6px;
    color: #9b6790;
    background: #f8e9f1;
    font-size: 10px;
}

.result-copy {
    margin: 0;
    color: #666;
    font-family: "Gowun Dodum", sans-serif;
    font-size: 14px;
    line-height: 1.9;
}

.detail-results {
    padding: 0 12px 16px;
    display: grid;
    gap: 10px;
}

.detail-card {
    position: relative;
    padding: 25px 22px;
    overflow: hidden;
    border-radius: 16px;
    background: #fff;
}

.detail-card > span {
    color: var(--pink);
    font-size: 9px;
}

.detail-card h2 {
    margin: 6px 0 14px;
    font-size: 18px;
}

.detail-card p {
    margin: 0;
    color: #666;
    font-family: "Gowun Dodum", sans-serif;
    font-size: 13px;
    line-height: 1.85;
}

.detail-number {
    position: absolute;
    top: -15px;
    right: 8px;
    color: #f7e7ef;
    font-size: 70px;
    font-weight: 800;
}

.paywall-zone {
    position: relative;
    min-height: 560px;
    padding: 8px 12px 24px;
}

.locked-results {
    display: grid;
    gap: 9px;
    filter: blur(7px);
    opacity: .45;
}

.locked-results > div {
    min-height: 140px;
    padding: 22px;
    border-radius: 14px;
    background: #fff;
}

.locked-results span {
    display: block;
    margin-bottom: 17px;
    font-size: 17px;
}

.locked-results i {
    width: 90%;
    height: 10px;
    margin: 9px 0;
    display: block;
    border-radius: 10px;
    background: #d7d7d7;
}

.locked-results i:nth-child(3) {
    width: 70%;
}

.locked-results i:nth-child(4) {
    width: 48%;
}

.paywall-card {
    position: absolute;
    top: 50%;
    left: 50%;
    width: calc(100% - 40px);
    padding: 28px 20px 24px;
    transform: translate(-50%, -50%);
    border: 1px solid #efd7e2;
    border-radius: 20px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 16px 44px rgba(74, 40, 56, .16);
    text-align: center;
}

.cat-lock {
    width: 58px;
    height: 58px;
    margin: 0 auto 14px;
    display: grid;
    place-items: center;
    border: 4px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #f36e9f, #9c55e7);
    box-shadow: 0 5px 14px rgba(168, 87, 231, .28);
}

.cat-lock img {
    width: 29px;
    filter: invert(1);
}

.paywall-card small {
    color: var(--pink);
    font-size: 9px;
}

.paywall-card h2 {
    margin: 8px 0 9px;
    font-size: 19px;
    line-height: 1.55;
}

.paywall-card p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 9px;
}

.paywall-card .pill-button {
    width: 100%;
}

.subtle-link {
    margin: 12px auto 30px;
    display: block;
    color: #888;
    font-size: 11px;
    text-align: center;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.checkout-page {
    min-height: calc(100vh - 144px);
    padding-bottom: 24px;
}

.checkout-benefits {
    margin-top: 10px;
    padding: 24px 20px;
    background: #fff;
}

.checkout-benefits h2 {
    margin: 0 0 15px;
    font-size: 16px;
}

.checkout-benefits ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 13px;
    list-style: none;
}

.checkout-benefits li {
    display: flex;
    gap: 9px;
    color: #666;
    font-size: 12px;
}

.checkout-benefits li b {
    color: var(--pink);
}

.price-row {
    margin-top: 10px;
    padding: 23px 20px;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    background: #fff;
}

.price-row span {
    color: #777;
    font-size: 12px;
}

.price-row strong {
    font-size: 24px;
}

.checkout-submit {
    width: calc(100% - 32px);
    margin: 22px 16px 10px;
}

.checkout-page form {
    display: contents;
}

.payment-message {
    margin: 10px 20px;
    color: #888;
    font-size: 10px;
    text-align: center;
}

.flash,
.error-summary {
    margin: 10px 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 11px;
}

.flash {
    color: #2b6a41;
    background: #edf8f0;
}

.error-summary {
    color: #9b2f55;
    background: var(--pink-soft);
}

.error-summary ul {
    margin: 7px 0 0;
    padding-left: 17px;
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    z-index: 40;
    width: min(100%, var(--frame));
    height: 76px;
    padding: 8px 7px 5px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    transform: translateX(-50%);
    border-top: 1px solid #ededed;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 -7px 20px rgba(0, 0, 0, .05);
    backdrop-filter: blur(12px);
}

.bottom-nav > a {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 3px;
    color: #5d5d5d;
    font-size: 9px;
}

.bottom-nav > a > img {
    width: 23px;
    height: 23px;
    opacity: .78;
}

.bottom-nav > a.active {
    color: var(--pink);
}

.bottom-nav > a.active > img {
    filter: invert(48%) sepia(67%) saturate(1349%) hue-rotate(297deg) brightness(96%);
}

.bottom-nav .fortune-nav {
    padding-top: 34px;
}

.fortune-button {
    position: absolute;
    top: -22px;
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border: 4px solid #fff;
    border-radius: 50%;
    background: linear-gradient(135deg, #f36999, #9b55e5);
    box-shadow: 0 5px 15px rgba(130, 76, 177, .27);
}

.fortune-button img {
    width: 31px;
    filter: invert(1);
}

@media (max-width: 520px) {
    .app-frame {
        box-shadow: none;
    }
}

@media (max-width: 370px) {
    .product-card footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .product-card footer b {
        align-self: flex-end;
    }
}
