/* Warm-paper pixel RPG skin. Layout and app behavior stay in mobile.css/mjs. */
:root {
  --paper: #faf7ef;
  --white: #fffdf7;
  --ink: #213c31;
  --muted: #687367;
  --line: #dedfce;
  --green: #294e3b;
  --light: #edf0e1;
  --gold: #8b682b;
  --goldlight: #f5ecd3;
  --red: #9b4b3b;
  --pixel-gold: #c2a56b;
  --pixel-dark: #183b2c;
  --pixel-step: 3px;
  --shadow: 0 2px 0 #d9ddca, 0 9px 23px #203b2710;
  background: #e5e8dd;
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
body { background: #e5e8dd; }
button { min-height: 44px; touch-action: manipulation; }
button, a, summary { -webkit-tap-highlight-color: #c2a56b22; }
button, input, textarea, select { font-family: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid #956c25;
  outline-offset: 3px;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid #5f7b45;
  outline-offset: 2px;
}
button:disabled { opacity: .54; }
.app-shell { background: var(--paper); }
.topbar {
  background: #faf7eff5;
  border-bottom-color: #dfe1d0;
  backdrop-filter: blur(12px);
}
.brand { font-weight: 800; letter-spacing: -.65px; }
.brand-icon {
  width: 35px;
  height: 38px;
  background: var(--green);
  color: #f4d99b;
  clip-path: polygon(18% 0,82% 0,82% 10%,100% 10%,100% 78%,82% 78%,82% 90%,62% 90%,62% 100%,38% 100%,38% 90%,18% 90%,18% 78%,0 78%,0 10%,18% 10%);
}
.top-title { font-weight: 700; letter-spacing: .3px; }
.top-actions { gap: 4px; }
.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 4px;
  flex-shrink: 0;
}
.icon-btn:hover { background: #e9eddc; }
.notice-dot { width: 6px; height: 6px; border-radius: 0; background: var(--gold); }
.demo-label { color: var(--muted); letter-spacing: 1px; }
.eyebrow, .m-character-title {
  font-family: "Cascadia Mono", "Consolas", monospace;
  letter-spacing: 1.5px;
  font-weight: 700;
}
.nav {
  background: #faf7effa;
  border-top: 2px solid #d2d8bd;
  height: calc(75px + env(safe-area-inset-bottom, 0px));
  padding-top: 5px;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 0 #ffffff65;
}
.nav button { min-height: 55px; color: #6f7c6d; font-size: 11px; gap: 3px; position: relative; }
.nav button svg { width: 24px; height: 24px; }
.nav button.active { color: var(--green); font-weight: 700; }
.nav button.active::after { width: 14px; height: 3px; border-radius: 0; bottom: 0; background: var(--pixel-gold); }
.m-card, .quest-card, .action-card, .m-game-card, .m-hero, .portfolio-card {
  border-radius: 5px;
  border-color: var(--line);
  background-color: var(--white);
  box-shadow: 0 2px 0 #dfe1d2;
}
.m-card, .quest-card { padding: 17px; }
.m-card .m-card { box-shadow: none; }
.m-game-card { background: linear-gradient(135deg, #f1f2e4, #fff9e7); border-color: #d8d7b9; }
.m-hero { background: #eef0e1; border-color: #d4d9c3; }
.m-hero h2 { line-height: 1.5; margin: 5px 0; }
.m-title { font-weight: 650; overflow-wrap: anywhere; }
.m-label { color: #4d604b; font-size: 13px; font-weight: 650; }
.m-sub { font-size: 12px; line-height: 1.75; }
.m-caption, .m-note { font-size: 11px; line-height: 1.8; }
.m-note { background: #eef0e1; border-radius: 3px; border-left: 2px solid #c5cfae; }
.m-value, .m-stat strong, .reward-price, .m-numeric { font-variant-numeric: tabular-nums; }
.m-badge, .m-chip {
  border: 1px solid #d3dcc0;
  background: #edf1df;
  border-radius: 3px;
  font-size: 10px;
  line-height: 1.6;
  padding: 3px 7px;
}
.m-badge.quiet { border-color: #e0e3d7; background: #f3f4ec; color: #697467; }
.m-badge.gold { border-color: #dfce9f; background: var(--goldlight); color: #775920; }
.m-button, .btn {
  min-height: 46px;
  border-radius: 4px;
  border-color: #cbd3bd;
  box-shadow: 0 2px 0 #d8deca;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  padding: 10px 14px;
}
.m-primary, .btn.primary {
  background: var(--green);
  color: #fff8e8;
  border-color: #193d29;
  box-shadow: inset 0 1px 0 #638465, 0 3px 0 #173622;
}
.m-ghost { background: #fffdf777; }
.btn.small, .candidate-card .m-button { min-height: 44px; font-size: 12px; }
.m-button:active:not(:disabled), .btn:active:not(:disabled) { transform: translateY(1px); box-shadow: 0 1px 0 #bdc7ad; }
.m-input {
  min-height: 46px;
  border-radius: 4px;
  border-color: #cfd7c1;
  background: #fffef9;
  font-size: 16px;
  box-shadow: inset 0 2px 0 #e8eadc;
  padding: 10px 11px;
}
.m-input::placeholder { color: #7b8476; font-size: 13px; }
textarea.m-input { line-height: 1.65; }
.m-check { min-height: 44px; align-items: flex-start; }
.m-check input { width: 19px; height: 19px; margin-top: 2px; }
.m-check strong { font-size: 13px; }
.m-check small { font-size: 11px; }
.m-option { border-radius: 4px; min-height: 48px; border-color: #d1d9c4; }
.m-option:has(input:checked) { background: #edf2df; border-color: #7c9665; box-shadow: inset 3px 0 0 #4a6f40; }
.m-option input { min-width: 18px; min-height: 18px; }
.m-icon { border-radius: 3px; background: #e8eed8; border: 1px solid #d5dfc0; }
.m-progress, .m-meter { border-radius: 0; height: 6px; background: #dfe4d0; box-shadow: inset 0 1px 0 #c8d2b6; }
.m-progress>span, .m-meter>span { border-radius: 0; background: #5a7847; box-shadow: inset 0 1px 0 #8aa96b; }
.m-link-row { min-height: 62px; border-bottom-color: #dce1cf; padding: 13px 0; }
.m-link-row>.m-icon { width: 37px; height: 37px; }
.m-link-row .m-sub { font-size: 11px; }
.m-actions { gap: 9px; }
.m-actions>* { min-width: 0; }
.m-reward { border-radius: 3px; background: #f5ecd5; color: #7e6029; border: 1px solid #e2d2ab; }
.m-skill-node { border-radius: 4px; padding: 13px; }
.m-skill-node summary { min-height: 44px; }
.m-skill-node summary>.m-title { font-size: 13px; }
.m-star-orb { border-radius: 3px; box-shadow: 0 0 0 4px var(--paper), 0 3px 0 #bbc9a6; }
.m-star-label { background: #faf7eff0; }
.m-star-state { font-size: 10px; }
.m-constellation-node { min-height: 68px; }
.m-equipment-slot { border-radius: 4px; border-color: #d2dac2; box-shadow: 0 2px 0 #dfe4d3; padding: 15px 10px; }
.m-slot-icon { border-radius: 3px; border-color: #bfcdab; background: #e9efdb; }
.m-equipment-slot.rarity-pro { border-color: #91b1a1; background: #f5f9f0; }
.m-equipment-slot.rarity-precision { border-color: #b9a16b; background: #fbf6e8; }
.m-equipment-slot.rarity-precision .m-slot-icon { background: #efe4c5; border-color: #d1b97c; color: #826323; }
.m-equipment-rarity { display: inline-flex; align-items: center; padding: 3px 6px; border: 1px solid #d3dcc6; font-size: 10px; line-height: 1.6; border-radius: 2px; }
.m-equipment-rarity.rarity-common { color: #526a4b; background: #f0f3e8; }
.m-equipment-rarity.rarity-pro { color: #315f4e; background: #e9f2e7; border-color: #adc5b2; }
.m-equipment-rarity.rarity-precision { color: #826125; background: #f7eed9; border-color: #dcc28b; }
.m-icon.rarity-precision { color: #826125; border-color: #d8c69c; background: #f5edd6; }
.m-character-sheet {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  min-height: 235px;
  margin: 15px 0 16px;
  padding: 15px 15px 0 8px;
  gap: 8px;
  border: 2px solid #7d8b5c;
  border-radius: 3px;
  background: radial-gradient(ellipse at 25% 90%, #456b41 0, #203f2f 48%, #173a2b 100%);
  color: #f8f1d8;
  box-shadow: 0 0 0 2px #e5e3c8, 0 4px 0 #d0d4bb;
  overflow: hidden;
}
.m-character-sheet::before { content: ''; position: absolute; inset: 6px; border: 1px solid #c5c79038; pointer-events: none; }
.m-character-portrait { align-self: end; position: relative; min-width: 0; display: flex; align-items: flex-end; justify-content: center; }
.m-character-portrait img { display: block; width: 100%; height: auto; max-height: 236px; object-fit: contain; object-position: center bottom; image-rendering: pixelated; filter: drop-shadow(0 6px 0 #122d2844); }
.m-character-portrait .m-avatar { margin: 60px 0; border-radius: 3px; background: #678153; color: #fbefc6; border-color: #b4b176; }
.m-character-copy { align-self: center; min-width: 0; padding: 5px 0 22px; position: relative; }
.m-character-title { font-size: 9px; line-height: 1.8; color: #d1c995; letter-spacing: 1px; margin-bottom: 9px; }
.m-character-copy h2 { font-size: 24px; letter-spacing: 1px; line-height: 1.4; margin-bottom: 10px; }
.m-character-copy .m-sub { color: #d2dbc0; font-size: 12px; line-height: 1.8; margin-bottom: 11px; }
.m-character-copy .m-badge { color: #eddfad; background: #3e5937; border-color: #758359; font-size: 10px; }
.m-quick-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 17px 0 23px; }
.m-quick-link { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 7px; padding: 13px 7px 11px; min-height: 86px; background: #fffdf5; border: 1px solid #d3d9c3; border-radius: 3px; box-shadow: 0 2px 0 #e0e4d4; font-size: 12px; font-weight: 650; }
.m-quick-link .m-icon { width: 34px; height: 34px; border: none; background: transparent; color: #4a6944; }
.m-quick-link:active { background: #edf2df; }
.m-demo-details { margin: 16px 0; padding: 0; border-top: 1px dashed #d5dcc7; color: var(--muted); }
.m-demo-details summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-size: 11px; list-style: none; }
.m-demo-details summary::-webkit-details-marker { display: none; }
.m-demo-details summary::before { content: '+'; width: 15px; font-family: monospace; font-size: 15px; color: #688057; }
.m-demo-details[open] summary::before { content: '−'; }
.m-demo-details>p { font-size: 11px; padding: 0 0 12px 23px; }
.m-stat strong { color: #3c5f3d; }
.m-stat span { color: #6d7869; }
.m-days { padding: 8px 12px; }
.m-day { border-radius: 0; min-height: 59px; }
.m-day>.m-check { min-width: 63px; min-height: 44px; }
.m-time-range>.m-input { font-size: 16px; padding: 8px 4px; min-height: 44px; }
.m-time-range>span { flex-shrink: 0; }
.m-text-button { min-height: 44px; }
.m-step-dot { border-radius: 3px; }
.filter-row button { min-height: 44px; border-radius: 3px; padding: 8px 12px; }
.task-tools button, .prep-slot, .empty-slot, .chat-message, .portfolio-card { border-radius: 4px; }
.task-tools button { min-height: 46px; }
.candidate-avatar { border-radius: 3px; }
.secure-strip { border-radius: 3px; background: #eaf0df; color: #4d6847; }
.review-quote { border-left-width: 3px; }
.chat-message.mine { background: #2e513a; color: #fbf6e8; }
.modal { border-radius: 9px 9px 0 0; border: 2px solid #b7c3a3; }
.modal-heading { background: var(--paper); }
.loot, .award { border-radius: 3px; border-color: #dac392; }
.history-item::before { border-radius: 0; }
#toast { border-radius: 4px; border: 1px solid #83966b; background: #244333f7; }
@media (hover: hover) {
  .m-quick-link:hover, .m-equipment-slot:hover, button.m-card:hover { border-color: #9cad7e; box-shadow: 0 3px 0 #d4ddc2; }
  .m-primary:hover, .btn.primary:hover { background: #365e42; }
}
@media (max-width: 360px) {
  .m-card, .quest-card, .action-card { padding: 14px; }
  .m-button, .btn { padding: 10px 11px; }
  .m-character-sheet { padding: 12px 12px 0 4px; min-height: 224px; gap: 5px; }
  .m-character-copy h2 { font-size: 22px; }
  .m-character-copy .m-sub { font-size: 11px; }
  .m-character-title { font-size: 8px; letter-spacing: .6px; }
  .m-quick-grid { gap: 7px; }
  .m-day { display: grid; grid-template-columns: 1fr; gap: 0; padding: 7px 0 11px; }
  .m-day>.m-check { min-height: 37px; }
  .m-time-range { width: 100%; }
  .m-time-range>.m-input { flex: 1 1 0; width: 0; padding: 8px; }
  .m-skill-node { padding: 11px; }
  .m-skill-node summary { flex-wrap: wrap; gap: 6px; }
  .m-skill-node summary>.m-title { flex-basis: 120px; }
  .m-actions>.m-button { flex-basis: calc(50% - 9px); }
}
@media (min-width: 1000px) {
  .app-shell { border-color: #bac5a8; border-radius: 14px; }
  .topbar { border-radius: 14px 14px 0 0; }
  .nav { border-radius: 0 0 14px 14px; }
  .modal { border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation: none !important; transition: none !important; }
