:root {
    --ink: #17352d;
    --green: #244f42;
    --paper: #f7f3e8;
    --cream: #f7f5ef;
    --ochre: #cb9b4a;
    --muted: #72766d;
    --line: #d9d3c5
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--cream);
    font-family: "Noto Sans SC", sans-serif;
    overflow-x: hidden
}

.view {
    display: none;
    min-height: 100vh
}

.view.active {
    display: block
}

.topbar,
.desk-nav,
.result-nav {
    height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(24px, 5vw, 84px);
    position: relative;
    z-index: 8
}

.topbar p,
.desk-nav p {
    font-size: 13px;
    letter-spacing: .12em;
    color: #667269
}

.brand {
    font-family: "Noto Serif SC", serif;
    color: var(--ink);
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    letter-spacing: -.12em
}

.brand span {
    color: var(--ochre)
}

button {
    font: inherit;
    cursor: pointer;
    border: 0
}

.text-button {
    background: none;
    color: var(--green);
    font-size: 13px;
    border-bottom: 1px solid #b5b6a9;
    padding: 5px 0
}

.hero-copy {
    position: absolute;
    left: clamp(24px, 9vw, 150px);
    top: clamp(70px, 9vh, 110px);
    z-index: 5;
    pointer-events: none
}

.eyebrow,
.paper-kicker {
    font-family: "DM Mono", monospace;
    font-size: 11px;
    letter-spacing: .14em;
    color: #9a7b42;
    margin: 0 0 14px
}

.hero-copy h1 {
    font: 600 clamp(28px, 3.4vw, 52px)/1.22 "Noto Serif SC", serif;
    letter-spacing: -.07em;
    margin: 0
}

.hero-copy h1 span {
    color: #b07e30
}

.hero-description {
    color: #5f6d64;
    font-size: 14px;
    line-height: 1.8;
    margin-top: 25px
}

.scene-viewport {
    height: 100vh;
    min-height: 650px;
    overflow: hidden;
    perspective: 1100px;
    position: relative;
    background: radial-gradient(circle at 54% 34%, #fffdf3 0, #f2ecda 44%, #e4ddc9 100%);
    touch-action: none;
    cursor: grab
}

.scene-viewport:focus {
    outline: 2px solid var(--ochre);
    outline-offset: -4px
}

.scene-viewport:active {
    cursor: grabbing
}

.scene {
    position: absolute;
    top: 49%;
    left: 55%;
    width: 780px;
    height: 560px;
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) rotateX(59deg) rotateZ(-10deg);
    transition: transform .12s ease-out
}

.floor {
    position: absolute;
    width: 780px;
    height: 560px;
    background: #d7c8aa;
    transform: translateZ(-4px);
    box-shadow: 0 28px 40px #9c907b80
}

.floor-lines {
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(90deg, transparent 0 88px, #baaa8b 90px 91px), repeating-linear-gradient(0deg, transparent 0 88px, #baaa8b 90px 91px);
    opacity: .55
}

.wall {
    position: absolute;
    background: #e9dfca
}

.wall-back {
    width: 780px;
    height: 300px;
    transform: rotateX(90deg) translateZ(-276px) translateY(-150px);
    transform-origin: bottom;
    box-shadow: inset 0 -7px #c9b899
}

.window {
    position: absolute;
    width: 188px;
    height: 130px;
    left: 75px;
    top: 76px;
    background: #a8cbcf;
    border: 9px solid #fff3da;
    overflow: hidden
}

.window:after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(140deg, transparent 44%, #ffffff55 45% 49%, transparent 50%)
}

.sun {
    position: absolute;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f6c75e;
    right: 22px;
    top: 16px
}

.window-bar {
    position: absolute;
    background: #fff3da;
    z-index: 2
}

.window-bar.v {
    width: 5px;
    height: 100%;
    left: 50%
}

.window-bar.h {
    height: 5px;
    width: 100%;
    top: 56%
}

.cloud {
    position: absolute;
    background: #fff;
    border-radius: 40px;
    width: 60px;
    height: 12px;
    opacity: .75
}

.cloud:before,
.cloud:after {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 50%
}

.cloud:before {
    width: 20px;
    height: 20px;
    left: 12px;
    top: -8px
}

.cloud:after {
    width: 25px;
    height: 25px;
    left: 28px;
    top: -12px
}

.c1 {
    left: 5px;
    top: 35px
}

.c2 {
    left: 92px;
    top: 88px;
    transform: scale(.65)
}

.wall-art {
    position: absolute;
    right: 118px;
    top: 96px;
    color: #66827a;
    font: 600 24px/1.3 "DM Mono";
    transform: rotate(-3deg)
}

.wall-art em {
    font-size: 17px
}

.plant {
    position: absolute;
    left: 620px;
    top: 280px;
    width: 100px;
    height: 150px;
    transform: translateZ(4px)
}

.pot {
    position: absolute;
    bottom: 0;
    left: 31px;
    width: 45px;
    height: 45px;
    background: #b76d40;
    clip-path: polygon(8% 0, 92% 0, 78% 100%, 22% 100%)
}

.leaves i {
    position: absolute;
    width: 25px;
    height: 90px;
    background: #48765b;
    border-radius: 100% 0 100% 0;
    transform-origin: bottom
}

.leaves i:nth-child(1) {
    left: 43px;
    top: 7px;
    transform: rotate(-40deg)
}

.leaves i:nth-child(2) {
    left: 54px;
    top: 4px;
    transform: rotate(23deg)
}

.leaves i:nth-child(3) {
    left: 36px;
    top: 28px;
    transform: rotate(-75deg)
}

.leaves i:nth-child(4) {
    left: 65px;
    top: 29px;
    transform: rotate(62deg)
}

.leaves i:nth-child(5) {
    left: 52px;
    top: 18px;
    transform: rotate(2deg)
}

.desk {
    position: absolute;
    width: 170px;
    height: 130px;
    transform-style: preserve-3d
}

.desk-back.one {
    left: 103px;
    top: 160px
}

.desk-back.two {
    left: 425px;
    top: 130px
}

.desk-top,
.desk-surface {
    position: absolute;
    background: #785237;
    box-shadow: inset 0 0 0 5px #5c3d2b, 0 10px 10px #63463366
}

.desk-top {
    inset: 0;
    height: 90px
}

.desk-top:after,
.desk-top:before {
    content: "";
    position: absolute;
    width: 10px;
    height: 55px;
    background: #5a3a27;
    bottom: -52px
}

.desk-top:before {
    left: 12px
}

.desk-top:after {
    right: 12px
}

.monitor {
    position: absolute;
    width: 48px;
    height: 32px;
    z-index: 2;
    top: 22px;
    left: 58px;
    background: #24443d;
    border: 4px solid #ded9c8
}

.monitor:after {
    content: "";
    position: absolute;
    width: 20px;
    height: 10px;
    border-bottom: 3px solid #45554d;
    left: 10px;
    bottom: -13px
}

.paper {
    position: absolute;
    width: 34px;
    height: 43px;
    background: #f5edda;
    left: 16px;
    top: 23px;
    transform: rotate(-10deg)
}

.cup {
    position: absolute;
    width: 17px;
    height: 18px;
    border-radius: 0 0 7px 7px;
    background: #d5a156;
    right: 19px;
    top: 25px
}

.chair {
    position: absolute;
    width: 65px;
    height: 54px;
    background: #a97d50;
    border-radius: 13px 13px 0 0;
    left: 53px;
    top: 81px;
    z-index: -1
}

.teacher {
    position: absolute;
    z-index: 2
}

.teacher-left {
    left: 159px;
    top: 239px
}

.teacher-right {
    left: 480px;
    top: 205px
}

.head {
    position: absolute;
    width: 28px;
    height: 30px;
    border-radius: 50%;
    background: #d38c61
}

.hair {
    position: absolute;
    width: 30px;
    height: 17px;
    border-radius: 50% 50% 25% 25%;
    background: #3a3127;
    top: -3px;
    left: -1px
}

.body {
    position: absolute;
    width: 53px;
    height: 55px;
    background: #73927c;
    border-radius: 17px 17px 0 0;
    top: 27px;
    left: -12px
}

.main-desk {
    position: absolute;
    width: 375px;
    height: 260px;
    left: 225px;
    top: 275px;
    transform-style: preserve-3d
}

.desk-surface {
    inset: 0;
    background: #8e6343
}

.desk-front {
    position: absolute;
    width: 375px;
    height: 76px;
    background: #6c482f;
    top: 237px;
    transform: rotateX(90deg);
    transform-origin: top
}

.desk-front:after,
.desk-front:before {
    content: "";
    position: absolute;
    width: 18px;
    height: 90px;
    background: #583a28;
    top: 6px
}

.desk-front:before {
    left: 14px
}

.desk-front:after {
    right: 14px
}

.desktop-monitor {
    position: absolute;
    width: 88px;
    height: 59px;
    background: #335a50;
    border: 6px solid #e4dfcd;
    left: 33px;
    top: 31px
}

.desktop-monitor i {
    position: absolute;
    background: #f2e4ba;
    width: 57px;
    height: 4px;
    left: 9px;
    top: 15px
}

.lamp {
    position: absolute;
    left: 264px;
    top: 22px;
    width: 44px;
    height: 73px;
    border-left: 4px solid #ae8b53;
    transform: rotate(20deg)
}

.lamp i {
    display: block;
    width: 41px;
    height: 24px;
    background: #c49c51;
    transform: translate(-23px, -9px) skew(-15deg)
}

.pencil-holder {
    position: absolute;
    left: 145px;
    top: 37px;
    width: 30px;
    height: 32px;
    background: #d7ad68;
    border-radius: 0 0 8px 8px
}

.pencil-holder i {
    position: absolute;
    width: 3px;
    height: 35px;
    background: #416759;
    bottom: 15px;
    left: 10px;
    transform: rotate(-16deg)
}

.pencil-holder i:nth-child(2) {
    left: 17px;
    transform: rotate(9deg);
    background: #a95842
}

.pencil-holder i:nth-child(3) {
    left: 23px;
    transform: rotate(22deg);
    background: #d8c65e
}

.work-papers i {
    position: absolute;
    width: 50px;
    height: 67px;
    background: #eee6d4;
    left: 196px;
    top: 125px;
    transform: rotate(-9deg);
    box-shadow: 2px 2px #c5b495
}

.work-papers i:nth-child(2) {
    left: 211px;
    top: 131px;
    transform: rotate(7deg)
}

.notebook {
    position: absolute;
    width: 95px;
    height: 124px;
    text-align: left;
    padding: 15px 12px;
    border-radius: 2px;
    box-shadow: 5px 8px 10px #3d251b66;
    transform: rotate(-5deg) translateZ(12px);
    transition: transform .25s, box-shadow .25s;
    color: #17352d
}

.notebook:hover,
.notebook:focus {
    transform: rotate(-5deg) translateZ(30px) scale(1.08);
    box-shadow: 8px 12px 15px #3d251b80;
    outline: 2px solid var(--ochre)
}

.lesson-book {
    background: #e8d8a8;
    left: 87px;
    top: 113px
}

.unit-book {
    background: #d1dfcf;
    left: 200px;
    top: 103px;
    transform: rotate(6deg) translateZ(14px)
}

.unit-book:hover,
.unit-book:focus {
    transform: rotate(6deg) translateZ(30px) scale(1.08)
}

.notebook:before {
    content: "";
    position: absolute;
    left: 7px;
    top: 0;
    height: 100%;
    border-left: 2px solid #ae8b53
}

.notebook span {
    display: block;
    font-size: 11px;
    color: #8a6b37;
    margin-bottom: 24px
}

.notebook b {
    display: block;
    font: 600 17px/1.35 "Noto Serif SC"
}

.notebook small {
    display: block;
    font-size: 9px;
    margin-top: 18px;
    color: #617267
}

.front-chair {
    position: absolute;
    width: 110px;
    height: 95px;
    left: 360px;
    top: 495px;
    z-index: 4
}

.front-chair div {
    height: 75px;
    background: #a97b55;
    border-radius: 24px 24px 0 0;
    box-shadow: 0 12px 10px #56443266
}

.scene-instruction {
    position: absolute;
    z-index: 6;
    bottom: 96px;
    left: clamp(24px, 9vw, 150px);
    font-size: 11px;
    color: #788079;
    display: flex;
    gap: 9px;
    align-items: center
}

.scene-instruction i {
    width: 30px;
    height: 1px;
    background: var(--ochre)
}

.home-footer {
    position: absolute;
    z-index: 7;
    bottom: 25px;
    left: clamp(24px, 5vw, 84px);
    right: clamp(24px, 5vw, 84px);
    display: flex;
    justify-content: space-between;
    color: #718076;
    font: 11px "DM Mono"
}

.home-footer p {
    font-family: "Noto Sans SC"
}

.desk-view {
    background: #d7c5a6;
    overflow: hidden
}

.desk-nav {
    background: #f7f3e8
}

.back-button {
    color: var(--green);
    background: none;
    font-size: 13px
}

.top-desk {
    height: calc(100vh - 78px);
    min-height: 670px;
    background: linear-gradient(130deg, #9b7655, #bc9369 50%, #79543e);
    position: relative;
    overflow: hidden
}

.table-edge {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 14vh;
    background: #573a29;
    box-shadow: 0 -11px 30px #35211566
}

.paper-form {
    position: absolute;
    width: min(640px, 70vw);
    left: 50%;
    top: 50%;
    transform: translate(-50%, -49%) rotate(-1deg);
    background: var(--paper);
    padding: clamp(30px, 5vw, 64px);
    box-shadow: 12px 18px 28px #3d281a80;
    z-index: 3
}

.paper-form:before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid #e4dbc6;
    pointer-events: none
}

.paper-form h2 {
    font: 600 clamp(26px, 3.1vw, 43px) "Noto Serif SC";
    letter-spacing: -.05em;
    margin: 0
}

.paper-hint {
    color: #657168;
    font-size: 13px;
    line-height: 1.8;
    margin: 15px 0 28px;
    max-width: 480px
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px
}

.field.full {
    grid-column: 1/-1
}

.field label {
    font-size: 12px;
    color: #53645a
}

.field label em {
    font-style: normal;
    color: #b07e30
}

.field input,
.field textarea {
    border: 1px solid #d8d0bd;
    background: #fffdf7;
    padding: 11px 12px;
    color: #243c34;
    font: 13px "Noto Sans SC";
    resize: vertical
}

.field textarea {
    min-height: 105px;
    line-height: 1.65
}

.field input:focus,
.field textarea:focus {
    outline: 2px solid #adc4b5;
    border-color: transparent
}

.form-actions {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
    gap: 12px
}

.primary {
    background: var(--green);
    color: #fffdf4;
    padding: 12px 18px;
    font-size: 13px;
    box-shadow: 3px 4px 0 #c5a26a;
    transition: transform .15s
}

.primary:hover {
    transform: translate(-1px, -1px)
}

.primary span {
    font-size: 18px;
    margin-left: 12px
}

.secondary {
    background: transparent;
    color: #5c6b61;
    padding: 11px
}

.teacher-view {
    position: absolute;
    width: 720px;
    height: 490px;
    left: 50%;
    bottom: -160px;
    transform: translateX(-50%);
    z-index: 4
}

.shoulder {
    position: absolute;
    bottom: 0;
    width: 380px;
    height: 400px;
    background: #365a50;
    border-radius: 55% 55% 0 0
}

.shoulder.left {
    left: -110px;
    transform: rotate(-24deg)
}

.shoulder.right {
    right: -110px;
    transform: rotate(24deg)
}

.hand {
    position: absolute;
    width: 110px;
    height: 180px;
    background: #d18d69;
    border-radius: 50px;
    z-index: 6;
    bottom: 180px
}

.hand.left {
    left: 84px;
    transform: rotate(-23deg)
}

.hand.right {
    right: 88px;
    transform: rotate(24deg)
}

.hand.right i {
    display: block;
    width: 8px;
    height: 102px;
    background: #17352d;
    margin: 18px 0 0 46px;
    transform: rotate(-35deg)
}

.desk-note {
    position: absolute;
    right: 7vw;
    bottom: 9vh;
    color: #f6eddd;
    z-index: 5;
    font: 500 18px/1.7 "Noto Serif SC"
}

.desk-note i {
    display: block;
    width: 55px;
    border-top: 1px solid #eed49e;
    margin: 20px 0
}

.desk-note span {
    font: 11px "Noto Sans SC";
    opacity: .76
}

.result-view {
    background: #e8dfcb
}

.result-nav {
    background: #f7f3e8
}

.delivery-scene {
    height: 205px;
    background: linear-gradient(180deg, #e9dfcc, #d5c09d);
    position: relative;
    overflow: hidden
}

.delivery-hand {
    position: absolute;
    width: 230px;
    height: 100px;
    background: #c6805d;
    right: 13%;
    bottom: -16px;
    border-radius: 80px 0 0 0;
    transform: rotate(-8deg)
}

.delivered-book {
    position: absolute;
    width: 185px;
    height: 110px;
    background: #e9d5a3;
    left: 50%;
    bottom: 6px;
    transform: translateX(-50%) perspective(300px) rotateX(43deg) rotateZ(-7deg);
    box-shadow: 6px 8px 10px #62452e66
}

.delivered-book:before {
    content: "";
    position: absolute;
    left: 50%;
    height: 100%;
    border-left: 3px solid #b38a48
}

.delivered-book i {
    position: absolute;
    width: 55px;
    border-top: 2px solid #79938a;
    left: 15px;
    top: 28px
}

.delivered-book i:nth-child(2) {
    top: 43px;
    width: 72px
}

.delivered-book i:nth-child(3) {
    top: 58px;
    width: 38px
}

.result-heading {
    text-align: center;
    margin: -5px auto 25px
}

.result-heading h2 {
    font: 600 clamp(28px, 3.5vw, 48px) "Noto Serif SC";
    margin: 0;
    letter-spacing: -.06em
}

.result-heading>p:last-child {
    font-size: 13px;
    color: #657168
}

.result-toolbar {
    max-width: 1130px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 22px 15px
}

.view-toggle {
    border: 1px solid #cfc3ac;
    padding: 3px
}

.view-toggle button {
    font-size: 12px;
    padding: 7px 10px;
    background: none;
    color: #68756d
}

.view-toggle .selected {
    background: #f8f2e6;
    color: #244f42
}

.icon-button {
    padding: 11px;
    background: none;
    color: #53645a;
    font-size: 12px
}

.primary.small {
    padding: 10px 13px;
    font-size: 12px
}

.result-pages {
    max-width: 1130px;
    margin: 0 auto 60px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    padding: 0 22px
}

.result-paper {
    background: #fffdf7;
    min-height: 590px;
    padding: 39px clamp(25px, 4vw, 54px);
    box-shadow: 4px 7px 15px #8d806b35
}

.result-paper h3 {
    font: 600 23px "Noto Serif SC";
    margin: 0 0 24px
}

.original {
    border-top: 5px solid #b5aa95
}

.revised {
    border-top: 5px solid var(--green)
}

.markdown {
    font-size: 13px;
    line-height: 1.9;
    color: #405047;
    white-space: pre-line
}

.markdown h4 {
    font: 600 15px "Noto Serif SC";
    color: var(--green);
    margin: 18px 0 4px
}

.review-note {
    font-size: 11px;
    line-height: 1.6;
    background: #edf3e9;
    color: #40604d;
    padding: 10px 12px;
    margin-bottom: 17px
}

.result-pages.single {
    grid-template-columns: minmax(0, 780px);
    justify-content: center
}

.result-pages.single .original {
    display: none
}

dialog {
    border: 0;
    max-width: 460px;
    background: #f8f4e9;
    color: var(--ink);
    padding: 42px;
    box-shadow: 10px 12px 35px #42362477
}

dialog::backdrop {
    background: #17352d88
}

dialog h2 {
    font: 600 28px "Noto Serif SC";
    margin: 0
}

dialog>p:last-child {
    font-size: 14px;
    line-height: 1.9;
    color: #526057
}

.close-dialog {
    position: absolute;
    right: 16px;
    top: 11px;
    background: none;
    font-size: 27px;
    color: var(--green)
}

@media(max-width:700px) {

    .topbar p,
    .desk-nav p,
    .desk-note {
        display: none
    }

    .hero-copy {
        top: 116px
    }

    .scene-viewport {
        min-height: 600px
    }

    .scene {
        transform: translate(-50%, -50%) scale(.75) rotateX(59deg) rotateZ(-10deg)
    }

    .scene-instruction {
        bottom: 68px
    }

    .home-footer {
        bottom: 12px
    }

    .paper-form {
        width: calc(100% - 28px);
        padding: 31px 25px;
        top: 46%
    }

    .form-grid {
        grid-template-columns: 1fr
    }

    .field.full {
        grid-column: auto
    }

    .top-desk {
        min-height: 720px
    }

    .teacher-view {
        transform: translateX(-50%) scale(.75);
        bottom: -190px
    }

    .result-pages {
        grid-template-columns: 1fr;
        padding: 0 13px
    }

    .result-toolbar {
        padding: 0 13px 15px
    }

    .delivery-scene {
        height: 160px
    }

    .result-paper {
        min-height: 0;
        padding: 31px 25px
    }

    .result-pages.single {
        grid-template-columns: 1fr
    }

    .delivery-hand {
        right: -80px
    }

    .result-heading {
        padding: 0 20px
    }

    .paper-form h2 {
        font-size: 28px
    }
}