:root {
    color-scheme: light;
    --page: #ededed;
    --panel: #ffffff;
    --hairline: #e8e8e8;
    --text: #1f2429;
    --muted: #9b9fa5;
    --link: #5f6f89;
    --button: #07c160;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
    min-width: 320px;
}

button,
input,
textarea {
    font: inherit;
}

.app {
    min-height: 100vh;
    max-width: 520px;
    margin: 0 auto;
    background: var(--page);
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.result.active {
    display: flex;
}

.section-title {
    padding: 14px 20px 8px;
    color: #898d92;
    font-size: 15px;
}

.list {
    background: var(--panel);
}

.list-button {
    width: 100%;
    min-height: 66px;
    border: 0;
    border-bottom: 1px solid var(--hairline);
    background: var(--panel);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px;
    color: var(--text);
    text-align: left;
}

.list-button span:first-child {
    flex: 1;
    min-width: 0;
    font-size: 18px;
    line-height: 1.35;
}

.chevron {
    width: 13px;
    height: 13px;
    border-top: 2px solid #b5b5b5;
    border-right: 2px solid #b5b5b5;
    flex: 0 0 auto;
    transform: rotate(45deg);
}

.notice {
    min-height: 120px;
    display: flex;
    justify-content: center;
    padding-top: 28px;
}

.notice button {
    border: 0;
    background: transparent;
    color: var(--link);
    font-size: 16px;
}

.report-form {
    background: var(--panel);
}

.report-form input[type="tel"],
.report-form textarea {
    width: 100%;
    border: 0;
    outline: 0;
    color: var(--text);
    background: var(--panel);
    font-size: 16px;
}

.report-form input[type="tel"] {
    height: 64px;
    padding: 0 20px;
    border-bottom: 1px solid #f0f0f0;
}

.field-tip {
    margin: 0;
    padding: 8px 20px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #e15f4f;
    font-size: 14px;
    line-height: 1.4;
}

.text-wrap {
    display: block;
    position: relative;
    height: 170px;
    border-bottom: 1px solid #f0f0f0;
}

.text-wrap textarea {
    height: 100%;
    padding: 22px 20px 46px;
    line-height: 1.5;
    resize: none;
}

.text-wrap span {
    position: absolute;
    right: 20px;
    bottom: 16px;
    color: var(--muted);
    font-size: 15px;
}

.report-form ::placeholder {
    color: #c2c5c8;
}

.media-head {
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}

.media-head strong {
    font-size: 17px;
    font-weight: 500;
}

.media-head span {
    color: var(--muted);
    font-size: 16px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 0 20px 28px;
}

.upload-tile,
.preview-tile {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 2px;
    background: #f3f3f3;
}

.upload-tile input {
    display: none;
}

.upload-tile span::before,
.upload-tile span::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 40%;
    height: 2px;
    background: #a7a7a7;
    transform: translate(-50%, -50%);
}

.upload-tile span::after {
    transform: translate(-50%, -50%) rotate(90deg);
}

.preview-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.preview-tile button {
    position: absolute;
    right: 4px;
    top: 4px;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .55);
    line-height: 24px;
    padding: 0;
}

.form-footer {
    min-height: calc(160px + env(safe-area-inset-bottom));
    padding: 42px 20px env(safe-area-inset-bottom);
    background: var(--page);
    border-top: 1px solid #e9e9e9;
    text-align: center;
}

.form-footer button,
.result button,
.unavailable-content button {
    width: min(260px, 78vw);
    height: 50px;
    border: 0;
    border-radius: 4px;
    background: var(--button);
    color: #fff;
    font-size: 16px;
}

.result button {
    position: fixed;
    left: 50%;
    bottom: calc(70px + env(safe-area-inset-bottom));
    transform: translateX(-50%);
    font-size: 19px;
    font-weight: 700;
}

.unavailable-page {
    min-height: 100vh;
    background: var(--page);
}

.unavailable-content {
    padding: 118px 40px 40px;
    text-align: center;
}

.unavailable-icon {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 44px;
    border-radius: 50%;
    background: #d9dde2;
}

.unavailable-icon::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 35px;
    width: 28px;
    height: 16px;
    border: 5px solid #fff;
    border-right: 0;
    border-radius: 18px 0 0 18px;
    transform: rotate(-28deg);
}

.unavailable-icon::after {
    content: "";
    position: absolute;
    right: 20px;
    top: 35px;
    width: 28px;
    height: 16px;
    border: 5px solid #fff;
    border-left: 0;
    border-radius: 0 18px 18px 0;
    transform: rotate(-28deg);
}

.unavailable-icon span::before,
.unavailable-icon span::after {
    content: "";
    position: absolute;
    left: 42px;
    top: 28px;
    width: 5px;
    height: 13px;
    border-radius: 999px;
    background: #fff;
}

.unavailable-icon span::before {
    transform: rotate(18deg);
}

.unavailable-icon span::after {
    top: 48px;
    transform: rotate(18deg);
}

.unavailable-content h1 {
    margin: 0 0 22px;
    color: #111;
    font-size: 26px;
    line-height: 1.3;
}

.unavailable-content p {
    margin: 0 auto 72px;
    color: #555f69;
    font-size: 17px;
    line-height: 1.7;
}

.form-footer button:disabled {
    background: #f7f7f7;
    color: #cfcfcf;
}

.result {
    min-height: 100vh;
    padding: clamp(56px, 8vh, 96px) clamp(28px, 7vw, 56px) calc(132px + env(safe-area-inset-bottom));
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    background: var(--page);
}

.result-mark {
    width: clamp(76px, 18vw, 112px);
    height: clamp(76px, 18vw, 112px);
    margin: 0 auto clamp(54px, 8vh, 86px);
    border-radius: 50%;
    background: var(--button);
    color: #fff;
    font-size: clamp(48px, 12vw, 72px);
    font-weight: 700;
    line-height: clamp(76px, 18vw, 112px);
}

.result h1 {
    margin: 0 0 clamp(26px, 4vh, 40px);
    color: #111;
    font-size: clamp(26px, 7vw, 38px);
    font-weight: 700;
    line-height: 1.25;
}

.result p {
    max-width: 420px;
    margin: 0 auto;
    color: #25282c;
    font-size: clamp(16px, 4.2vw, 23px);
    line-height: 1.75;
}

.toast {
    position: fixed;
    left: 50%;
    bottom: calc(46px + env(safe-area-inset-bottom));
    z-index: 20;
    max-width: min(320px, 82vw);
    padding: 11px 16px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: 15px;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 10px);
    transition: .18s ease;
}

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

.notice-page {
    min-height: 100vh;
    background: var(--page);
}

.notice-content {
    padding: 18px 24px 36px;
    background: var(--panel);
}

.notice-content h1 {
    margin: 0 0 18px;
    color: #111;
    font-size: 21px;
    line-height: 1.3;
}

.notice-content p {
    margin: 0 0 12px;
    color: #4f5b66;
    font-size: 15px;
    line-height: 1.6;
}

.notice-block {
    padding: 18px 0;
    border-top: 1px solid #f0f0f0;
}

.notice-block h2 {
    margin: 0 0 10px;
    color: #111;
    font-size: 17px;
    line-height: 1.4;
}

.notice-block p {
    color: #3f4852;
}

@media (min-width: 521px) {
    body {
        background: #dfe1e4;
    }

    .app {
        box-shadow: 0 0 0 1px rgba(0, 0, 0, .05);
    }
}
