/* Tutorial SPA styles */

:root {
    --light-green: rgb(204, 255, 211);
    --light-red: rgb(255, 204, 204);
    --light-yellow: rgb(255, 252, 204);
    --light-blue: rgb(204, 224, 255);
    --light-pink: rgb(255, 204, 234);
    --shadow: 0px 3px 5px #00000055;
    --border: 1px solid black;
    --border-radius: 5px;
    --green: #249528;
    --red: #932727;
    --amber: #A88F27;
    --screen-padding-x: 7vw;
    --screen-transition: 380ms cubic-bezier(0.22, 0.61, 0.36, 1);
    --light-purple: rgb(218, 207, 255);
    --screen-max-width: 430px;
    --shell-inline-pad: min(var(--screen-padding-x), 28px);
}

.light-green-bg {
    background-color: var(--light-green);
}

.light-red-bg {
    background-color: var(--light-red);
}

.light-yellow-bg {
    background-color: var(--light-yellow);
}

.light-blue-bg {
    background-color: var(--light-blue);
}

.light-pink-bg {
    background-color: var(--light-pink);
}

.light-purple-bg {
    background-color: var(--light-purple);
}

.green-bg {
    background-color: var(--green);
}

.gray-bg {
    background-color: gray;
}

.amber-bg {
    background-color: var(--amber);
}

.red-bg {
    background-color: var(--red);
}

html {
    font-size: clamp(14.5px, 3.72vw, 16px);
}

html,
body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: #fff;
    color: #111;
    font-family: 'Outfit', system-ui, sans-serif;
}

#demo-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 3px;
    background: #000;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 260ms ease;
}

p {
    margin: 5px 0;
}

h1,
h2,
h3 {
    margin: 0;
}

input,
textarea,
select,
.message-input,
.inline-select,
.inline-ghost-button,
.choose-date-button {
    font-family: 'Outfit', system-ui, sans-serif;
}

button {
    font-family: 'Faster One';
    font-size: clamp(1.15rem, 4.8vw, 1.35rem);
    padding: 15px 16px;
    border: 0;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    color: white;
    background-color: black;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    box-sizing: border-box;
    cursor: pointer;
}

button img {
    max-width: 20px;
}

.card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 9px 13px;
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    align-items: center;
    background: #fff;
}

.card-image {
    max-width: 68px;
    display: block;
}

.card-text-wrapper {
    font-size: 0.76rem;
}

.contact-name {
    font-weight: 600;
    font-size: 0.86rem;
}

.time-ago {
    font-weight: 600;
}

.tag-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
}

.tag {
    max-width: fit-content;
    padding: 2px 4px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.action-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 10px;
}

.instructions {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 20px;
}

.message-input {
    font-size: 1.02rem;
    width: 100%;
    height: 80px;
    padding: 10px;
    border: var(--border);
    border-radius: var(--border-radius);
    resize: none;
    box-shadow: var(--shadow);
    box-sizing: border-box;
    background: #fff;
    color: #111;
}

.tom-button img {
    width: 22px;
    max-width: 75px;
}

.is-send-button {
    background-color: var(--green);
}

.is-postpone-button {
    background-color: var(--amber);
}

.is-cancel-button {
    background-color: var(--red);
}

.is-action-ghost {
    opacity: 0.28;
    pointer-events: none;
}

.block {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.timeline-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.timeline-item {
    display: flex;
    flex-direction: row;
    align-items: start;
    gap: 5px;
}

.circle {
    margin-top: 8px;
    min-width: 15px;
    min-height: 15px;
    border-radius: 20px;
}

.inline-select {
    font-size: 1rem;
    font-weight: 500;
    padding: 20px 12px;
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: 100%;
    box-sizing: border-box;
    background-color: white;
}

.inline-ghost-button {
    font-size: 1.1rem;
    text-transform: none;
    padding: 15px;
    background: white;
    color: black;
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    flex: 1;
}

.choose-date-button {
    text-transform: none;
    font-size: 1rem;
    padding: 12px 14px;
    width: auto;
    background: white;
    color: black;
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    white-space: nowrap;
}

.choose-date-button img {
    width: 20px;
    max-width: 20px;
}

.tutorial-shell {
    height: 100%;
    width: min(100%, var(--screen-max-width));
    margin: 0 auto;
    position: relative;
    box-sizing: border-box;
}

.persistent-avatar-header {
    position: absolute;
    top: calc(env(safe-area-inset-top, 0px) + 16px);
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    padding-inline: var(--shell-inline-pad);
    padding-bottom: 4px;
    max-height: 220px;
    overflow: hidden;
    transition:
        max-height var(--screen-transition),
        padding var(--screen-transition),
        opacity var(--screen-transition);
}

.persistent-avatar-stage {
    width: 44vw;
    max-width: 180px;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition:
        width var(--screen-transition),
        max-width var(--screen-transition),
        transform var(--screen-transition),
        opacity var(--screen-transition);
}

body[data-current-screen="2"] .persistent-avatar-stage,
body[data-current-screen="3"] .persistent-avatar-stage,
body[data-current-screen="4"] .persistent-avatar-stage,
body[data-current-screen="5"] .persistent-avatar-stage,
body[data-current-screen="6"] .persistent-avatar-stage,
body[data-current-screen="7"] .persistent-avatar-stage,
body[data-current-screen="8"] .persistent-avatar-stage,
body[data-current-screen="9"] .persistent-avatar-stage,
body[data-current-screen="10"] .persistent-avatar-stage,
body[data-current-screen="11"] .persistent-avatar-stage,
body[data-current-screen="12"] .persistent-avatar-stage,
body[data-current-screen="13"] .persistent-avatar-stage {
    width: 48px;
    max-width: 48px;
}

body[data-current-screen="2"] .persistent-avatar-header,
body[data-current-screen="3"] .persistent-avatar-header,
body[data-current-screen="4"] .persistent-avatar-header,
body[data-current-screen="5"] .persistent-avatar-header,
body[data-current-screen="6"] .persistent-avatar-header,
body[data-current-screen="7"] .persistent-avatar-header,
body[data-current-screen="8"] .persistent-avatar-header,
body[data-current-screen="9"] .persistent-avatar-header,
body[data-current-screen="10"] .persistent-avatar-header,
body[data-current-screen="11"] .persistent-avatar-header,
body[data-current-screen="12"] .persistent-avatar-header,
body[data-current-screen="13"] .persistent-avatar-header {
    max-height: 70px;
}

body[data-current-screen="2"] .screen.is-active .screen-text-block,
body[data-current-screen="3"] .screen.is-active .screen-text-block,
body[data-current-screen="4"] .screen.is-active .screen-text-block,
body[data-current-screen="5"] .screen.is-active .screen-text-block,
body[data-current-screen="6"] .screen.is-active .screen-text-block,
body[data-current-screen="7"] .screen.is-active .screen-text-block,
body[data-current-screen="8"] .screen.is-active .screen-text-block,
body[data-current-screen="9"] .screen.is-active .screen-text-block,
body[data-current-screen="10"] .screen.is-active .screen-text-block,
body[data-current-screen="11"] .screen.is-active .screen-text-block {
    margin-top: 12px;
}


.screen-stack {
    position: absolute;
    inset: 0;
    overflow: hidden;
    background: #fff;
}

.screen {
    position: absolute;
    inset: 0;
    transform: translate3d(calc(100% + 2px), 0, 0);
    transition: transform var(--screen-transition);
    will-change: transform;
    background-color: #fff;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    pointer-events: none;
}

.screen.is-prev {
    transform: translate3d(calc(-100% - 2px), 0, 0);
}

.screen.is-active {
    transform: translate3d(0, 0, 0);
    pointer-events: auto;
}

.screen-inner {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-inline: var(--shell-inline-pad);
    padding-top: calc(env(safe-area-inset-top, 0px) + 66px);
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    box-sizing: border-box;
}

.screen[data-screen="1"] .screen-inner {
    padding-top: calc(env(safe-area-inset-top, 0px) + 200px);
}

.screen-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    width: 100%;
}

.screen-footer {
    margin-top: auto;
    padding-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.screen-footer-inline {
    margin-top: 0;
}

.screen-cta {
    width: 100%;
}

.screen-text-block {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 2px;
}

.screen[data-screen="1"] .screen-text-block {
    margin-top: 2vh;
}

.screen-title {
    margin: 0;
    font-weight: 700;
    font-size: clamp(2.0rem, 8.1vw, 2.6rem);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.screen-subtitle {
    margin: 0;
    color: #111;
    font-size: 1.07rem;
    line-height: 1.32;
}

.tutorial-card-wrapper {
    width: 100%;
}

.tutorial-card-wrapper .card {
    gap: 12px;
    padding: 7px 14px;
}

.tutorial-card-wrapper .card-image {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
}

.tutorial-card-wrapper .card-text-wrapper {
    font-size: 0.88rem;
}

.tutorial-card-wrapper .card-text-wrapper p {
    margin: 2px 0;
}

.tutorial-card-wrapper .contact-name {
    font-size: 1rem;
}

.tutorial-card-wrapper .tag-wrapper {
    margin-top: 4px;
}

.tutorial-action-wrapper {
    gap: 10px;
}

.tutorial-action-wrapper .instructions {
    margin-bottom: 0;
}

.tutorial-action-wrapper .instructions-text {
    font-size: 1.1rem;
}

.tutorial-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.message-input {
    box-sizing: border-box;
    height: 68px;
    padding: 12px 14px;
    line-height: 1.32;
    color: #111;
    background: #fff;
}

.message-input[readonly] {
    background: #f4f4f4;
}

.screen[data-screen="2"] .screen-body {
    gap: 16px;
}

.screen[data-screen="2"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="2"] .screen-title {
    font-size: clamp(1.95rem, 7.5vw, 2.4rem);
}

.screen[data-screen="2"] .screen-footer {
    padding-top: 12px;
}

.screen[data-screen="2"] .screen-cta.is-sent-state {
    background-color: var(--green);
}

.tutorial-chat-intro {
    margin-top: 0;
}

.screen[data-screen="3"] .screen-body {
    gap: 16px;
}

.screen[data-screen="3"] .screen-title {
    font-size: clamp(2.0rem, 7.7vw, 2.45rem);
}

.screen[data-screen="4"] .screen-body {
    gap: 16px;
}

.screen[data-screen="4"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="4"] .screen-title {
    font-size: clamp(1.95rem, 7.5vw, 2.4rem);
}

.screen[data-screen="5"] .screen-body {
    gap: 16px;
}

.screen[data-screen="5"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="5"] .screen-title {
    font-size: clamp(2.0rem, 7.6vw, 2.42rem);
}

.screen[data-screen="6"] .screen-body {
    gap: 16px;
}

.screen[data-screen="6"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="6"] .screen-title {
    font-size: clamp(1.95rem, 7.5vw, 2.4rem);
}

.screen[data-screen="7"] .screen-body {
    gap: 16px;
}

.screen[data-screen="7"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="7"] .screen-title {
    font-size: clamp(2.0rem, 7.8vw, 2.45rem);
}

.screen[data-screen="8"] .screen-body {
    gap: 16px;
}

.screen[data-screen="8"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="8"] .screen-title {
    font-size: clamp(1.98rem, 7.6vw, 2.42rem);
}

.screen[data-screen="9"] .screen-body {
    gap: 16px;
}

.screen[data-screen="9"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="9"] .screen-title {
    font-size: clamp(1.98rem, 7.6vw, 2.42rem);
}

.screen[data-screen="10"] .screen-body {
    gap: 16px;
}

.screen[data-screen="10"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="10"] .screen-title {
    font-size: clamp(1.98rem, 7.6vw, 2.42rem);
}

.screen[data-screen="11"] .screen-body {
    gap: 16px;
}

.screen[data-screen="11"] .screen-text-block {
    margin-top: 0;
    gap: 10px;
}

.screen[data-screen="11"] .screen-title {
    font-size: clamp(2.0rem, 7.8vw, 2.48rem);
}

.tutorial-day-summary {
    gap: 10px;
}

.tutorial-day-summary .card {
    padding: 10px 12px;
}

.tutorial-day-summary .card-image {
    width: 56px;
    height: 56px;
}

.tutorial-day-summary .card-text-wrapper {
    font-size: 0.76rem;
}

.tutorial-sequence-block {
    gap: 10px;
    padding: 12px 14px;
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.tutorial-sequence-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.tutorial-sequence-timeline {
    gap: 10px;
}

.tutorial-sequence-timeline .timeline-item {
    gap: 8px;
}

.tutorial-sequence-timeline .circle {
    min-width: 12px;
    min-height: 12px;
    margin-top: 4px;
}

.tutorial-sequence-timeline .timeline-info-wrapper {
    font-size: 0.86rem;
}

.tutorial-sequence-timeline .timeline-text {
    margin: 0;
    line-height: 1.3;
}

.writing-style-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.writing-style-quote {
    margin: 0;
    display: block;
    font-size: 1.02rem;
    line-height: 1.28;
    font-weight: 400;
}

.writing-style-soft {
    font-weight: 400;
}

.distribution-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 12px 14px 14px;
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background: #fff;
}

.distribution-card-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.distribution-title,
.distribution-period {
    margin: 0;
}

.distribution-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.distribution-period {
    font-size: 0.84rem;
    color: #555;
}

.distribution-chart {
    display: flex;
    align-items: center;
    width: 100%;
}

.distribution-chart-image {
    display: block;
    width: 100%;
    height: auto;
}

.bar-green {
    background: var(--green);
}

.bar-amber {
    background: var(--amber);
}

.bar-red {
    background: var(--red);
}

.distribution-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    justify-content: center;
}

.distribution-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
}

.distribution-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.conversion-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 10px;
}

.conversion-chart-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}

.conversion-chart-title,
.conversion-chart-period {
    margin: 0;
}

.conversion-chart-title {
    font-size: 0.95rem;
    font-weight: 700;
}

.conversion-chart-period {
    font-size: 0.84rem;
    color: #555;
}

.conversion-chart-image {
    display: block;
    width: 100%;
    height: auto;
}

.conversion-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
}

.conversion-legend-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
}

.conversion-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    flex: 0 0 auto;
}

.tutorial-closing-intro {
    text-align: center;
}

.tutorial-contact-label {
    display: block;
    margin: 0;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.tutorial-contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.tutorial-contact-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tutorial-privacy-check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.tutorial-privacy-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #111;
}

.tutorial-privacy-link {
    color: inherit;
    text-decoration: underline;
}

.tutorial-contact-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    font-size: 1.05rem;
    font-weight: 600;
    border: var(--border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    background: #fff;
    color: #111;
}

.tutorial-postpone-intro {
    text-align: center;
}

.postpone-diagram-board {
    position: relative;
    left: 50%;
    width: min(100vw, calc(var(--screen-max-width) + (var(--shell-inline-pad) * 2)));
    max-width: min(100vw, calc(var(--screen-max-width) + (var(--shell-inline-pad) * 2)));
    transform: translateX(-50%);
}

.postpone-diagram-image {
    display: block;
    width: 100%;
    height: auto;
}

.postpone-diagram-labels-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding-inline: 6.65%;
    margin-top: 8px;
}

.postpone-diagram-label {
    text-align: center;
    color: #111;
}

.postpone-diagram-label p,
.postpone-diagram-label strong {
    margin: 0;
}

.postpone-diagram-label p {
    font-size: 0.82rem;
    line-height: 1.2;
}

.postpone-diagram-label strong {
    display: block;
    margin-top: 4px;
    font-size: 0.9rem;
    font-weight: 800;
}

.chat-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px;
    border: var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow);
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.18), transparent 28%),
        linear-gradient(145deg, #6c5ce7 0%, #3b82f6 100%);
}

.chat-bubble {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 82%;
    padding: 10px 12px 8px;
    border-radius: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.chat-bubble p,
.chat-bubble span {
    margin: 0;
}

.chat-bubble p {
    font-size: 1.02rem;
    line-height: 1.28;
}

.chat-bubble span {
    align-self: flex-end;
    font-size: 0.72rem;
    opacity: 0.72;
}

.chat-bubble-outgoing {
    align-self: flex-end;
    background: #dcf8c6;
    border-bottom-right-radius: 6px;
}

.chat-bubble-incoming {
    align-self: flex-start;
    background: #fff;
    border-bottom-left-radius: 6px;
}

.back-button {
    position: absolute;
    left: var(--shell-inline-pad);
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    background: #fff;
    color: inherit;
    margin-top: -5px;
    border: 1px solid #d0d0d0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: inherit;
    text-transform: none;
    pointer-events: auto;
    cursor: pointer;
    z-index: 10;
}

body[data-current-screen="1"] .back-button {
    display: none;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.is-typing::after {
    content: '|';
    font-weight: 300;
    margin-left: 1px;
    animation: blink-cursor 0.6s step-end infinite;
}
