* {
    box-sizing: border-box
}

:root {
    color-scheme: light;
    --ink: #493b32;
    --muted: #716256;
    --accent: #915138;
    --paper: #fffdf8;
    --line: #e8d8c5
}

body {
    margin: 0;
    font-family: "Yu Gothic", "Meiryo", sans-serif;
    color: var(--ink);
    background: #f7efdf
}

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

button {
    font: inherit;
    cursor: pointer
}

.diagnosis {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    overflow: hidden;
    background: radial-gradient(circle at 0 0, #e8efd9 0, transparent 45%), radial-gradient(circle at 100% 100%, #f5ddc0 0, transparent 45%)
}

.background-paw {
    position: absolute;
    top: 8%;
    right: 7%;
    font-size: 100px;
    opacity: .08;
    transform: rotate(20deg);
    pointer-events: none
}

.start-screen {
    position: relative;
    width: 100%;
    max-width: 580px;
    padding: 40px 36px;
    background: var(--paper);
    border: 1px solid #fff;
    border-radius: 30px;
    box-shadow: 0 16px 50px #705b3420;
    text-align: center
}

.eyebrow {
    font-size: 11px;
    letter-spacing: .18em;
    color: var(--accent);
    font-weight: 700;
    margin: 0 0 20px
}

.dog-visual {
    display: block;
    width: 156px;
    height: 140px;
    margin: 0 auto 12px
}

h1,
h2 {
    line-height: 1.55;
    margin: 0;
    font-weight: 700;
    overflow-wrap: anywhere
}

h1 {
    font-size: 32px
}

h1 span {
    display: block;
    font-size: 22px;
    font-weight: 500;
    margin-bottom: 4px
}

.description {
    font-size: 15px;
    line-height: 1.95;
    color: var(--muted);
    margin: 20px 0 26px
}

.primary,
.secondary {
    display: block;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 16px 20px;
    border-radius: 16px;
    min-height: 52px;
    line-height: 1.6
}

.primary {
    border: 1px solid var(--accent);
    background: var(--accent);
    color: white;
    font-weight: 700
}

.secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--line);
    margin-top: 12px
}

.primary:hover {
    background: #77432f
}

.secondary:hover,
.answer-button:hover {
    background: #f5ebdf
}

.note {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.8;
    margin: 20px 0 0
}

.footer {
    font-size: 12px;
    color: #716256;
    margin: 20px 0 0
}

.question-progress {
    margin: 0 0 26px
}

.question-progress__label {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px
}

.question-progress__track {
    height: 8px;
    background: #eee6d8;
    border-radius: 20px;
    overflow: hidden
}

.question-progress__fill {
    height: 100%;
    background: #8c9b71;
    border-radius: 20px
}

.question-icon {
    font-size: 28px;
    margin-bottom: 10px
}

h2 {
    font-size: 24px
}

.question-help {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.7;
    margin: 12px 0 22px
}

.answer-list {
    display: grid;
    gap: 12px
}

.answer-button {
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    padding: 15px 16px;
    min-height: 58px;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    font-size: 15px;
    line-height: 1.6
}

.answer-letter {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    background: #f5efe4;
    border-radius: 50%;
    font-size: 12px;
    color: var(--accent)
}

.back-button {
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: underline;
    text-underline-offset: 4px;
    margin-top: 20px;
    padding: 10px;
    font-size: 13px
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid #526c46;
    outline-offset: 4px
}

h2:focus,
h1:focus {
    outline: none
}

.result-icon {
    width: 80px;
    height: 80px;
    background: #f3e6d5;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin: 0 auto 16px;
    font-size: 36px
}

.result-label {
    font-size: 13px;
    color: var(--muted)
}

.result-title {
    font-size: 28px;
    color: var(--accent);
    margin: 10px 0 18px
}

.result-message {
    text-align: left;
    line-height: 1.95;
    font-size: 15px;
    margin: 0 0 20px
}

.tip {
    background: #edf1e5;
    border-radius: 16px;
    padding: 20px;
    text-align: left;
    margin: 0 0 24px
}

.tip h3 {
    font-size: 14px;
    margin: 0 0 10px;
    color: #4e6340
}

.tip p {
    font-size: 14px;
    line-height: 1.85;
    margin: 0
}

.status {
    font-size: 13px;
    line-height: 1.7;
    color: var(--muted);
    min-height: 1.7em
}

@media(max-width:600px) {
    .diagnosis {
        padding: 24px 16px
    }

    .start-screen {
        padding: 30px 22px;
        border-radius: 24px
    }

    h1 {
        font-size: 27px
    }

    h1 span {
        font-size: 20px
    }

    h2 {
        font-size: 22px
    }

    .result-title {
        font-size: 25px
    }

    .dog-visual {
        width: 140px;
        height: 125px
    }

    .answer-button {
        font-size: 14px;
        padding: 14px 12px
    }

    .background-paw {
        font-size: 65px
    }
}

@media(prefers-reduced-motion:reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        scroll-behavior: auto !important
    }
}

/* 結果は段落と余白で、ゆったり読めるように */
.result-screen {
    padding-top: 44px;
    padding-bottom: 44px
}

.result-screen .question-progress {
    margin-bottom: 34px
}

.result-screen .eyebrow {
    margin-bottom: 26px
}

.result-icon {
    margin-bottom: 22px
}

.result-title {
    margin: 12px 0 24px
}

.result-lead {
    font-weight: 700;
    line-height: 1.8;
    margin: 0 0 30px
}

.result-message {
    max-width: 440px;
    margin: 0 auto 32px;
    line-height: 2.05
}

.result-message p {
    margin: 0 0 20px
}

.result-message p:last-child {
    margin-bottom: 0
}

.tip {
    max-width: 440px;
    margin: 0 auto 32px;
    padding: 24px
}

.tip h3 {
    margin-bottom: 14px
}

.tip p {
    line-height: 1.95
}

.status:empty {
    display: none
}

.status {
    margin: 14px 0
}

.result-screen .secondary {
    margin-top: 18px
}

.result-screen .note {
    margin-top: 28px
}

/* 色とりどりの風船が、下からふわりと上がる */
.balloon-layer {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 20
}

.balloon {
    position: absolute;
    bottom: -180px;
    left: var(--left);
    width: 46px;
    height: 58px;
    border-radius: 50% 50% 47% 47%;
    background: radial-gradient(ellipse at 30% 25%, #ffffff90 0, transparent 45%), var(--balloon-color);
    opacity: 0;
    animation: balloon-rise 6s var(--delay)  linear forwards
}

.balloon::before {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 19px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 7px solid var(--balloon-color)
}

.balloon::after {
    content: "";
    position: absolute;
    top: 64px;
    left: 23px;
    width: 12px;
    height: 65px;
    border-left: 1px solid #927e6870;
    border-radius: 50%
}

@keyframes balloon-rise {
    0% {
        transform: translate(0, 0) rotate(-6deg);
        opacity: 0
    }

    12% {
        opacity: .8
    }

    50% {
        transform: translate(var(--drift), -55vh) rotate(7deg);
        opacity: .8
    }

    100% {
        transform: translate(0, calc(-100vh - 240px)) rotate(-5deg);
        opacity: 0
    }
}

@media(max-width:600px) {
    .result-screen {
        padding: 32px 24px
    }

    .result-message {
        font-size: 15px
    }

    .result-lead {
        font-size: 15px
    }

    .tip {
        padding: 20px
    }

    .balloon {
        width: 34px;
        height: 44px
    }

    .balloon::before {
        left: 13px
    }

    .balloon::after {
        left: 17px;
        top: 50px
    }
}

@media(prefers-reduced-motion:reduce) {
    .balloon-layer {
        display: none
    }
}
/* 診断スタート画面の注意書きの余白 */
.start-screen .note strong {
  display: inline-block;
  margin-bottom: 8px;
}
/* スマホ版：質問タイトルの文字サイズを調整 */
@media (max-width: 600px) {
  .question-icon + h2 {
    font-size: 20px;
  }
}