:root {
  --ink: #142019;
  --paper: #eee9df;
  --surface: #fbfaf6;
  --line: #cbc8bd;
  --line-strong: #969d95;
  --accent: #ceda70;
  --muted: #68726a;
  --danger: #8a3024;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: var(--paper); }
body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 8% 18%, rgb(206 218 112 / 11%), transparent 28rem),
    linear-gradient(135deg, #eee9df 0%, #f3efe7 52%, #ebe5da 100%);
  color: var(--ink);
  font-family: var(--muye-font-sans, "Helvetica Neue", Arial, sans-serif);
}

header {
  height: 68px;
  border-bottom: 1px solid rgb(20 32 25 / 14%);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 clamp(22px, 5vw, 72px);
  background: rgb(243 239 231 / 82%);
  backdrop-filter: blur(18px);
}
header > a:first-child {
  color: var(--ink);
  font-size: 19px;
  font-weight: 850;
  letter-spacing: .24em;
  line-height: 1;
  text-decoration: none;
}
header small {
  display: block;
  margin-top: 7px;
  font: 8px/1 var(--muye-font-mono, monospace);
  letter-spacing: .3em;
}
header label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font: 10px/1 var(--muye-font-mono, monospace);
  letter-spacing: .16em;
}
header select {
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}
#back {
  justify-self: end;
  color: var(--ink);
  border-bottom: 1px solid rgb(20 32 25 / 42%);
  padding-bottom: 5px;
  font-size: 12px;
  text-decoration: none;
}

main {
  width: min(calc(100% - 48px), 1180px);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(390px, .92fr) minmax(500px, 1fr);
  align-items: center;
  gap: clamp(20px, 2.6vw, 36px);
  padding: 28px 0 36px;
}

.intro {
  min-height: min(570px, calc(100vh - 124px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 4.5vw, 64px);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgb(8 16 12 / 32%) 0%, rgb(10 20 14 / 91%) 100%),
    url("assets/muye-desert-editorial-v1.jpg") center / cover no-repeat,
    var(--ink);
  color: #f4f0e7;
  isolation: isolate;
  box-shadow: 0 28px 72px rgb(20 32 25 / 13%);
  animation: account-panel-in .7s cubic-bezier(.2,.72,.2,1) both;
}
.intro::before,
.intro::after {
  content: "";
  position: absolute;
  z-index: -1;
  border: 1px solid rgb(206 218 112 / 26%);
  border-radius: 50%;
}
.intro::before { width: 360px; height: 360px; right: -210px; top: -170px; }
.intro::after { width: 210px; height: 210px; right: -105px; top: -82px; }
.intro > p:first-child {
  margin: 0;
  color: #dce78a;
  font: 10px/1.4 var(--muye-font-mono, monospace);
  letter-spacing: .19em;
  text-transform: uppercase;
}
.intro h1 {
  max-width: 650px;
  margin: 28px 0 24px;
  font-size: clamp(46px, 4.6vw, 64px);
  font-weight: 650;
  letter-spacing: -.06em;
  line-height: .94;
}
.intro > p:last-child {
  max-width: 470px;
  margin: 0;
  color: #dde2dd;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0;
}

.account-card {
  width: 100%;
  max-width: 540px;
  justify-self: center;
  align-self: center;
  position: relative;
  overflow: hidden;
  padding: clamp(28px, 3vw, 36px);
  border: 1px solid rgb(20 32 25 / 13%);
  border-radius: 16px;
  background: rgb(251 250 246 / 92%);
  box-shadow: 0 30px 84px rgb(20 32 25 / 11%);
  backdrop-filter: blur(16px);
  animation: account-card-in .7s .08s cubic-bezier(.2,.72,.2,1) both;
}
.account-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #9faa50 58%, transparent);
}
.account-card.register-mode { max-width: 590px; }
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border: 1px solid rgb(20 32 25 / 10%);
  border-radius: 10px;
  background: #eeece5;
}
.tabs button {
  min-height: 38px;
  padding: 8px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #7a827b;
  font-size: 13px;
  font-weight: 720;
}
.tabs button.active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 5px 18px rgb(20 32 25 / 8%);
}

form { display: grid; gap: 13px; }
form label:not(.terms) {
  display: grid;
  gap: 7px;
  color: #27312b;
  font-size: 12px;
  font-weight: 720;
}
input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: 1px solid #b9bdb6;
  border-radius: 8px;
  background: #fdfcf8;
  color: var(--ink);
  font-size: 15px;
}
input:hover { border-color: #7d867f; }
input:focus {
  border-color: var(--ink);
  outline: 3px solid rgb(206 218 112 / 42%);
  outline-offset: 1px;
  box-shadow: 0 7px 20px rgb(20 32 25 / 7%);
}
form button {
  min-height: 46px;
  padding: 12px 16px;
  border: 1px solid var(--ink);
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: .015em;
}
form button:hover:not(:disabled) { background: #253129; transform: translateY(-2px); box-shadow: 0 10px 24px rgb(20 32 25 / 16%); }
form button:disabled { cursor: wait; opacity: .6; }
.text-button {
  min-height: auto;
  justify-self: start;
  padding: 3px 0;
  border: 0;
  border-radius: 0;
  border-bottom: 1px solid rgb(20 32 25 / 55%);
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}
.text-button:hover:not(:disabled) { background: transparent; color: #58662d; transform: none; }

#register-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 14px;
  row-gap: 12px;
}
#register-form > small,
#register-form > .terms,
#register-form > button,
#auth-status { grid-column: 1 / -1; }
#password-help,
#reset-help {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}
.terms {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #49534c;
  font-size: 11px;
  line-height: 1.5;
}
.terms input {
  flex: 0 0 17px;
  width: 17px;
  min-height: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--ink);
}
.terms span { flex: 1; }
.form-eye {
  margin: 0;
  color: var(--muted);
  font: 10px/1.4 var(--muye-font-mono, monospace);
  letter-spacing: .15em;
}
.account-card h2 { margin: 0 0 4px; font-size: 28px; letter-spacing: -.035em; }
.account-card form > p:not(.form-eye) { margin: 2px 0 8px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.notice { padding: 12px 14px; background: #e7edbd; color: #273016; font-size: 12px; }
#auth-status {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-left: 3px solid var(--danger);
  background: #f4ded8;
  color: #6d2417;
  font-size: 12px;
}

@keyframes account-panel-in {
  from { opacity: 0; transform: translate3d(-18px, 12px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes account-card-in {
  from { opacity: 0; transform: translate3d(18px, 14px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.dashboard {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 285px 1fr;
  gap: 32px;
}
main:has(.dashboard:not([hidden])) { display: block; padding-top: 48px; }
main:has(.dashboard:not([hidden])) .intro { display: none; }
.profile { align-self: start; padding: 30px; background: var(--ink); color: #f5f0e6; }
.profile p,
.orders > div > p { margin: 0; color: var(--accent); font: 10px/1.4 var(--muye-font-mono, monospace); letter-spacing: .16em; }
.profile h2 { margin: 17px 0 7px; font-size: 29px; }
.profile button { margin-top: 28px; padding: 9px 0; border: 0; border-bottom: 1px solid; background: none; color: #fff; }
.verification { margin-top: 24px; padding-top: 19px; border-top: 1px solid #59645b; display: grid; gap: 8px; }
.verification b { color: var(--accent); }
.verification small { color: #c7cec7; line-height: 1.5; }
.verification button { margin-top: 3px; text-align: left; }
.orders h2 { margin: 8px 0 24px; font-size: clamp(34px, 4vw, 46px); letter-spacing: -.045em; }
.order { margin-bottom: 14px; padding: 22px; border: 1px solid var(--line); border-top: 3px solid var(--ink); background: var(--surface); }
.order header { height: auto; padding: 0 0 15px; display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); background: transparent; backdrop-filter: none; }
.order header b { font-family: var(--muye-font-mono, monospace); letter-spacing: .07em; }
.order header span { font-weight: 720; }
.order ul { padding: 0; list-style: none; line-height: 1.85; }
.order footer { display: flex; justify-content: space-between; color: var(--muted); }
.empty-orders { padding: 30px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }

@media (max-width: 920px) {
  main { grid-template-columns: minmax(280px, .72fr) minmax(440px, 1fr); width: min(calc(100% - 32px), 1080px); }
  .intro { padding: 38px; }
  .intro h1 { font-size: clamp(43px, 6.5vw, 58px); }
}

@media (max-width: 760px) {
  header { height: 68px; padding: 0 18px; }
  header label span { display: none; }
  #back { font-size: 11px; }
  main { width: 100%; min-height: calc(100vh - 68px); display: block; padding: 0; }
  main * { min-width: 0; }
  .intro { min-height: 250px; padding: 38px 22px 54px; border-radius: 0; background-position: center 62%; }
  .intro h1 { margin: 18px 0 14px; font-size: clamp(36px, 10vw, 48px); }
  .intro > p:last-child { max-width: 520px; font-size: 13px; overflow-wrap: anywhere; }
  .account-card,
  .account-card.register-mode { width: calc(100% - 28px); max-width: none; justify-self: stretch; margin: -22px auto 28px; padding: 24px 18px 30px; border-radius: 14px; box-shadow: 0 20px 54px rgb(20 32 25 / 12%); }
  #register-form { grid-template-columns: 1fr; }
  #register-form > small,
  #register-form > .terms,
  #register-form > button { grid-column: auto; }
  .dashboard { display: block; padding: 26px 20px; }
  .orders { margin-top: 36px; }
  .order header { align-items: flex-start; gap: 10px; flex-direction: column; padding-left: 0; padding-right: 0; }
  .order footer { gap: 10px; flex-direction: column; }
}

@media (max-width: 470px) {
  header { grid-template-columns: 1fr auto; }
  #back { display: none; }
  .tabs button { min-width: 0; font-size: 12px; white-space: normal; }
  input { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .intro, .account-card { animation: none; }
}
