:root {
  color-scheme: light;
  --canvas: #fff8ee;
  --paper: #fffcf7;
  --tile: #f4e9dd;
  --ink: #40291f;
  --muted: #756352;
  --border: #e6d9c7;
  --accent: #ad3d2c;
  --accent-hi: #913222;
  --focus: #285d7b;
  --green: #3f6549;
  --radius: 22px;
  font-family:
    -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
}
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  min-width: 240px;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.56;
}
[aria-busy='true']:disabled {
  cursor: wait;
}
[hidden] {
  display: none !important;
}
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
:where(a, button, summary, input, select, textarea, .choice span, .upload) {
  transition:
    color 0.15s,
    background-color 0.15s,
    border-color 0.15s,
    box-shadow 0.15s,
    transform 0.15s;
}
button:not(:disabled):active,
.button:active,
.nav-link:active,
.hero-link:active,
.brand:active,
summary:active,
.text-button:active,
.inline-link:active,
.back:active {
  transform: translateY(1px);
}
button:not(:disabled):active,
.button:active,
summary:active,
.nav-link:active,
.text-button:active,
.back:active {
  background-color: #edddcc;
}
.button.primary:active {
  background: #812b20;
}
a:active {
  color: var(--accent-hi);
}
#main:focus {
  outline: none;
}
.shell {
  width: min(1120px, calc(100% - 96px));
  margin-inline: auto;
}
.site-header {
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 78px;
}
.brand,
.brand-area,
.nav-link,
.button,
.text-button,
.hero-link,
.back,
.inline-link,
.eyeline,
.terms-meta,
.accepted {
  display: inline-flex;
  align-items: center;
}
.brand {
  gap: 10px;
  min-height: 44px;
  border-radius: 9px;
}
.brand img {
  display: block;
  border-radius: 12px;
  width: 39px;
  height: 39px;
}
.brand > span {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-size: 23px;
  font-weight: 760;
  letter-spacing: -1.3px;
}
.brand i {
  width: 6px;
  height: 6px;
  background: #df6d5b;
  border-radius: 50%;
}
.brand-area {
  font-size: 13px;
  color: var(--muted);
  padding-left: 18px;
  border-left: 1px solid var(--border);
}
#nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}
.nav-link,
.hero-link,
.back,
.inline-link,
.text-button,
.site-footer a {
  min-height: 44px;
  padding: 6px 9px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 14px;
  font-weight: 590;
  gap: 6px;
}
.nav-link {
  white-space: nowrap;
  color: var(--muted);
}
.nav-login {
  color: var(--ink);
}
.nav-enter-miya {
  border: 1px solid var(--border);
  color: var(--accent);
}
.nav-enter-mobile { display: none; }
.nav-link[aria-current='page'] {
  background: #f4e8dc;
  color: #833825;
}
.nav-extras {
  display: none;
}
.nav-account {
  position: relative;
  min-width: 0;
}
.nav-account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  max-width: 184px;
  padding: 5px 9px 5px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.nav-account-toggle::-webkit-details-marker { display: none; }
.nav-account-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 10px;
  background: #bd4935;
  color: #fff9f2;
  font-size: 13px;
  font-weight: 750;
}
.nav-account-name {
  min-width: 0;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-account-chevron {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  margin: -3px 2px 0 1px;
  transform: rotate(45deg);
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transition: transform .15s ease;
}
.nav-account[open] .nav-account-chevron { transform: translateY(3px) rotate(225deg); }
.nav-account[open] .nav-account-toggle {
  border-color: var(--border);
  background: #f4e8dc;
}
.nav-account-menu {
  position: absolute;
  z-index: 25;
  top: calc(100% + 5px);
  right: 0;
  min-width: 160px;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 0 14px 28px #4b2b1d25;
}
.nav-account-sign-out {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.nav-account-toggle:focus-visible,
.nav-account-sign-out:focus-visible {
  outline: 3px solid #2962bc;
  outline-offset: 2px;
}
.nav-account-sign-out:disabled { opacity: .58; cursor: wait; }
.nav-account-toggle:active,
.nav-account-sign-out:not(:disabled):active { background: #ead6c6; }
@media (hover: hover) and (pointer: fine) {
  .nav-account-toggle:hover { border-color: var(--border); background: #f8ece1; }
  .nav-account-sign-out:not(:disabled):hover { background: #f8ece1; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-account-chevron { transition: none; }
}
.icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}
.text-button .icon,
.nav-link .icon,
.back .icon {
  width: 16px;
  height: 16px;
}
.skip {
  position: fixed;
  top: -90px;
  left: 10px;
  z-index: 5;
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--paper);
}
.skip:focus {
  top: 10px;
}
.initial-status {
  padding: 72px 0;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1,
h2,
h3 {
  text-wrap: balance;
  line-height: 1.36;
}
h1 {
  font-size: clamp(32px, 4vw, 51px);
  letter-spacing: -0.045em;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 17px;
  letter-spacing: -0.015em;
}
small,
.small {
  color: var(--muted);
  font-size: 12px;
}
.muted,
.hint,
.meta {
  color: var(--muted);
}
.button {
  min-height: 46px;
  gap: 10px;
  border-radius: 12px;
  justify-content: center;
  padding: 10px 19px;
  border: 1px solid transparent;
  font-weight: 650;
  line-height: 1.45;
  font-size: 15px;
  white-space: nowrap;
}
.button.primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 3px 7px #7b35191c;
}
.button.secondary {
  background: var(--paper);
  color: var(--ink);
  border-color: #d9c4af;
}
.button .icon {
  width: 17px;
  height: 17px;
}
.landing {
  padding-top: 36px;
}
.landing-hero {
  overflow: hidden;
  position: relative;
  isolation: isolate;
  min-height: 390px;
  display: flex;
  align-items: center;
  border: 1px solid #e5d3bb;
  border-radius: 30px;
  background: #f7e9d8;
}
.hero-art {
  position: absolute;
  inset: 0 0 0 32%;
  z-index: -1;
}
.hero-art img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 55% 58%;
}
.hero-art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f7e9d8 0%, #f7e9d8eb 9%, #f7e9d899 23%, transparent 45%);
}
.hero-content {
  width: 54%;
  padding: 58px 12px 58px 58px;
}
.hero-content h1 {
  font-weight: 760;
  font-size: clamp(46px, 5.1vw, 69px);
  line-height: 1.11;
  letter-spacing: -0.055em;
}
.hero-content em {
  font-style: normal;
  color: #ad3d2c;
}
.hero-content p {
  margin: 18px 0 25px;
  max-width: 31ch;
  color: #644d3c;
  font-size: 16px;
  line-height: 1.82;
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-link,
.inline-link,
.back,
.text-button {
  color: #8f3b2a;
}
.hero-link {
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: #b98c78;
}
.process {
  margin-top: 37px;
}
.steps {
  margin-top: 17px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
}
.step {
  display: flex;
  gap: 15px;
  padding: 22px;
  align-items: flex-start;
}
.step + .step {
  border-left: 1px solid var(--border);
}
@media (min-width: 651px) and (max-width: 1100px) {
  .steps {
    grid-template-columns: 1fr;
  }
  .step + .step {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
}
.step-icon,
.empty-icon {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #9a4631;
  background: #f8e7d9;
  border-radius: 13px;
}
.step:nth-child(2) .step-icon {
  background: #f3ebd9;
  color: #89612c;
}
.step:nth-child(3) .step-icon {
  background: #e9edde;
  color: #506846;
}
.step p,
.summary-line p {
  margin-top: 5px;
  font-size: 14px;
  color: var(--muted);
}
.preview-controls {
  margin-top: 22px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}
.preview-controls div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.reading {
  max-width: 760px;
}
.reading,
.workspace {
  padding-top: 40px;
}
.page-heading {
  margin: 0 0 25px;
}
.page-heading p,
.dashboard-intro p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}
.back {
  padding-left: 0;
  margin-bottom: 5px;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 27px 30px;
  min-width: 0;
}
.panel + .panel,
.workspace > .summary-line {
  margin-top: 19px;
}
.panel-title {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 18px;
}
.panel-title > .icon {
  color: var(--accent);
}
.panel-title h2,
.summary-line h2 {
  font-size: 21px;
}
.panel-title.line {
  margin-top: 10px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.panel-title.split {
  justify-content: space-between;
}
.form-stack {
  display: grid;
  gap: 18px;
}
.form-stack > .panel {
  margin: 0;
}
.form-stack > .panel-title {
  margin: 0;
}
fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
legend,
.field > span:first-child {
  font-size: 14px;
  font-weight: 630;
  padding: 0;
}
legend {
  margin-bottom: 8px;
}
.field {
  display: grid;
  gap: 7px;
  min-width: 0;
}
.field small {
  padding-left: 4px;
  font-weight: 400;
}
.field input:not([type='file']),
.field select,
.field textarea,
.device-row select {
  width: 100%;
  min-width: 0;
  border: 1px solid #d7c6b4;
  background: #fffdf9;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
  min-height: 46px;
}
.field textarea {
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder {
  color: #887567;
  opacity: 1;
}
.field select {
  padding-right: 25px;
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: #986a53;
}
.panel > fieldset,
.panel > .field,
.panel > .grid-2,
.panel > .other-need,
.panel > .hardware-fields {
  margin-top: 18px;
}
.panel > .panel-title + fieldset {
  margin-top: 0;
}
.panel.form-stack > .grid-2,
.panel.form-stack > .field {
  margin: 0;
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.choice {
  position: relative;
  cursor: pointer;
}
.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  margin: 0;
}
.choice span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7c6b4;
  background: #fffcf7;
  border-radius: 11px;
  color: #5d493a;
  padding: 8px 15px;
  min-height: 44px;
  font-size: 14px;
}
.choice:active span,
.upload:active {
  background: #ecd8c5;
}
.choice input:checked + span {
  border-color: #a34e37;
  box-shadow: inset 0 0 0 1px #a34e37;
  background: #fae9dd;
  color: #7a3020;
  font-weight: 650;
}
.choice input:focus-visible + span,
.upload:focus-within {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.hint {
  font-size: 13px;
  font-weight: 400;
  line-height: 1.65;
}
legend + .hint {
  margin: -4px 0 9px;
}
.hardware-fields > .field {
  margin-top: 14px;
}
.device-row {
  margin: 13px 0;
  padding: 14px;
  border-radius: 14px;
  background: #f8f1e6;
}
.row-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.row-heading strong {
  font-size: 14px;
}
.row-heading .text-button {
  min-height: 44px;
  font-size: 13px;
}
.device-other {
  margin-top: 10px;
}
.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.terms-meta,
.accepted,
.eyeline,
.sync-note {
  gap: 7px;
  font-size: 13px;
}
.terms-meta {
  color: var(--muted);
}
.terms section {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.terms section h2 {
  font-size: 19px;
  margin-bottom: 7px;
}
.terms section p {
  font-size: 15px;
  line-height: 1.9;
  color: #654f40;
  white-space: pre-line;
}
.terms .form-actions,
.consent-form,
.terms > .button {
  margin-top: 18px;
}
.accepted {
  color: var(--green);
  margin: 20px 12px 0 0;
}
.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 15px;
  cursor: pointer;
}
.check-line input {
  width: 20px;
  height: 20px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--accent);
}
.consent-form .button {
  margin-top: 8px;
}
.auth-form {
  max-width: 560px;
}
.inline-note {
  color: var(--muted);
  font-size: 14px;
}
.inline-link {
  padding: 0 3px;
}
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  padding-right: 62px !important;
}
.password-field button {
  position: absolute;
  inset: 1px 1px 1px auto;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
}
.error-box {
  margin: 12px 0;
  padding: 9px 13px;
  border: 1px solid #d5a391;
  border-radius: 10px;
  background: #fff0e9;
  color: #87341e;
  font-size: 14px;
  overflow-wrap: anywhere;
}
#notice:not(:empty) {
  position: fixed;
  z-index: 500;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: min(448px, calc(100vw - 32px));
  pointer-events: none;
}
.notice-card {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 1px 2px 1px 14px;
  border: 1px solid #d8be9f;
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 12px 32px rgb(64 41 31 / 12%);
  pointer-events: auto;
}
.notice-enter {
  animation: notice-in 0.15s ease-out;
}
.notice-icon {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  color: #c24a36;
}
.notice-success .notice-icon {
  color: #2e6e45;
}
.notice-warning .notice-icon {
  color: #8b652e;
}
.notice-error .notice-icon {
  color: #a72f2b;
}
.notice-text {
  min-width: 0;
  padding: 7px 0;
  overflow-wrap: anywhere;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}
.notice-close {
  align-self: center;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #806b60;
}
.notice-close .icon {
  width: 15px;
  height: 15px;
}
.notice-close:focus-visible {
  outline-offset: -4px;
}
.notice-close:not(:disabled):active {
  background: #ebd9c5;
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
  .notice-close:hover {
    background: #f4e8dc;
    color: var(--ink);
  }
}
@keyframes notice-in {
  from { transform: translateY(4px); }
  to { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .notice-card {
    animation: none;
  }
}
.dashboard-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}
.eyeline {
  color: var(--muted);
  margin-bottom: 7px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.stat {
  display: grid;
  align-content: space-between;
  gap: 13px;
  border: 1px solid var(--border);
  border-radius: 17px;
  padding: 18px 22px;
  background: var(--paper);
}
.stat span {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 14px;
}
.stat span .icon {
  width: 17px;
  height: 17px;
  color: #9e5541;
}
.stat strong {
  line-height: 1;
  font-weight: 670;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
}
.sync-note {
  display: flex;
  align-items: center;
  margin: 13px 0 22px;
  color: var(--muted);
}
.sync-note .icon {
  width: 16px;
  height: 16px;
}
.stat strong.pending {
  font-size: 24px;
  color: var(--muted);
}
.stats + .panel {
  margin-top: 22px;
}
.empty {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 17px 5px 18px;
  gap: 10px;
}
.empty-icon {
  background: var(--tile);
}
.empty p {
  color: var(--muted);
  font-size: 14px;
}
.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.feedback-item {
  padding: 4px 0;
  border-top: 1px solid var(--border);
}
.feedback-item summary {
  position: relative;
  list-style: none;
  padding: 13px 38px 13px 5px;
  cursor: pointer;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.feedback-item summary::-webkit-details-marker {
  display: none;
}
.feedback-item summary::after {
  content: '⌄';
  position: absolute;
  right: 12px;
  top: 14px;
  color: var(--muted);
  font-size: 19px;
}
.feedback-item[open] > summary::after {
  transform: rotate(180deg);
}
.item-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.status {
  color: #665034;
  background: #f1e8d9;
  border-radius: 6px;
  padding: 1px 7px;
  line-height: 1.7;
  font-size: 12px;
}
.meta {
  font-size: 12px;
}
.preview-line {
  margin: 4px 0 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #604c3c;
  font-size: 14px;
}
.full-desc {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: 8px 0 12px;
}
.record-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 8px 0 18px;
  background: #f7f0e5;
  border-radius: 14px;
  padding: 16px;
}
.record-grid dt {
  color: var(--muted);
  font-size: 12px;
}
.record-grid dd {
  margin: 2px 0 0;
  font-size: 14px;
  overflow-wrap: anywhere;
}
.ledger {
  list-style: none;
  margin: 8px 0;
  padding: 0;
}
.ledger li {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14px;
}
.upload {
  display: flex;
  position: relative;
  min-height: 57px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #bd9e81;
  border-radius: 12px;
  cursor: pointer;
  background: #faf4eb;
  color: #77513a;
  font-size: 14px;
}
.upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0;
}
.thumbs img {
  display: block;
  width: 88px;
  height: 80px;
  border: 1px solid var(--border);
  object-fit: cover;
  border-radius: 8px;
}
.thumbs a {
  display: block;
  border-radius: 8px;
}
.preview {
  position: relative;
}
.thumb-remove {
  position: absolute;
  right: 0;
  top: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: start end;
  padding: 3px;
  border: 0;
  border-radius: 8px;
  background: transparent;
}
.thumb-remove .icon {
  border-radius: 50%;
  padding: 3px;
  background: #412b20;
  color: white;
  width: 22px;
  height: 22px;
}
.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
}
.filters > .error-box {
  grid-column: 1 / -1;
}
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  margin-top: 38px;
  padding: 13px 0 max(16px, env(safe-area-inset-bottom));
  font-size: 12px;
  color: var(--muted);
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  font-weight: 450;
  font-size: 13px;
}
.site-footer b {
  color: #ac775e;
  padding: 0 2px;
}
@media (hover: hover) and (pointer: fine) {
  .button.primary:not(:disabled):hover {
    background: #933422;
    box-shadow: 0 4px 11px #7b35192b;
  }
  .button.secondary:hover,
  .nav-link:hover,
  .hero-link:hover,
  .brand:hover,
  .inline-link:hover,
  .back:hover,
  .text-button:not(:disabled):hover,
  .site-footer a:hover,
  .password-field button:hover,
  summary:hover,
  .thumb-remove:hover {
    background: #f4e8da;
    color: #773b2c;
  }
  .choice:hover span,
  .upload:hover,
  .field input:not(:disabled):hover,
  .field textarea:hover,
  .field select:not(:disabled):hover {
    border-color: #ad886b;
  }
  .thumbs a:hover {
    box-shadow: 0 0 0 2px #ae7458;
  }
}
@media (max-width: 900px) {
  .nav-secondary { display: none; }
  .nav-extras { display: block; position: relative; }
  .nav-extras summary { cursor: pointer; list-style: none; white-space: nowrap; }
  .nav-extras summary::-webkit-details-marker { display: none; }
  .nav-extras-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    right: 0;
    display: grid;
    min-width: 132px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 12px 26px #4b2b1d25;
  }
  .nav-extras-menu .nav-link { width: 100%; }
  .shell {
    width: calc(100% - 48px);
  }
  .hero-content {
    padding: 42px 10px 42px 34px;
  }
  .hero-art {
    left: 30%;
  }
  .step {
    padding: 17px 14px;
    gap: 10px;
  }
  .step-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 780px) {
  body:not(.guide-page) .brand-area { display: none; }
  .nav-primary { display: none; }
  .nav-enter-desktop { display: none; }
  .nav-enter-mobile { display: inline; }
  .nav-account-toggle { max-width: 124px; }
}
@media (max-width: 650px) {
  .shell {
    width: calc(100% - 32px);
  }
  .header-inner {
    min-height: 62px;
    gap: 9px;
  }
  .brand {
    gap: 7px;
  }
  .brand img {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
  .brand > span {
    font-size: 20px;
  }
  .brand-area {
    padding-left: 9px;
    font-size: 12px;
  }
  #nav {
    gap: 1px;
  }
  .nav-link {
    font-size: 12px;
    padding: 6px;
  }
  .nav-secondary {
    display: none;
  }
  .nav-primary { display: none; }
  .nav-enter-desktop { display: none; }
  .nav-enter-mobile { display: inline; }
  .nav-enter-miya { padding: 6px 7px; }
  .nav-account-toggle { max-width: 124px; }
  .nav-account-avatar { width: 27px; height: 27px; flex-basis: 27px; }
  .nav-extras {
    display: block;
    position: relative;
  }
  .nav-extras summary {
    cursor: pointer;
    list-style: none;
    white-space: nowrap;
    min-width: 44px;
    justify-content: center;
  }
  .nav-extras summary::-webkit-details-marker {
    display: none;
  }
  .nav-extras-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    right: 0;
    display: grid;
    min-width: 132px;
    padding: 5px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--paper);
    box-shadow: 0 12px 26px #4b2b1d25;
  }
  .nav-extras-menu .nav-link {
    width: 100%;
  }
  .landing {
    padding-top: 18px;
  }
  .landing-hero {
    min-height: auto;
    align-items: flex-start;
    flex-direction: column;
    border-radius: 22px;
  }
  .hero-art {
    position: relative;
    order: 2;
    inset: auto;
    width: 100%;
    height: clamp(120px, 37vw, 210px);
  }
  .hero-art img {
    object-position: center 66%;
  }
  .hero-art::after {
    background: linear-gradient(180deg, #f7e9d8 0%, #f7e9d860 18%, transparent 42%);
  }
  .hero-content {
    padding: 24px 22px 10px;
    width: 100%;
  }
  .hero-content h1 {
    font-size: clamp(38px, 8.7vw, 53px);
    line-height: 1.2;
  }
  .hero-content h1 br {
    display: none;
  }
  .hero-content h1 em::before {
    content: ' ';
  }
  .hero-content p {
    margin: 10px 0 16px;
    max-width: 36ch;
    font-size: 14px;
  }
  .hero-actions {
    gap: 5px;
  }
  .button {
    padding: 10px 15px;
    font-size: 14px;
  }
  .process {
    margin-top: 25px;
  }
  .steps {
    grid-template-columns: 1fr;
    margin-top: 12px;
    border-radius: 16px;
  }
  .step {
    padding: 13px 16px;
    gap: 13px;
    align-items: center;
  }
  .step + .step {
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .step h3 {
    font-size: 16px;
  }
  .step p {
    font-size: 13px;
    margin-top: 2px;
  }
  .preview-controls {
    margin-top: 15px;
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .preview-controls .text-button:first-child {
    padding-left: 0;
  }
  .reading,
  .workspace {
    padding-top: 23px;
  }
  .page-heading {
    margin-bottom: 16px;
  }
  .page-heading p,
  .dashboard-intro p {
    font-size: 14px;
  }
  .panel {
    padding: 18px 16px;
    border-radius: 16px;
  }
  .panel-title {
    margin-bottom: 13px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .site-footer {
    margin-top: 25px;
  }
  .dashboard-intro {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 13px;
  }
  .stats {
    gap: 6px;
  }
  .stat {
    padding: 12px 9px;
    border-radius: 12px;
  }
  .stat span {
    font-size: 12px;
    gap: 3px;
  }
  .stat span .icon {
    width: 14px;
    height: 14px;
  }
  .stat strong {
    font-size: 26px;
  }
  .sync-note {
    align-items: flex-start;
    font-size: 12px;
  }
  .sync-note .icon {
    margin-top: 3px;
  }
  .summary-line {
    flex-wrap: wrap;
  }
  .filters {
    gap: 8px;
  }
  .form-actions .primary {
    width: 100%;
  }
}
@media (max-width: 390px) {
  .nav-enter-mobile { display: none; }
  .nav-enter-miya { min-width: 44px; justify-content: center; }
  .hero-content {
    padding: 20px 16px 8px;
  }
  .hero-content h1 {
    font-size: 35px;
  }
  .hero-content h1 em::before {
    content: '';
  }
  .stat span .icon {
    display: none;
  }
}
@media (max-width: 350px) {
  .nav-account-name { display: none; }
}
@media (max-width: 280px) {
  .brand {
    width: 44px;
    justify-content: center;
  }
  .brand > span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
  button:not(:disabled):active,
  .button:active,
  .nav-link:active,
  .hero-link:active,
  .brand:active,
  summary:active,
  .text-button:active,
  .inline-link:active,
  .back:active {
    transform: none;
  }
}
