:root {
    --blue: #397bbb;
    --blue-dark: #225c9d;
    --ink: #20242a;
    --muted: #8c9097;
    --line: #e8eaed;
    --paper: #ffffff;
    --page: #f5f6f7;
    --blush: #fff8f8;
    --green: #04a875;
    --orange: #f2a260;
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
    color: var(--ink);
    background: #e9edf1;
    font-synthesis: none;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: #e9edf1;
    scroll-behavior: smooth;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #e9edf1;
}

button,
input {
    font: inherit;
    letter-spacing: 0;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

button {
    border: 0;
    cursor: pointer;
    outline: 0;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    box-shadow: 0 0 0 3px rgb(57 123 187 / 28%);
}

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

img {
    display: block;
    max-width: 100%;
}

svg {
    width: 1em;
    height: 1em;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.app-shell {
    position: relative;
    width: 100%;
    max-width: 520px;
    min-height: 100vh;
    margin: 0 auto;
    overflow: hidden;
    background: var(--page);
    box-shadow: 0 0 36px rgb(31 43 56 / 8%);
}

/* Home */
.home-hero {
    position: relative;
    height: clamp(300px, 68vw, 354px);
    overflow: hidden;
    color: #fff;
    background: #5a3829 url("../images/hero-gavel.jpg") 57% center / cover no-repeat;
    background-blend-mode: multiply;
}

.hero-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgb(17 9 5 / 64%), rgb(17 9 5 / 20%) 72%, rgb(17 9 5 / 38%));
}

.mini-capsule,
.detail-capsule {
    position: absolute;
    z-index: 2;
    top: calc(18px + env(safe-area-inset-top));
    right: 18px;
    display: grid;
    grid-template-columns: 46px 1px 46px;
    align-items: center;
    width: 104px;
    height: 42px;
    border: 1px solid rgb(255 255 255 / 24%);
    border-radius: 24px;
    background: rgb(15 15 15 / 25%);
    backdrop-filter: blur(8px);
}

.mini-capsule button,
.detail-capsule button {
    display: grid;
    width: 100%;
    height: 100%;
    padding: 0;
    place-items: center;
    color: #fff;
    background: transparent;
}

.mini-capsule button svg,
.detail-capsule button svg {
    width: 22px;
    height: 22px;
}

.mini-capsule > span,
.detail-capsule > span {
    width: 1px;
    height: 22px;
    background: rgb(255 255 255 / 24%);
}

.hero-copy {
    position: absolute;
    z-index: 1;
    left: 9.5%;
    top: 39%;
}

.demo-tag {
    display: inline-flex;
    align-items: center;
    height: 25px;
    padding: 0 10px;
    margin-bottom: 10px;
    border: 1px solid rgb(255 255 255 / 52%);
    border-radius: 13px;
    font-size: 12px;
    font-weight: 600;
    background: rgb(0 0 0 / 18%);
}

.hero-copy h1 {
    margin: 0;
    font-size: clamp(22px, 5.8vw, 30px);
    line-height: 1.35;
    font-weight: 800;
    letter-spacing: 0;
    text-shadow: 0 2px 12px rgb(0 0 0 / 25%);
}

.hero-dots {
    position: absolute;
    z-index: 2;
    bottom: 42px;
    left: 50%;
    display: flex;
    gap: 5px;
    transform: translateX(-50%);
}

.hero-dots b,
.hero-dots i {
    width: 18px;
    height: 3px;
    border-radius: 2px;
    background: #fff;
}

.hero-dots i {
    width: 13px;
    opacity: .45;
}

.search-card {
    position: absolute;
    z-index: 4;
    top: calc(clamp(300px, 68vw, 354px) - 34px);
    left: 3%;
    display: flex;
    align-items: center;
    width: 94%;
    height: 68px;
    border: 1px solid rgb(31 53 75 / 5%);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 30px rgb(24 39 56 / 10%);
}

.search-card button {
    display: grid;
    flex: 0 0 64px;
    height: 100%;
    padding: 0;
    place-items: center;
    color: #121820;
    background: transparent;
}

.search-card button svg {
    width: 29px;
    height: 29px;
}

.search-card input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 20px 0 0;
    border: 0;
    outline: 0;
    color: #262a30;
    font-size: clamp(18px, 5vw, 23px);
    background: transparent;
}

.search-card input::placeholder {
    color: #96999e;
}

.search-error {
    position: absolute;
    top: calc(100% + 5px);
    left: 12px;
    display: none;
    margin: 0;
    color: #d44747;
    font-size: 12px;
}

.search-card.has-error {
    animation: search-shake .3s ease-in-out;
    border-color: #eea8a8;
}

.search-card.has-error .search-error {
    display: block;
}

@keyframes search-shake {
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

.home-content {
    padding: 64px 3% 36px;
}

.function-panel {
    min-height: 640px;
    padding: 22px 18px 0;
    border: 1px solid #f0f1f2;
    border-radius: 8px;
    background: #fff;
}

.section-title {
    display: flex;
    align-items: center;
    width: max-content;
    min-width: 124px;
    height: 38px;
    padding: 0 14px;
    margin-bottom: 18px;
    border-radius: 4px;
    background: linear-gradient(90deg, #edf4ff, #fff);
}

.section-title span,
.record-section h3 > span,
.evidence-title h3 > span,
.certificate-title h3 > span {
    width: 3px;
    height: 21px;
    margin-right: 12px;
    border-radius: 2px;
    background: var(--blue);
}

.section-title h2 {
    margin: 0;
    font-size: 21px;
    line-height: 1;
}

.feature-card {
    position: relative;
    display: flex;
    overflow: hidden;
    border-radius: 8px;
    color: #fff;
    text-align: left;
}

.feature-card::before {
    position: absolute;
    inset: 0;
    content: "";
    background: linear-gradient(120deg, rgb(255 255 255 / 5%), transparent 55%, rgb(255 255 255 / 11%));
}

.feature-primary {
    align-items: center;
    justify-content: space-between;
    height: 126px;
    padding: 24px 26px;
    background: linear-gradient(105deg, #3977b8, #5b91d8);
}

.feature-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.feature-copy strong {
    font-size: 29px;
    line-height: 1.2;
    font-weight: 650;
}

.feature-copy small {
    display: flex;
    align-items: center;
    width: fit-content;
    margin-top: 13px;
    color: rgb(255 255 255 / 72%);
    font-size: 17px;
}

.feature-primary .feature-copy small {
    height: 35px;
    padding: 0 10px 0 14px;
    border: 1px solid rgb(255 255 255 / 75%);
    border-radius: 18px;
    color: #fff;
}

.feature-primary .feature-copy small svg {
    width: 18px;
    height: 18px;
}

.shield-mark {
    position: relative;
    z-index: 1;
    display: grid;
    width: 82px;
    height: 82px;
    place-items: center;
    border-radius: 50%;
    color: rgb(255 255 255 / 78%);
    background: rgb(255 255 255 / 7%);
}

.shield-mark svg {
    width: 66px;
    height: 66px;
    fill: rgb(255 255 255 / 11%);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 12px;
}

.feature-grid .feature-card {
    align-items: center;
    justify-content: space-between;
    height: 96px;
    width: 100%;
    padding: 18px 20px;
}

.feature-message {
    background: linear-gradient(110deg, #04a876, #13bd98);
}

.feature-profile {
    background: linear-gradient(110deg, #ed9b69, #f7bd62);
}

.feature-grid .feature-copy strong {
    font-size: 25px;
}

.feature-grid .feature-copy small {
    margin-top: 4px;
    font-size: 16px;
}

.feature-grid .feature-card > svg {
    position: relative;
    z-index: 1;
    width: 42px;
    height: 42px;
    color: rgb(255 255 255 / 78%);
}

.brand-lockup {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    min-height: 292px;
    padding-top: 74px;
}

.brand-logo {
    display: block;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    object-fit: contain;
}

.brand-lockup > span:last-child {
    display: flex;
    flex-direction: column;
}

.brand-lockup strong {
    font-size: clamp(15px, 4.5vw, 22px);
    font-weight: 650;
    white-space: nowrap;
}

.brand-lockup small {
    margin-top: 3px;
    color: #6d7279;
    font-size: 8px;
}

/* Detail */
.detail-shell {
    overflow: visible;
    background: #fff;
}

.detail-header {
    position: relative;
    display: grid;
    grid-template-columns: 56px 1fr 112px;
    align-items: center;
    height: calc(73px + env(safe-area-inset-top));
    padding-top: env(safe-area-inset-top);
    border-bottom: 1px solid #f2f2f3;
    background: #fff;
}

.detail-header h1 {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    font-size: clamp(17px, 5.2vw, 25px);
    line-height: 1;
    font-weight: 500;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-button {
    display: grid;
    width: 56px;
    height: 100%;
    place-items: center;
}

.home-button svg {
    width: 25px;
    height: 25px;
}

.detail-capsule {
    position: relative;
    top: auto;
    right: auto;
    width: 104px;
    margin-left: 0;
    border-color: #e5e6e8;
    background: #fff;
    backdrop-filter: none;
}

.detail-capsule button {
    color: #202328;
}

.detail-capsule > span {
    background: #ececee;
}

.detail-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 66px;
    border-bottom: 1px solid #eceef0;
    background: #fff;
}

.detail-tabs button {
    position: relative;
    color: #7d7f83;
    font-size: 18px;
    background: transparent;
}

.detail-tabs button::after {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 34px;
    height: 3px;
    border-radius: 2px 2px 0 0;
    content: "";
    opacity: 0;
    background: var(--blue);
    transform: translateX(-50%);
}

.detail-tabs button.is-active {
    color: #487ca8;
}

.detail-tabs button.is-active::after {
    opacity: 1;
}

.detail-tabs button:focus-visible {
    box-shadow: none;
    background: #f8fbfd;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

.artwork-figure {
    padding: 16px 14px 18px;
    margin: 0;
    border-bottom: 10px solid #f7f7f8;
    background: #fff;
}

.artwork-open {
    display: grid;
    width: 100%;
    height: clamp(340px, 108vw, 500px);
    overflow: hidden;
    padding: 0;
    place-items: center;
    background: #ececea;
}

.artwork-open img {
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    max-height: 100%;
    object-fit: contain;
    object-position: center;
}

.artwork-figure figcaption {
    padding-top: 14px;
    color: #a7a7aa;
    font-size: 14px;
    text-align: center;
}

.record-card {
    background: var(--blush);
}

.record-heading {
    padding: 22px 16px 13px;
    border-bottom: 1px solid #f4eeee;
    background: #fff;
}

.record-heading h2 {
    margin: 0 0 5px;
    font-size: 23px;
    line-height: 1.2;
    font-weight: 500;
}

.record-heading p {
    display: inline-flex;
    align-items: center;
    min-height: 23px;
    padding: 0 8px;
    margin: 0;
    border: 1px solid #d8d8d8;
    color: #999;
    font-size: 13px;
}

.certificate-number {
    display: flex;
    align-items: center;
    min-height: 60px;
    padding: 0 16px;
    color: #505257;
    font-size: 16px;
    background: #fffafa;
}

.certificate-number button {
    display: grid;
    width: 34px;
    height: 34px;
    margin-left: 2px;
    place-items: center;
    color: #5c77a5;
    background: transparent;
}

.certificate-number button svg {
    width: 16px;
    height: 16px;
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 0 15px 15px;
    margin: 0;
    background: #fffafa;
}

.facts-grid div {
    position: relative;
    min-width: 0;
    padding: 10px 4px 11px;
    text-align: center;
}

.facts-grid div::after {
    position: absolute;
    right: 8px;
    bottom: 0;
    left: 8px;
    height: 1px;
    content: "";
    background: #e5e1e1;
}

.facts-grid dt {
    overflow: hidden;
    color: #414348;
    font-size: 16px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.facts-grid dd {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin: 4px 0 0;
    color: #9b9b9e;
    font-size: 12px;
}

.facts-grid dd svg {
    width: 13px;
    height: 13px;
}

.record-section {
    padding-top: 22px;
}

.record-section h3,
.evidence-title h3,
.certificate-title h3 {
    display: flex;
    align-items: center;
    height: 26px;
    margin: 0 16px 11px;
    font-size: 18px;
    font-weight: 500;
}

.record-section h3 > span,
.evidence-title h3 > span,
.certificate-title h3 > span {
    height: 18px;
    margin-right: 9px;
}

.evidence-title,
.certificate-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.evidence-title h3,
.certificate-title h3 {
    margin-bottom: 3px;
}

.evidence-title button {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 4px 13px;
    color: #8a8b8e;
    font-size: 16px;
    background: transparent;
}

.evidence-title button svg {
    width: 19px;
    height: 19px;
}

.evidence-section > p {
    margin: 0 16px;
    color: #9a9b9f;
    font-size: 12px;
}

.evidence-hash {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 9px;
    min-height: 86px;
    padding: 14px 12px 14px 16px;
    margin-top: 5px;
    background: transparent;
}

.hash-icon {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border: 1px solid rgb(57 123 187 / 20%);
    border-radius: 50%;
    color: var(--blue);
    background: rgb(57 123 187 / 7%);
}

.hash-icon svg {
    width: 20px;
    height: 20px;
}

.hash-content {
    min-width: 0;
}

.hash-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.hash-meta > span {
    color: #55585d;
    font-size: 13px;
}

.hash-meta small {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: #4781ae;
    font-size: 9px;
}

.hash-meta small svg {
    width: 11px;
    height: 11px;
}

.evidence-hash code {
    display: block;
    overflow-wrap: anywhere;
    color: #7c8086;
    font-family: Consolas, "SFMono-Regular", monospace;
    font-size: 11px;
    line-height: 1.55;
}

.evidence-hash button {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: var(--blue);
    background: transparent;
}

.evidence-hash button svg {
    width: 18px;
    height: 18px;
}

.certificate-title strong {
    padding-right: 16px;
    color: #03a873;
    font-size: 17px;
    font-weight: 500;
}

.certificate-paper {
    width: calc(100% - 78px);
    margin: 18px auto 0;
    padding: 11px;
    border: 3px solid #64b8c9;
    background-color: #fefef9;
    background-image:
        linear-gradient(45deg, transparent 45%, #a9d9df 45%, #a9d9df 55%, transparent 55%),
        linear-gradient(-45deg, transparent 45%, #b5dfe5 45%, #b5dfe5 55%, transparent 55%);
    background-size: 11px 11px;
    box-shadow: 0 2px 12px rgb(52 87 103 / 10%);
}

.certificate-uploaded-open {
    display: block;
    width: calc(100% - 78px);
    padding: 0;
    margin: 18px auto 0;
    background: transparent;
}

.certificate-uploaded {
    width: 100%;
    height: auto;
    border: 1px solid #d7dadd;
    object-fit: contain;
    box-shadow: 0 2px 12px rgb(52 87 103 / 10%);
}

.certificate-inner {
    position: relative;
    min-height: 530px;
    overflow: hidden;
    padding: 21px 18px 18px;
    border: 2px solid #2babc3;
    outline: 1px solid #c89b48;
    outline-offset: -6px;
    background: rgb(255 255 250 / 97%);
}

.certificate-watermark {
    position: absolute;
    z-index: 0;
    top: 47%;
    left: 50%;
    color: rgb(29 91 135 / 7%);
    font-size: 46px;
    font-weight: 800;
    white-space: nowrap;
    transform: translate(-50%, -50%) rotate(-26deg);
}

.certificate-logo {
    display: grid;
    width: 34px;
    height: 34px;
    margin: 0 auto 5px;
    place-items: center;
    border: 2px solid #245ea2;
    border-radius: 50%;
    color: #245ea2;
    box-shadow: inset 0 0 0 2px #eac94d;
}

.certificate-logo svg {
    width: 19px;
    height: 19px;
}

.certificate-inner h4 {
    position: relative;
    z-index: 1;
    margin: 0;
    color: #0f4c96;
    font-family: "STKaiti", "KaiTi", serif;
    font-size: clamp(22px, 6vw, 30px);
    text-align: center;
}

.certificate-code {
    margin: 7px 0 16px;
    color: #667077;
    font-size: 9px;
    text-align: right;
}

.certificate-media {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.45fr .55fr .75fr;
    gap: 11px;
    align-items: end;
    width: 83%;
    margin: 0 auto 14px;
}

.certificate-media > img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
}

.demo-code,
.fake-qr {
    display: grid;
    aspect-ratio: 1;
    place-items: center;
    border: 5px dotted #222;
    color: #222;
    font-size: 8px;
    font-weight: 800;
    background: #fff;
}

.demo-code > img,
.fake-qr > img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    object-fit: contain;
    background: #fff;
}

.demo-code span,
.fake-qr {
    padding: 3px;
    background: #fff;
}

.detail-shot {
    overflow: hidden;
    aspect-ratio: 1;
}

.detail-shot img {
    width: 190%;
    max-width: none;
    height: 190%;
    object-fit: cover;
    transform: translate(-38%, -22%);
}

.certificate-lines {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 8px;
}

.certificate-lines > div {
    display: grid;
    grid-template-columns: 58px 1fr 58px 1.35fr;
    min-height: 28px;
    align-items: center;
    border-bottom: 1px solid #9ba5a8;
}

.certificate-lines dt {
    color: #3f5d72;
    font-weight: 700;
}

.certificate-lines dd {
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #666;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.certificate-foot {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.fake-qr {
    width: 52px;
    flex: 0 0 52px;
    font-size: 6px;
}

.certificate-foot p {
    margin: 0;
    color: #4c5960;
    font-size: 8px;
    line-height: 1.8;
}

.certificate-kind {
    padding: 15px 0 27px;
    margin: 0;
    color: #36393d;
    font-size: 18px;
    text-align: center;
}

.feature-panel {
    min-height: calc(100vh - 139px);
    padding: 0;
    background: #f6f7f8;
}

.feature-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 62px;
    padding: 0 16px;
    border-bottom: 10px solid #f6f7f8;
    color: #3f4247;
    font-size: 17px;
    background: #fff;
}

.feature-status strong {
    color: var(--green);
    font-size: 17px;
    font-weight: 500;
}

.feature-gallery {
    display: grid;
    gap: 10px;
}

.feature-gallery figure {
    padding: 18px 16px 22px;
    margin: 0;
    background: #fff;
}

.feature-gallery figcaption {
    margin-bottom: 17px;
    color: #484b50;
    font-size: 17px;
}

.feature-gallery button {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    padding: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #eef0ef;
}

.feature-gallery img {
    width: 100%;
    height: 100%;
    min-height: 0;
    max-height: 100%;
    object-fit: cover;
}

.feature-gallery-empty {
    display: grid;
    min-height: 230px;
    justify-items: center;
    align-content: center;
    color: #a0a4a8;
    background: #fff;
}

.feature-gallery-empty svg {
    width: 34px;
    height: 34px;
    margin-bottom: 10px;
    color: #b5c0c8;
}

.lightbox {
    width: min(92vw, 680px);
    max-height: 92vh;
    padding: 0;
    border: 0;
    border-radius: 8px;
    overflow: visible;
    background: transparent;
}

.lightbox::backdrop {
    background: rgb(0 0 0 / 84%);
}

.lightbox img {
    width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    z-index: 2;
    top: -42px;
    right: 0;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgb(255 255 255 / 15%);
}

.lightbox-close svg {
    width: 22px;
    height: 22px;
}

.toast {
    position: fixed;
    z-index: 50;
    left: 50%;
    bottom: calc(28px + env(safe-area-inset-bottom));
    max-width: calc(100vw - 40px);
    padding: 10px 16px;
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    background: rgb(27 30 34 / 88%);
    transform: translate(-50%, 12px);
    transition: opacity .18s ease, transform .18s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

@media (max-width: 390px) {
    .feature-grid {
        gap: 10px;
    }

    .feature-grid .feature-card {
        padding: 16px 14px;
    }

    .feature-grid .feature-copy strong {
        font-size: 22px;
    }

    .feature-grid .feature-card > svg {
        width: 34px;
        height: 34px;
    }

    .brand-lockup {
        gap: 12px;
    }

    .brand-logo {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .certificate-paper {
        width: calc(100% - 42px);
    }

    .certificate-uploaded-open {
        width: calc(100% - 42px);
    }

    .certificate-inner {
        min-height: 500px;
        padding-right: 14px;
        padding-left: 14px;
    }

    .certificate-lines > div {
        grid-template-columns: 50px 1fr 50px 1.25fr;
    }
}

@media (min-width: 760px) {
    body {
        padding: 28px 0;
    }

    .app-shell {
        min-height: calc(100vh - 56px);
        border-radius: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
