/* The same handwriting used in onboarding, served locally for the shop CSP. */
@font-face {
  font-family: "Liu Jian Mao Cao";
  src: url("../legacy-static/fonts/liu-jian-mao-cao-latin.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

body[data-page=restore] { display: flex; flex-direction: column; min-height: 100svh; }
.restore-main { width: 100%; max-width: 1160px; flex: 1; margin: 0 auto; padding: 20px 32px 48px; }
.restore-layout { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; padding-block: clamp(28px, 6vh, 64px); }
.restore-panel { width: 100%; max-width: 460px; min-width: 0; margin-inline: auto; }
.restore-panel h1 { font-size: clamp(36px, 4.4vw, 54px); line-height: 1.04; letter-spacing: -.055em; }
.restore-copy { margin-top: 18px; font-size: 15px; line-height: 1.7; }
.restore-panel .restore-card { max-width: none; margin: 28px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
.restore-panel .field { margin-bottom: 18px; }
.restore-panel .field > label { font-size: 13px; margin-bottom: 7px; }
.restore-panel input { height: 48px; border-color: #cecece; border-radius: 8px; font-size: 16px; }
.restore-panel input::placeholder { color: #8c8c8c; }
.restore-panel .button { min-height: 50px; margin-top: 6px; padding-inline: 22px; border-radius: 8px; gap: 10px; font-size: 15px; }
.restore-button-icon { position: relative; display: grid; place-items: center; width: 20px; height: 20px; flex: none; }
.restore-send-icon, .restore-check-icon { position: absolute; inset: 0; transition: opacity .2s ease, transform .25s ease; }
.restore-check-icon { opacity: 0; transform: scale(.55) rotate(-12deg); }
.restore-panel .button[aria-busy=true] .restore-send-icon { animation: restoreSending 1s ease-in-out infinite; }
.restore-panel .button.is-success .restore-send-icon { opacity: 0; transform: scale(.55); }
.restore-panel .button.is-success .restore-check-icon { opacity: 1; transform: scale(1) rotate(0); }
.restore-panel .button.is-cooldown { color: #686868; background: #ecece8; border-color: #ecece8; }
@keyframes restoreSending { 50% { transform: translateY(-2px); opacity: .6; } }
.restore-panel :is(input, button, a):focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; box-shadow: none; }
.restore-success-dialog { width: min(calc(100% - 32px), 430px); padding: 0; border: 0; border-radius: 16px; background: transparent; color: var(--ink); box-shadow: 0 24px 80px rgba(0,0,0,.2); }
.restore-success-dialog::backdrop { background: rgba(20,20,18,.48); backdrop-filter: blur(4px); animation: restoreBackdrop .2s ease-out both; }
.restore-success-dialog[open] { animation: restoreDialog .28s cubic-bezier(.2,.8,.2,1) both; }
.restore-success-card { display: grid; justify-items: center; padding: 34px; border: 1px solid var(--line); border-radius: 16px; background: #fdfdfb; text-align: center; }
.restore-success-mark { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 20px; border-radius: 50%; background: var(--ink); color: #fff; }
.restore-success-mark svg { animation: restoreCheck .35s .12s cubic-bezier(.2,.8,.2,1) both; }
.restore-success-kicker { margin: 0 0 8px; color: var(--muted); font: 700 10px/1.2 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.restore-success-card h2 { margin: 0; font-size: 30px; line-height: 1.1; letter-spacing: -.045em; }
.restore-success-card > p:last-of-type { max-width: 34ch; margin: 12px 0 26px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.restore-success-card .button { width: 100%; margin: 0; }
@keyframes restoreBackdrop { from { opacity: 0; } }
@keyframes restoreDialog { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes restoreCheck { from { opacity: 0; transform: scale(.5) rotate(-12deg); } }
.restore-help { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; }
.restore-help a { display: inline-block; padding-block: 8px; color: var(--ink); margin-left: 4px; }
.restore-founder { display: none; }
body[data-page=restore] .shop-footer { flex-shrink: 0; margin-top: auto; }

@media (min-width: 1024px) {
  .restore-layout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(56px, 7vw, 100px); }
  .restore-panel { margin-inline: 0; }
  .restore-founder { display: block; min-width: 0; padding: 24px 0 24px 48px; border-left: 1px solid var(--line); }
  .restore-founder figure, .restore-founder blockquote { margin: 0; }
  .restore-founder blockquote p { color: var(--ink); font-family: "Liu Jian Mao Cao", cursive; font-size: clamp(30px, 2.7vw, 38px); font-weight: 400; line-height: 1.3; }
  .restore-founder figcaption { display: flex; align-items: baseline; justify-content: flex-end; gap: 12px; margin-top: 28px; }
  .restore-founder figcaption strong { font-size: 15px; font-weight: 550; }
  .restore-founder figcaption span { color: var(--muted); font-size: 12px; }
}
@media (max-width: 800px) {
  .restore-main { max-width: 620px; padding: 12px 24px 32px; }
}
@media (max-width: 480px) {
  .restore-main { padding: 10px 16px 24px; }
  .restore-layout { padding-block: 24px; }
  .restore-copy { font-size: 14px; }
  .restore-success-card { padding: 28px 22px 22px; }
  .restore-success-card h2 { font-size: 27px; }
}
@media (prefers-reduced-motion: reduce) {
  .restore-send-icon, .restore-check-icon, .restore-success-dialog, .restore-success-dialog::backdrop, .restore-success-mark svg { animation: none !important; transition: none !important; }
}
