:root {
  color-scheme: light;
  --paper: #fbf5e7;
  --paper-edge: #f2e7cf;
  --ink: #533d2d;
  --soft-ink: #806953;
  --honey: #d5a246;
  --red: #95493d;
  --sage: #7d8866;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --hand: "Segoe Print", "Bradley Hand", "Comic Sans MS", cursive;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 280px;
  min-height: 100svh;
  padding: clamp(22px, 4vw, 64px) 32px 20px;
  color: var(--ink);
  background:
    radial-gradient(ellipse at 15% 18%, #fff9e9b3, transparent 58%),
    radial-gradient(ellipse at 90% 92%, #c4ae8945, transparent 48%),
    #e9dfc9;
  font-family: var(--serif);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; }
button:focus-visible, input:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 5px;
}
button, input { -webkit-tap-highlight-color: transparent; }
button[disabled] { opacity: 0.65; }
.storybook {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(1160px, 100%);
  min-height: min(640px, calc(100svh - 115px));
  margin: 0 auto;
  background: var(--paper) url("public/assets/login/pooh-login-scene.png") center / cover no-repeat;
  border: 1px solid #d2bf963d;
  border-radius: 4px 13px 12px 4px / 4px 6px 8px 8px;
  box-shadow: 0 1px 0 #d7caae, 0 5px 0 -1px #f3e9d3, 0 6px 0 -1px #d3c3a5, 0 11px 0 -3px #eee3cc, 0 13px 0 -4px #bdac8c, 5px 23px 35px #68533524;
  isolation: isolate;
}
.storybook::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0.42;
  background-image: radial-gradient(#aa91662b 0.5px, transparent 0.8px), radial-gradient(#fffdf4 0.8px, transparent 1px);
  background-size: 7px 9px, 11px 13px;
  background-position: 1px 3px, 4px 5px;
}
.storybook::after {
  content: "";
  position: absolute;
  z-index: 2;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 46px;
  transform: translateX(-50%);
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #87745308 30%, #675a3712 49%, #fffcef73 51%, transparent);
}
.illustrated-page, .welcome-page { position: relative; min-width: 0; }
.illustrated-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 42px 44px 52px;
  background: radial-gradient(ellipse at 40% 65%, #eddda83a, transparent 66%);
}
.story-art {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  flex: 1;
  min-height: 290px;
  margin: 0 auto;
}
.pooh-art {
  display: block;
  width: 100%;
  max-width: 292px;
  height: clamp(300px, 31vw, 405px);
  object-fit: contain;
  filter: drop-shadow(0 7px 10px #ad914817);
}
.welcome-page { display: flex; flex-direction: column; justify-content: center; padding: 75px clamp(36px, 5.3vw, 80px) 48px; background: linear-gradient(90deg, #fbf5e73d, #fbf5e7b3 25%, #fbf5e782); border-radius: 0 13px 12px 0; }
.ribbon-bookmark {
  position: absolute;
  top: -3px;
  right: 52px;
  width: 30px;
  height: 71px;
  background: linear-gradient(90deg, #87463b, #a25d4c 10%, #a25d4c 87%, #824439);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%);
  transform: rotate(2deg);
}
.welcome-words { position: relative; }
h1 { margin: 0; font-weight: 400; font-size: clamp(2.8rem, 4vw, 4rem); line-height: 1.07; letter-spacing: -0.055em; }
.login-form { margin-top: 34px; }
.login-form label { display: block; margin-bottom: 11px; font-size: 0.9rem; color: #624b35; }
.login-form input {
  display: block;
  width: 100%;
  height: 53px;
  padding: 10px 2px 12px;
  border: 0;
  border-bottom: 1px solid #bda681;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  box-shadow: 0 3px 0 -2px #d3bd9645;
  font-size: 1.15rem;
  transition: border-color 180ms ease;
}
.login-form input:hover, .login-form input:focus { border-bottom-color: var(--red); }
.login-form input::placeholder { color: var(--soft-ink); opacity: 1; }
.login-form input:autofill { -webkit-text-fill-color: var(--ink); }
.field-hint { margin: 12px 0 0; color: var(--soft-ink); font-size: 0.76rem; line-height: 1.55; }
.honey-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 52px;
  margin-top: 26px;
  padding: 13px 19px 14px 21px;
  border: 1px solid #b68a353d;
  border-radius: 3px 5px 4px 2px / 3px 3px 5px 5px;
  background: #ddb256;
  color: #513820;
  box-shadow: 1px 3px 0 #b88a3730;
  font-size: 1rem;
  transition: background-color 180ms ease, transform 180ms ease;
}
.honey-button:hover:enabled { background: #e5bc66; transform: translateY(-1px) rotate(-0.3deg); }
.honey-button:active:enabled { transform: translateY(1px); }
.button-arrow { color: #805c2c; margin-left: 10px; font-size: 1.35rem; line-height: 1; }
.login-status { min-height: 21px; margin: 16px 0 0; color: var(--red); font-size: 0.83rem; line-height: 1.5; overflow-wrap: anywhere; }
.login-status:empty { margin: 0; min-height: 0; }
.email-recipient { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 5px; row-gap: 7px; margin: 0 0 23px; font-size: 0.8rem; color: var(--soft-ink); }
.email-recipient b { font-weight: 400; color: var(--ink); overflow-wrap: anywhere; }
.email-recipient .ink-link { margin-left: auto; }
.ink-link { padding: 2px 0; border: 0; background: transparent; color: var(--red); font-size: 0.78rem; text-decoration: underline; text-decoration-color: #a5634859; text-underline-offset: 4px; line-height: 1.6; }
.ink-link:hover:enabled { color: #672f23; text-decoration-color: currentColor; }
.ink-link:disabled { cursor: default; text-decoration: none; }
.code-form { margin-top: 25px; }
.code-form #login-code { height: 62px; font-family: var(--serif); font-size: 2.1rem; letter-spacing: 0.48em; padding-left: 4px; }
.code-form #login-code::placeholder { color: var(--soft-ink); }
.resend-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; column-gap: 7px; row-gap: 8px; margin-top: 19px; color: var(--soft-ink); font-size: 0.77rem; }
.resend-row .ink-link:disabled { color: var(--soft-ink); opacity: 1; }
.little-envelope { display: none; }
body[data-login-step="code"] h1 { font-size: clamp(2.6rem, 3.7vw, 3.65rem); }
body[data-login-step="code"] .little-envelope {
  position: relative;
  display: block;
  width: 45px;
  height: 31px;
  margin-bottom: 20px;
  background: #e6d4ac;
  border: 1px solid #b7a07b;
  transform: rotate(-8deg);
  animation: envelope-arrive 650ms ease-out both;
}
.little-envelope::before { content: ""; position: absolute; inset: 0; background: #f4e8cc; clip-path: polygon(0 0, 50% 55%, 100% 0); }
.little-envelope span { position: absolute; inset: 2px 0 0; border-bottom: 1px solid #c8b08a; transform: skewY(-30deg); }
.little-envelope i { position: absolute; top: 8px; left: 16px; font-size: 0.8rem; font-style: normal; color: var(--red); }
.bee { position: absolute; z-index: 2; width: 16px; height: 11px; border: 1px solid #785631; border-radius: 48% 51% 45% 55%; background: repeating-linear-gradient(90deg, #d6a744 0 4px, #725333 4px 6px); transform: rotate(-15deg); pointer-events: none; }
.bee::before, .bee::after { content: ""; position: absolute; bottom: 7px; width: 9px; height: 10px; border: 1px solid #a8956d; border-radius: 75% 25% 75% 35%; background: #fff9e2cb; transform-origin: 80% 90%; }
.bee::before { left: 3px; transform: rotate(-35deg); }
.bee::after { left: 8px; transform: rotate(29deg); }
.bee b { position: absolute; width: 4px; height: 5px; border-radius: 50%; right: -3px; top: 2px; background: #735234; }
.bee i { position: absolute; right: -4px; top: -3px; width: 5px; height: 5px; border-top: 1px solid #735234; transform: rotate(-45deg); }
.bee--one { top: 28%; right: 10%; animation: bee-wander 9s ease-in-out infinite alternate; }
.bee--two { top: 17%; right: 24%; scale: 0.7; animation: bee-wander 12s -4s ease-in-out infinite alternate-reverse; }
.bee-path { position: absolute; top: 22%; right: 10%; width: 74px; height: 74px; border: 1px dashed #ad936b73; border-left-color: transparent; border-top-color: transparent; border-radius: 50%; transform: rotate(21deg); opacity: 0.6; }
.art-flower { position: absolute; bottom: 14%; font-size: 1.7rem; color: #bf923f; opacity: 0.75; transform: rotate(8deg); }
.art-flower--one { left: 6%; }
.art-flower--two { right: 6%; bottom: 6%; font-size: 1.3rem; color: var(--sage); transform: rotate(-15deg); }
.preview-notice { margin: -6px 0 21px; padding: 12px 14px; border-left: 2px solid var(--sage); background: #e4e7d44d; font-size: 0.73rem; line-height: 1.5; }
.preview-notice strong, .preview-notice > span { display: block; }
.preview-notice strong { font-weight: 600; color: #5a684c; }
.preview-controls { display: flex; gap: 14px; margin-top: 9px; }
.preview-controls button { padding: 2px 0; border: 0; color: #6c674f; background: none; text-decoration: underline; text-underline-offset: 3px; }
.preview-controls button[aria-pressed="true"] { color: var(--red); text-decoration-thickness: 2px; }
.noscript-note { padding: 0.75rem 0; color: var(--red); font-size: 0.9rem; line-height: 1.5; }
@keyframes bee-wander { 0% { translate: 0 0; rotate: -12deg; } 30% { translate: -12px -7px; rotate: -2deg; } 68% { translate: -5px 5px; rotate: 9deg; } 100% { translate: 9px -3px; rotate: -7deg; } }
@keyframes envelope-arrive { from { opacity: 0; transform: translateY(8px) rotate(-14deg); } to { opacity: 1; transform: translateY(0) rotate(-8deg); } }
@media (min-width: 1500px) { body { padding-top: max(60px, calc((100svh - 665px) / 2)); } }
@media (max-width: 940px) {
  body { padding: 28px 24px 20px; }
  .illustrated-page { padding-inline: 25px; }
  .welcome-page { padding-inline: 38px; }
  .pooh-art { height: 340px; }
}
@media (max-width: 700px) {
  body { padding: 13px 13px 18px; background: #eee4ce; }
  .storybook { grid-template-columns: 1fr; max-width: 480px; min-height: 0; background-size: auto 280px; background-position: left top; }
  .storybook::after { display: none; }
  .illustrated-page { padding: 22px 27px 0; background: radial-gradient(ellipse at 50% 59%, #e9d99e40, transparent 65%); }
  .story-art { flex: none; min-height: 0; height: 192px; max-width: 250px; margin: 0 auto; }
  .pooh-art { height: 180px; width: 100%; }
  .art-flower { display: none; }
  .bee--one { right: 2%; top: 12%; scale: 0.8; }
  .bee--two { display: none; }
  .bee-path { right: 0; top: 11%; width: 39px; height: 39px; }
  .welcome-page { padding: 28px 28px 38px; background: linear-gradient(#fbf5e7cc, #fbf5e7 90px); border-radius: 0 0 12px 4px; }
  .ribbon-bookmark { display: none; }
  h1 { font-size: 2.8rem; }
  .login-form { margin-top: 25px; }
  .login-form input { font-size: 1rem; height: 48px; }
  .field-hint { font-size: 0.73rem; margin-top: 10px; }
  .honey-button { margin-top: 22px; min-height: 51px; }
  body[data-login-step="code"] .story-art { height: 160px; }
  body[data-login-step="code"] .pooh-art { height: 150px; }
  body[data-login-step="code"] .little-envelope { width: 37px; height: 26px; margin-bottom: 16px; }
  body[data-login-step="code"] .little-envelope i { top: 5px; left: 13px; }
  body[data-login-step="code"] h1 { font-size: 2.48rem; }
  .code-form { margin-top: 23px; }
  .email-recipient { font-size: 0.75rem; margin-bottom: 22px; }
  .code-form #login-code { font-size: 1.95rem; letter-spacing: 0.45em; }
  .preview-notice { margin-top: 0; font-size: 0.69rem; }
}
@media (max-width: 360px) {
  .illustrated-page { padding-inline: 21px; }
  .welcome-page { padding-inline: 23px; }
  .story-art { height: 156px; }
  .pooh-art { height: 151px; }
  h1 { font-size: 2.6rem; }
  body[data-login-step="code"] h1 { font-size: 2.15rem; }
  .code-form #login-code { font-size: 1.8rem; letter-spacing: 0.35em; }
  .email-recipient .ink-link { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.art-flower svg, .button-arrow svg, .little-envelope i svg { display: inline-block; width: 1em; height: 1em; vertical-align: -0.12em; }
