/* DRDHP Desk — tactile, warm, and entirely self-contained. */
:root {
  --wood-dark: #2b190f;
  --wood: #5a3823;
  --wood-light: #8b5d38;
  --brass: #b99a55;
  --brass-light: #e5d18c;
  --paper: #eee4ca;
  --paper-deep: #d8c9a7;
  --ink: #322d25;
  --muted-ink: #766d5d;
  --leather: #263e32;
  --red: #813f35;
  --metal: #c5c2b9;
  --serif: "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", STSong, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --mono: "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--wood-dark); }
body {
  margin: 0;
  min-height: 100dvh;
  color: #f3ead7;
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  background-color: var(--wood);
  background-image:
    linear-gradient(90deg, rgba(20,8,2,.2), transparent 14%, rgba(255,220,165,.07) 35%, transparent 54%, rgba(28,12,5,.18) 83%, transparent),
    repeating-linear-gradient(2deg, transparent 0 8px, rgba(35,16,6,.08) 9px, rgba(255,225,180,.025) 10px, transparent 12px),
    repeating-linear-gradient(91deg, rgba(30,12,4,.035) 0 1px, transparent 1px 80px);
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse at 50% 15%, rgba(255,220,155,.19), transparent 65%);
  pointer-events: none;
}
body.lights-off::before { background: rgba(6,13,15,.52); }
body.lights-off .desktop, body.lights-off .system-bar { filter: brightness(.66) saturate(.8); }
body.window-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid #f1cc72; outline-offset: 4px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; transform: translateY(-150%); background: #eee4ca; color: #2b190f; padding: 8px 14px; }
.skip-link:focus { transform: none; }
.room-light { position: fixed; inset: 42px 0 0; pointer-events: none; z-index: 1; background: radial-gradient(ellipse at 50% 35%, rgba(255,225,167,.09), transparent 60%); }

/* Brushed metal menu bar */
.system-bar {
  height: 43px;
  position: relative;
  z-index: 110;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
  color: #2f302e;
  font-size: 11px;
  text-shadow: 0 1px rgba(255,255,255,.65);
  border-bottom: 1px solid #151512;
  background:
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, rgba(0,0,0,.025) 1px 2px),
    linear-gradient(#e2e0d8, #a8a8a2 52%, #92938e 53%, #bbbcb5);
  box-shadow: 0 2px 8px rgba(0,0,0,.45), inset 0 1px rgba(255,255,255,.8);
}
.system-brand, .system-actions { display: flex; align-items: center; gap: 10px; }
.system-brand strong { letter-spacing: .08em; }
.system-brand > span:last-child { color: #65655e; }
.system-center { font-family: var(--mono); font-size: 10px; color: #55564f; }
.system-actions { justify-content: flex-end; gap: 8px; }
.metal-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 10px;
  border: 1px solid #777872;
  border-radius: 4px;
  color: #33342f;
  background: linear-gradient(#f4f3ed, #b7b7b0);
  box-shadow: inset 0 1px #fff, 0 1px 1px rgba(0,0,0,.25);
  text-decoration: none;
  font-size: 10px;
  cursor: pointer;
}
.metal-button:active { background: linear-gradient(#9a9b95, #c9c9c1); box-shadow: inset 0 1px 3px rgba(0,0,0,.25); }
.lamp-symbol { width: 9px; height: 9px; border-radius: 50%; background: #7a7a6c; box-shadow: inset 0 1px 2px rgba(0,0,0,.4); }
.lamp-toggle[aria-pressed="true"] .lamp-symbol { background: #e4b74f; box-shadow: 0 0 6px #d8a536, inset 0 1px #fff2aa; }
.tiny-book { display: inline-block; width: 13px; height: 17px; border-radius: 2px 3px 3px 2px; background: linear-gradient(90deg, #1e3026, #42634e 25%, #263e32 28%, #1d3428); border: 1px solid rgba(0,0,0,.4); box-shadow: inset 1px 0 rgba(255,255,255,.2), 1px 1px 1px rgba(0,0,0,.3); }

/* Desktop objects */
.desktop {
  min-height: calc(100dvh - 43px);
  position: relative;
  z-index: 2;
  overflow: hidden;
  padding: 32px 20px 110px;
  transition: filter .35s ease;
}
.desktop-icons { position: absolute; z-index: 4; left: 24px; top: 34px; display: flex; flex-direction: column; gap: 21px; }
.desktop-icon { width: 91px; display: flex; flex-direction: column; align-items: center; gap: 7px; border: 0; background: none; padding: 0; cursor: pointer; }
.icon-image { width: 62px; height: 62px; position: relative; display: block; filter: drop-shadow(0 6px 4px rgba(20,8,2,.45)); transition: transform .15s ease, filter .15s ease; }
.desktop-icon:hover .icon-image { transform: translateY(-3px); filter: drop-shadow(0 9px 5px rgba(20,8,2,.5)) brightness(1.08); }
.desktop-icon:active .icon-image { transform: translateY(0) scale(.96); }
.book-icon { border-radius: 12px; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 0 0 1px rgba(0,0,0,.4); }
.book-icon img { width: 100%; height: 100%; object-fit: cover; }
.icon-label { max-width: 91px; padding: 2px 6px; border-radius: 3px; color: #fff9ea; font-size: 11px; line-height: 1.35; text-shadow: 0 1px 2px #000, 0 0 3px #000; }
.desktop-icon:hover .icon-label { background: rgba(37,49,39,.65); }
.folder-icon { width: 68px; height: 51px; margin-top: 8px; border-radius: 4px 7px 7px 5px; border: 1px solid #71531c; background: linear-gradient(105deg, #d5a946, #f1ce72 43%, #c38c31); box-shadow: inset 0 1px 2px #ffecaa, inset -4px -4px 8px rgba(105,63,5,.25); }
.folder-icon::before { content: ""; position: absolute; left: 2px; top: -10px; width: 30px; height: 14px; border-radius: 4px 5px 0 0; background: linear-gradient(#edc76c, #c8983f); border: 1px solid #806124; border-bottom: 0; }
.folder-icon i { position: absolute; inset: 8px 4px 3px; border-radius: 3px; background: linear-gradient(170deg, #f7e7b4, #d8c18b); transform: rotate(-3deg); box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.id-icon { width: 57px; height: 61px; border-radius: 5px; border: 1px solid #4d4434; background: linear-gradient(125deg, #f2e8ce, #c6b998); box-shadow: inset 0 0 0 3px #e8ddc2, inset 0 0 0 4px #a4987e; }
.id-head { position: absolute; width: 18px; height: 18px; border-radius: 50%; left: 10px; top: 12px; background: radial-gradient(circle at 40% 30%, #a9b1a5, #5d6d60); box-shadow: inset 0 1px 2px rgba(255,255,255,.5); }
.id-body { position: absolute; width: 28px; height: 17px; border-radius: 16px 16px 3px 3px; left: 5px; top: 33px; background: linear-gradient(#839083,#526356); }
.id-icon b { position: absolute; right: 7px; top: 16px; width: 17px; height: 3px; background: #8d846e; box-shadow: 0 7px #8d846e, 0 14px #8d846e, 0 21px #8d846e; }
.mail-icon { width: 66px; height: 47px; margin-top: 10px; border-radius: 4px; border: 1px solid #75664a; background: linear-gradient(140deg, #fff7df, #d8c9a7); box-shadow: inset 0 1px #fff; overflow: hidden; }
.mail-icon::before, .mail-icon::after { content: ""; position: absolute; top: -27px; width: 47px; height: 47px; border: 1px solid #a99a7d; background: #eee3c6; transform: rotate(45deg); }
.mail-icon::before { left: -25px; } .mail-icon::after { right: -25px; }
.mail-icon i { position: absolute; z-index: 2; left: 12px; top: -27px; width: 40px; height: 40px; border: 1px solid #a99a7d; background: linear-gradient(135deg, #e5d8b9 50%, #f8efda 51%); transform: rotate(45deg); }

.welcome-note { position: absolute; z-index: 3; top: 52px; right: 34px; width: 214px; min-height: 170px; padding: 26px 20px 18px; color: #494233; background: linear-gradient(135deg, #f1e5b9, #d8c68e); box-shadow: 3px 7px 14px rgba(24,10,2,.4), inset 0 0 25px rgba(112,83,35,.12); transform: rotate(2.5deg); text-align: center; }
.welcome-note::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(103,84,45,.18); pointer-events: none; }
.note-pin { position: absolute; left: 50%; top: 7px; width: 12px; height: 12px; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #e6c785, #80622c 65%, #3f2c13); box-shadow: 1px 2px 2px rgba(0,0,0,.45); }
.welcome-note > p:first-of-type { margin: 0 0 8px; font-family: var(--mono); font-size: 7px; letter-spacing: .18em; }
.welcome-note h1 { margin: 0; font-family: var(--serif); font-size: 22px; font-weight: 600; }
.note-rule { width: 38px; height: 1px; margin: 13px auto; background: #9f8a56; }
.welcome-note .welcome-motto { margin: 0; font-family: var(--serif); font-size: 12px; }
.note-date { display: block; margin-top: 15px; color: #897a55; font-family: var(--mono); font-size: 8px; }

/* Wooden bookshelf */
.bookshelf-wrap { position: relative; z-index: 3; width: min(710px, calc(100vw - 480px)); min-width: 510px; margin: 8px auto 0; filter: drop-shadow(0 18px 14px rgba(20,8,2,.45)); }
.shelf-crown { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; border: 1px solid #2b180c; border-radius: 7px 7px 2px 2px; background: repeating-linear-gradient(2deg, transparent 0 5px, rgba(30,12,4,.1) 6px, transparent 8px), linear-gradient(90deg, #4a2b17, #8a5a34 25%, #724526 60%, #4a2b17); box-shadow: inset 0 2px #a9784b, inset 0 -4px 5px rgba(31,14,5,.45), 0 3px 4px rgba(0,0,0,.4); text-align: center; }
.shelf-crown p { margin: 0 0 2px; color: #d5bc82; font-family: var(--mono); font-size: 7px; letter-spacing: .24em; text-shadow: 0 1px #241208; }
.shelf-crown h2 { margin: 0; color: #e5d2a4; font-family: var(--serif); font-size: 18px; font-weight: 500; letter-spacing: .12em; text-shadow: 0 1px 2px #241208; }
.crown-rivet { width: 9px; height: 9px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #e2cd8f, #8d7136 65%, #3e2e13); box-shadow: 0 1px 2px #251307; }
.bookshelf { position: relative; margin-inline: 10px; padding: 0 17px; border-inline: 1px solid #2c170b; background: linear-gradient(90deg, #3c2111, #79502e 8%, #51321e 15%, #51321e 85%, #79502e 92%, #3c2111); box-shadow: inset 5px 0 8px rgba(0,0,0,.4), inset -5px 0 8px rgba(0,0,0,.4); }
.shelf-interior { padding-top: 18px; background: repeating-linear-gradient(0deg, transparent 0 9px, rgba(20,8,3,.07) 10px, transparent 12px), linear-gradient(90deg, #332419, #4d3525 50%, #332419); box-shadow: inset 0 8px 18px rgba(0,0,0,.55); }
.books-row { height: 215px; display: flex; align-items: flex-end; gap: 5px; padding: 15px 19px 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; scrollbar-color: #987042 #2c1b10; }
.shelf-board { height: 25px; position: relative; z-index: 5; margin-inline: -17px; border: 1px solid #2b160a; background: repeating-linear-gradient(2deg, transparent 0 4px, rgba(25,10,3,.09) 5px, transparent 7px), linear-gradient(#91613a, #694224 45%, #4a2b16 50%, #6b4428); box-shadow: inset 0 2px #b38152, 0 7px 9px rgba(0,0,0,.5); }
.shelf-board span { position: absolute; inset: 5px 12px auto; height: 1px; background: rgba(255,211,144,.16); }
.lower-shelf { height: 118px; display: flex; align-items: flex-end; justify-content: center; gap: 28px; padding: 14px 30px 12px; }
.lower-board { height: 28px; }
.shelf-side { position: absolute; top: 0; bottom: 0; width: 16px; border: 1px solid #2c170b; background: repeating-linear-gradient(2deg, transparent 0 6px, rgba(25,10,3,.08) 7px, transparent 9px), linear-gradient(90deg, #4d2b16, #855733, #5d361d); box-shadow: inset 1px 0 #a17045; }
.shelf-side-left { left: 0; } .shelf-side-right { right: 0; transform: scaleX(-1); }
.shelf-feet { display: flex; justify-content: space-between; margin-inline: 27px; }
.shelf-feet i { width: 31px; height: 18px; border-radius: 0 0 5px 5px; background: linear-gradient(90deg, #3d2212, #704729, #3d2212); border: 1px solid #2a150a; }
.diary-book { --book-color: #294c3b; --book-dark: #172e23; --book-height: 176px; --book-width: 46px; position: relative; flex: 0 0 var(--book-width); width: var(--book-width); height: var(--book-height); padding: 0; border: 1px solid rgba(13,10,5,.7); border-radius: 3px 5px 2px 2px; background: linear-gradient(90deg, var(--book-dark), var(--book-color) 20%, color-mix(in srgb, var(--book-color) 80%, white) 46%, var(--book-color) 75%, var(--book-dark)); box-shadow: inset 2px 0 2px rgba(255,255,255,.12), inset -3px 0 4px rgba(0,0,0,.35), 2px 3px 4px rgba(0,0,0,.45); cursor: pointer; transition: transform .18s ease, filter .18s ease; }
.diary-book::before, .diary-book::after { content: ""; position: absolute; left: 3px; right: 3px; height: 5px; border-block: 1px solid rgba(218,190,112,.5); background: rgba(0,0,0,.12); box-shadow: 0 1px rgba(255,255,255,.07); }
.diary-book::before { top: 14px; } .diary-book::after { bottom: 14px; }
.diary-book:hover { transform: translateY(-13px) rotate(-1deg); filter: brightness(1.12); }
.diary-book:active { transform: translateY(-6px); }
.spine-title { position: absolute; inset: 28px 5px 27px; display: flex; align-items: center; justify-content: center; margin: auto; color: #e5d6ac; font-family: var(--serif); font-size: 11px; letter-spacing: .12em; line-height: 1.2; writing-mode: vertical-rl; text-shadow: 0 1px 1px #000; overflow: hidden; }
.spine-year { position: absolute; bottom: 5px; left: 0; right: 0; color: #cbb77d; font-family: var(--mono); font-size: 6px; text-align: center; }
.book-forest { --book-color: #315342; --book-dark: #172b22; }
.book-burgundy { --book-color: #783f3b; --book-dark: #3f201e; }
.book-navy { --book-color: #354a5c; --book-dark: #1b2834; }
.book-ochre { --book-color: #9a7535; --book-dark: #4f3817; }
.book-brown { --book-color: #6f4d34; --book-dark: #382719; }
.book-slate { --book-color: #5c6260; --book-dark: #2d3331; }
.shelf-loading, .shelf-empty { width: 100%; align-self: center; text-align: center; color: #b9a88b; font-family: var(--serif); font-size: 12px; }
.shelf-empty strong { display: block; color: #d5c5a6; font-size: 17px; font-weight: 400; }
.shelf-empty p { margin: 5px 0 0; }
.brass-spinner { display: block; width: 22px; height: 22px; margin: 0 auto 10px; border: 2px solid #69573a; border-top-color: #d0b46f; border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.desk-journal { position: relative; width: 72px; height: 91px; border: 1px solid #14251d; border-radius: 3px 6px 5px 3px; background: linear-gradient(100deg, #1e3228, #3f5b48 25%, #294333 80%); box-shadow: inset 3px 0 3px rgba(255,255,255,.07), 3px 4px 4px rgba(0,0,0,.4); color: #bca66b; transform: rotate(-5deg); cursor: pointer; }
.desk-journal span { font-family: var(--serif); font-size: 9px; letter-spacing: .12em; writing-mode: vertical-rl; }
.desk-journal i { position: absolute; right: 7px; top: 0; bottom: 0; width: 2px; background: #9a7841; box-shadow: 1px 0 #17291f; }
.book-stack { width: 82px; height: 60px; position: relative; }
.book-stack i { position: absolute; left: 0; width: 82px; height: 16px; border: 1px solid #271c14; border-radius: 2px 4px 4px 2px; box-shadow: inset 0 3px #d1c19c, inset 0 -3px #ab9b78, 2px 2px 3px rgba(0,0,0,.35); }
.book-stack i:nth-child(1) { bottom: 0; background: #584133; transform: rotate(2deg); }
.book-stack i:nth-child(2) { bottom: 17px; background: #3c4b51; transform: rotate(-2deg); }
.book-stack i:nth-child(3) { bottom: 34px; background: #74433c; transform: rotate(1deg); }
.shelf-clock { position: relative; width: 83px; height: 104px; }
.clock-face { position: absolute; top: 0; left: 6px; width: 72px; height: 72px; border: 6px solid #80652f; border-radius: 50%; background: radial-gradient(circle, #e9dfc4 65%, #c2b28e); box-shadow: inset 0 0 5px rgba(0,0,0,.35), 0 3px 4px rgba(0,0,0,.45), 0 0 0 2px #3c2c14; }
.clock-face::before { content: "12\A\A 6"; white-space: pre; position: absolute; inset: 2px; color: #504733; font-family: var(--serif); font-size: 9px; text-align: center; }
.clock-hour, .clock-minute { position: absolute; left: 50%; bottom: 50%; width: 2px; background: #3b3429; transform-origin: bottom; }
.clock-hour { height: 16px; transform: rotate(35deg); } .clock-minute { height: 23px; transform: rotate(145deg); }
.clock-face b { position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%; background: #7d392e; }
.clock-base { position: absolute; bottom: 4px; left: 0; width: 83px; height: 23px; border-radius: 50% 50% 5px 5px; background: linear-gradient(#9a7b3b, #4c3718); box-shadow: 0 3px 3px rgba(0,0,0,.4); }
.bookend { width: 15px; height: 73px; background: linear-gradient(90deg, #6f572a, #b39650, #59431f); box-shadow: 3px 3px 4px rgba(0,0,0,.4); }
.desk-accessories { position: absolute; z-index: 2; right: 75px; bottom: 106px; width: 200px; height: 160px; }
.coffee-cup { position: absolute; right: 0; bottom: 25px; width: 90px; height: 70px; border-radius: 12px 12px 38px 38px; background: linear-gradient(100deg, #b7b1a2, #f2eee0 35%, #d5d0c1 65%, #969184); box-shadow: inset 3px 2px 4px #fff, 4px 8px 10px rgba(20,8,2,.4); }
.coffee { position: absolute; left: 4px; right: 4px; top: -9px; height: 26px; border: 5px solid #dad5c6; border-radius: 50%; background: radial-gradient(ellipse, #5a341d 45%, #2f190e 75%); box-shadow: inset 0 2px 4px #180c06, 0 1px 2px #777; }
.coffee-cup > i { position: absolute; right: -31px; top: 9px; width: 39px; height: 42px; border: 9px solid #c7c2b4; border-left-color: #a8a396; border-radius: 50%; z-index: -1; box-shadow: 2px 3px 3px rgba(0,0,0,.25); }
.cup-shadow { position: absolute; right: -15px; bottom: 7px; width: 140px; height: 25px; border-radius: 50%; background: rgba(20,8,2,.25); filter: blur(5px); }
.pencil { position: absolute; left: 0; bottom: 18px; width: 120px; height: 9px; border-radius: 3px; background: linear-gradient(#d3a749, #9c6927 55%, #694317 56%, #b98532); box-shadow: 2px 4px 3px rgba(0,0,0,.35); transform: rotate(16deg); }
.pencil::before { content: ""; position: absolute; left: -19px; top: 0; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent; border-right: 20px solid #d7be8b; }
.pencil::after { content: ""; position: absolute; right: -11px; top: -1px; width: 13px; height: 11px; border-radius: 0 3px 3px 0; background: linear-gradient(#b5b2a8, #67665f, #c5c2b8); }
.desk-tip { position: absolute; left: 50%; bottom: 89px; transform: translateX(-50%); margin: 0; color: rgba(248,229,191,.66); font-family: var(--serif); font-size: 11px; text-shadow: 0 1px 2px #211006; white-space: nowrap; }
.desk-tip span { color: #d9b974; margin-right: 5px; }

/* Glass and metal dock */
.dock { position: absolute; z-index: 10; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; align-items: flex-end; gap: 8px; padding: 9px 13px 7px; border: 1px solid rgba(230,220,195,.35); border-radius: 13px; background: linear-gradient(rgba(225,219,199,.24), rgba(60,51,40,.42)); box-shadow: inset 0 1px rgba(255,255,255,.45), inset 0 -1px rgba(0,0,0,.35), 0 7px 15px rgba(20,8,2,.45); backdrop-filter: blur(9px); }
.dock button, .dock a { width: 52px; display: flex; flex-direction: column; align-items: center; gap: 3px; border: 0; background: none; padding: 0; color: #fff5dc; text-decoration: none; cursor: pointer; }
.dock button > img, .dock button > span:first-child, .dock a > span:first-child { width: 42px; height: 42px; transition: transform .15s ease; }
.dock button:hover > img, .dock button:hover > span:first-child, .dock a:hover > span:first-child { transform: translateY(-7px) scale(1.12); }
.dock button > img { border-radius: 8px; object-fit: cover; box-shadow: 0 3px 4px rgba(0,0,0,.4); }
.dock button > span:last-child, .dock a > span:last-child { font-size: 8px; text-shadow: 0 1px 2px #000; }
.dock-divider { width: 1px; height: 38px; margin: 0 3px 13px; background: rgba(255,255,255,.25); box-shadow: 1px 0 rgba(0,0,0,.25); }
.dock-folder { position: relative; border-radius: 4px; background: linear-gradient(120deg, #f0ce75, #b8852e); border: 1px solid #72521c; box-shadow: inset 0 1px #ffedac, 0 3px 4px rgba(0,0,0,.35); }
.dock-folder::before { content: ""; position: absolute; left: 2px; top: -6px; width: 20px; height: 8px; border-radius: 3px 3px 0 0; background: #d4a74b; }
.dock-person { position: relative; border-radius: 7px; background: linear-gradient(130deg, #eee3c7, #a99b7b); border: 1px solid #5b513d; box-shadow: inset 0 1px #fff, 0 3px 4px rgba(0,0,0,.35); }
.dock-person::before { content: ""; position: absolute; left: 13px; top: 7px; width: 14px; height: 14px; border-radius: 50%; background: #5a6b5d; box-shadow: 0 15px 0 4px #5a6b5d; }
.dock-mail { position: relative; border-radius: 4px; background: linear-gradient(140deg, #fff5da, #cabb99); border: 1px solid #6f624a; box-shadow: inset 0 1px #fff, 0 3px 4px rgba(0,0,0,.35); }
.dock-mail::before { content: ""; position: absolute; left: 6px; top: 7px; width: 27px; height: 27px; border: 2px solid #8c7d60; border-top: 0; border-right: 0; transform: rotate(-45deg); }
.dock-settings { position: relative; border: 4px solid #686b66; border-radius: 50%; background: radial-gradient(circle, #363a36 25%, #b9bab2 27%, #777a74 60%, #3f423e); box-shadow: inset 0 1px 3px #e6e7df, 0 3px 4px rgba(0,0,0,.35); }

/* Window manager */
.window-layer { position: fixed; inset: 43px 0 0; z-index: 100; }
.window-backdrop { position: absolute; inset: 0; background: rgba(19,13,8,.48); backdrop-filter: blur(2px); }
.os-window { position: absolute; left: 50%; top: 4%; transform: translateX(-50%); width: min(920px, calc(100vw - 48px)); max-height: 90%; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #272621; border-radius: 8px; color: var(--ink); background: #d4c8aa; box-shadow: 0 25px 70px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.18), inset 0 1px #fff; animation: window-in .18s ease-out; }
@keyframes window-in { from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(.98); } }
.window-titlebar { flex: 0 0 39px; position: relative; display: grid; grid-template-columns: 110px 1fr 110px; align-items: center; padding: 0 12px; border-bottom: 1px solid #5f5e57; background: repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, rgba(0,0,0,.025) 1px 2px), linear-gradient(#e3e1d9, #aaa9a2 50%, #96968f 51%, #bcbbb3); box-shadow: inset 0 1px #fff; }
.window-titlebar h2 { margin: 0; color: #3e3e38; font-size: 12px; font-weight: 650; text-align: center; text-shadow: 0 1px #fff; }
.window-toolbar-text { color: #66665e; font-family: var(--mono); font-size: 8px; text-align: right; }
.traffic-lights { display: flex; gap: 8px; }
.traffic-lights button, .traffic-lights i { width: 13px; height: 13px; padding: 0; border: 1px solid rgba(40,30,20,.55); border-radius: 50%; box-shadow: inset 0 1px 2px rgba(255,255,255,.65), 0 1px rgba(255,255,255,.45); }
.traffic-lights button { background: radial-gradient(circle at 35% 30%, #e89a85, #a84536 65%, #6e261c); cursor: pointer; }
.traffic-lights i:nth-child(2) { background: radial-gradient(circle at 35% 30%, #ecd78d, #a9842e 65%, #695016); }
.traffic-lights i:nth-child(3) { background: radial-gradient(circle at 35% 30%, #a9c992, #567b40 65%, #2f4b20); }
.window-statusbar { flex: 0 0 27px; display: flex; align-items: center; justify-content: center; gap: 7px; border-top: 1px solid #8d8677; color: #625d50; background: linear-gradient(#c9c2b0, #aaa393); box-shadow: inset 0 1px rgba(255,255,255,.55); font-size: 9px; }
.lock-indicator { width: 8px; height: 8px; border-radius: 50%; background: #507047; box-shadow: inset 0 1px 1px #9eb18e; }

/* Library */
.library-content { min-height: 440px; display: grid; grid-template-columns: 190px 1fr; overflow: hidden; }
.library-sidebar { padding: 22px 14px; color: #d8cfba; background: linear-gradient(100deg, #353b34, #232923); border-right: 1px solid #171a16; box-shadow: inset -3px 0 5px rgba(0,0,0,.25); }
.sidebar-heading { margin: 0 8px 12px; color: #929a8d; font-size: 9px; letter-spacing: .1em; }
.library-sidebar button { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 4px; padding: 8px; color: #e5ddca; background: none; text-align: left; font-size: 11px; }
.library-sidebar button.selected { border-color: #171b16; background: linear-gradient(#5b6958, #424e40); box-shadow: inset 0 1px rgba(255,255,255,.16), 0 1px 2px #111; }
.library-sidebar p { margin: 25px 8px 0; color: #99a092; font-family: var(--serif); font-size: 11px; line-height: 1.8; }
.library-main { min-width: 0; overflow: auto; padding: 20px 24px; background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(100,84,52,.08) 28px), #e9e0c9; box-shadow: inset 4px 0 8px rgba(47,36,21,.14); }
.library-search { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; padding: 6px 10px; border: 1px solid #a3987f; border-radius: 5px; background: #f6efdd; box-shadow: inset 0 2px 4px rgba(70,52,27,.15), 0 1px #fff; color: #746c5c; }
.library-search input { width: 100%; border: 0; outline: 0; background: transparent; color: #3e382d; font-size: 11px; }
.diary-list { display: flex; flex-direction: column; }
.diary-list-item { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 14px; min-height: 75px; padding: 10px 5px; border: 0; border-bottom: 1px solid #c8bda3; color: #3c362b; background: transparent; text-align: left; cursor: pointer; }
.diary-list-item:hover { background: rgba(143,116,65,.08); }
.list-book { width: 27px; height: 47px; border-radius: 2px; background: linear-gradient(90deg, var(--book-dark), var(--book-color), var(--book-dark)); box-shadow: 1px 2px 3px rgba(0,0,0,.35); }
.diary-list-item h3 { margin: 0 0 3px; font-family: var(--serif); font-size: 17px; font-weight: 600; }
.diary-list-item p { margin: 0; color: #7d7360; font-size: 10px; }
.diary-list-item time { color: #887d66; font-family: var(--mono); font-size: 8px; }
.list-empty { padding: 70px 20px; color: #857b67; text-align: center; font-family: var(--serif); }

/* Open diary */
.diary-window { width: min(940px, calc(100vw - 48px)); background: #8a7250; }
.open-book { min-height: 0; display: grid; grid-template-columns: .72fr 1.28fr; overflow: hidden; position: relative; padding: 20px 24px; background: linear-gradient(90deg, #5f4931, #a58c64 5%, #8a7250 50%, #a58c64 95%, #5f4931); }
.open-book::after { content: ""; position: absolute; z-index: 3; left: 36%; top: 20px; bottom: 20px; width: 16px; transform: translateX(-50%); background: linear-gradient(90deg, rgba(49,34,17,.25), rgba(255,255,255,.15), rgba(49,34,17,.25)); pointer-events: none; }
.paper-page { position: relative; min-height: 500px; max-height: 66vh; padding: 42px 38px; overflow-y: auto; color: #3b372d; background-color: #eee5cc; background-image: repeating-linear-gradient(0deg, transparent 0 27px, rgba(92,118,125,.13) 28px); box-shadow: 0 3px 8px rgba(39,25,11,.4), inset 0 0 30px rgba(116,86,37,.08); }
.diary-meta-page { transform: rotate(-.3deg); background-color: #e7dcc0; }
.diary-text-page { transform: rotate(.2deg); }
.diary-meta-page::after { content: ""; position: absolute; top: 0; bottom: 0; left: 28px; width: 1px; background: rgba(176,81,65,.22); }
.paper-clip { position: absolute; right: 24px; top: -8px; width: 12px; height: 56px; border: 3px solid #8a897e; border-radius: 7px; box-shadow: 1px 2px 2px rgba(0,0,0,.3); transform: rotate(8deg); }
.diary-kicker { margin: 0 0 24px; color: #8e8065; font-family: var(--mono); font-size: 8px; letter-spacing: .24em; }
.diary-date { display: block; font-family: var(--serif); font-size: 25px; line-height: 1.5; }
.diary-stamp { width: 105px; margin: 42px auto 30px; padding: 9px; border: 2px solid rgba(127,62,49,.5); border-radius: 50%; color: rgba(127,62,49,.63); font-family: var(--serif); font-size: 16px; text-align: center; transform: rotate(-8deg); }
.diary-stamp span { font-family: var(--mono); font-size: 5px; letter-spacing: .08em; }
.diary-conditions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.diary-conditions div { min-width: 0; }
.diary-conditions dt { color: #8b7d63; font-size: 8px; }
.diary-conditions dd { margin: 2px 0 0; font-family: var(--serif); font-size: 13px; }
.diary-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 35px; }
.diary-tags span { padding: 2px 7px; border: 1px solid #b8a989; border-radius: 2px; color: #756950; font-size: 8px; }
.page-number { position: absolute; right: 22px; top: 15px; margin: 0; color: #9b8d71; font-family: var(--mono); font-size: 8px; }
.diary-text-page h2 { margin: 0 0 16px; font-family: var(--serif); font-size: 31px; font-weight: 600; line-height: 1.4; }
.diary-excerpt { margin: 0 0 25px; padding-bottom: 20px; border-bottom: 1px solid rgba(131,104,64,.25); color: #7b6d55; font-family: var(--serif); font-size: 14px; }
.diary-content { font-family: var(--serif); font-size: 15px; line-height: 1.93; }
.diary-content p { margin: 0 0 18px; white-space: pre-wrap; overflow-wrap: anywhere; }
.handwritten-sign { display: block; margin-top: 30px; color: #6d624e; font-family: var(--serif); font-size: 14px; font-style: italic; text-align: right; transform: rotate(-3deg); }
.diary-navigation { flex: 0 0 45px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-top: 1px solid #5d4b34; background: linear-gradient(#b5a17c, #8b7554); }
.diary-navigation > span { color: #4f4432; font-family: var(--mono); font-size: 9px; }
.embossed-button { padding: 5px 13px; border: 1px solid #635b4c; border-radius: 4px; color: #3f3b31; background: linear-gradient(#eee7d5, #b7ad97); box-shadow: inset 0 1px #fff, 0 1px 2px rgba(0,0,0,.3); font-size: 10px; cursor: pointer; }
.embossed-button:active { background: linear-gradient(#aaa18d, #d6cebb); box-shadow: inset 0 1px 3px rgba(0,0,0,.25); }
.embossed-button:disabled { opacity: .45; cursor: default; }

/* Folder, identity, and letter */
.folder-content { position: relative; min-height: 420px; overflow-y: auto; padding: 36px 30px 30px; background: linear-gradient(120deg, #c6a75f, #e0c77f 45%, #b99a53); box-shadow: inset 0 5px 8px rgba(86,58,15,.22); }
.folder-tab { position: absolute; left: 24px; top: 0; padding: 5px 20px; color: #685425; background: #d5ba73; font-family: var(--mono); font-size: 8px; letter-spacing: .12em; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.project-card { position: relative; min-height: 150px; padding: 24px; border: 1px solid #a49473; border-radius: 2px; background: repeating-linear-gradient(0deg, transparent 0 23px, rgba(92,118,125,.1) 24px), #f0e6ca; box-shadow: 2px 4px 6px rgba(77,55,19,.25), inset 0 0 20px rgba(110,83,35,.06); }
.project-card:nth-child(2n) { transform: rotate(.7deg); } .project-card:nth-child(2n+1) { transform: rotate(-.4deg); }
.project-card h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 21px; }
.project-card p { margin: 0; color: #736851; font-size: 11px; }
.project-card .diary-tags { margin-top: 15px; }
.project-card-links { display: flex; gap: 12px; margin-top: 20px; }
.project-card-links a { color: #6a4e25; border-bottom: 1px solid #a38c5e; font-size: 10px; text-decoration: none; }
.paper-empty { grid-column: 1 / -1; padding: 80px 20px; color: #6f5e3c; text-align: center; font-family: var(--serif); }
.about-content { min-height: 440px; display: grid; grid-template-columns: 250px 1fr; gap: 30px; padding: 32px; overflow-y: auto; background: linear-gradient(110deg, #6a4c30, #8c6b46); }
.identity-card { align-self: start; padding: 15px 15px 22px; border: 1px solid #817960; border-radius: 8px; background: linear-gradient(135deg, #e8e0c9, #bfb69c); box-shadow: 3px 5px 8px rgba(31,19,8,.4), inset 0 1px #fff; text-align: center; }
.id-card-header { padding-bottom: 10px; border-bottom: 1px solid #a89e83; color: #756d5a; font-family: var(--mono); font-size: 7px; letter-spacing: .15em; }
.portrait-frame { width: 105px; height: 120px; display: grid; place-items: center; margin: 20px auto 15px; border: 7px solid #e9e2d0; background: radial-gradient(circle at 50% 30%, #7c8979, #3f5143); box-shadow: 0 0 0 1px #8c846f, 1px 2px 3px rgba(0,0,0,.25); color: #e9e0c8; font-family: var(--serif); font-size: 62px; overflow: hidden; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.identity-card h3 { margin: 0; font-family: var(--serif); font-size: 23px; }
.identity-card p { margin: 5px 0; color: #766c57; font-size: 10px; }
.id-barcode { height: 23px; margin: 20px 12px 0; background: repeating-linear-gradient(90deg, #5c5749 0 2px, transparent 2px 4px, #5c5749 4px 5px, transparent 5px 8px); opacity: .6; }
.about-paper { padding: 28px 34px; background: repeating-linear-gradient(0deg, transparent 0 27px, rgba(92,118,125,.1) 28px), #eee4c8; box-shadow: 2px 4px 7px rgba(38,23,9,.35); }
.about-paper h3 { margin: 0 0 20px; font-family: var(--serif); font-size: 27px; }
.about-paper #about-text { font-family: var(--serif); font-size: 14px; line-height: 1.9; }
.about-paper #about-text p { margin: 0 0 13px; }
.about-paper dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 25px; padding-top: 18px; border-top: 1px solid #c0b293; }
.about-paper dt { color: #897b60; font-size: 8px; } .about-paper dd { margin: 2px 0 0; font-size: 11px; overflow-wrap: anywhere; }
.profile-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.profile-links a { color: #6b512d; font-size: 10px; }
.letter-paper { min-height: 480px; padding: 32px 45px; overflow-y: auto; color: #423c30; background: repeating-linear-gradient(0deg, transparent 0 31px, rgba(86,110,120,.14) 32px), #eee4c9; box-shadow: inset 0 0 30px rgba(111,82,34,.08); }
.letter-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; font-family: var(--serif); font-size: 20px; }
.letter-heading a { color: #7d6844; font-family: var(--sans); font-size: 9px; }
.letter-row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.letter-paper label { display: flex; flex-direction: column; gap: 4px; color: #82745a; font-size: 9px; }
.letter-paper input, .letter-paper textarea { width: 100%; border: 0; border-bottom: 1px solid #a99b7c; border-radius: 0; outline: 0; background: transparent; color: #3d382e; padding: 8px 2px; font-family: var(--serif); font-size: 14px; resize: vertical; }
.letter-paper input:focus, .letter-paper textarea:focus { border-color: #7e4b35; box-shadow: 0 1px #7e4b35; }
.letter-message { margin-top: 26px; }
.letter-footer { display: flex; align-items: center; justify-content: space-between; min-height: 85px; margin-top: 20px; }
.letter-footer p { margin: 0; color: #73644b; font-size: 11px; }
.wax-button { width: 62px; height: 62px; border: 2px solid #56291f; border-radius: 50%; background: radial-gradient(circle at 35% 25%, #aa6251, #7e3f32 55%, #4d241c 80%); box-shadow: inset 0 2px 3px rgba(255,190,150,.35), 2px 4px 5px rgba(56,35,17,.4); color: #e6b8a1; font-family: var(--serif); cursor: pointer; }
.wax-button span { display: grid; place-items: center; width: 45px; height: 45px; margin: auto; border: 1px solid rgba(235,178,151,.35); border-radius: 50%; }
.wax-button:active { transform: translateY(2px); box-shadow: inset 0 3px 5px rgba(50,15,8,.5); }
.wax-button:disabled { opacity: .55; cursor: wait; }
.hp-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.toast { position: fixed; z-index: 300; left: 50%; bottom: 100px; transform: translateX(-50%); padding: 9px 16px; border: 1px solid #8f8672; border-radius: 5px; background: linear-gradient(#f0e8d5, #c7bda5); box-shadow: 0 5px 15px rgba(0,0,0,.4); color: #403b31; font-size: 11px; }
.noscript-note { position: fixed; z-index: 400; inset: auto 20px 20px; padding: 12px; background: #eee4ca; color: #322d25; text-align: center; }

@media (max-width: 1120px) {
  .bookshelf-wrap { width: min(650px, calc(100vw - 300px)); min-width: 500px; margin-left: 130px; }
  .welcome-note { right: 22px; width: 185px; }
  .desk-accessories { right: 28px; transform: scale(.85); transform-origin: bottom right; }
}
@media (max-width: 900px) {
  .welcome-note { display: none; }
  .bookshelf-wrap { width: min(650px, calc(100vw - 180px)); min-width: 0; margin-inline: 110px 25px; }
  .desk-accessories { display: none; }
  .open-book { grid-template-columns: .6fr 1.4fr; padding: 15px; }
  .paper-page { padding: 35px 28px; }
}
@media (max-width: 680px) {
  .system-bar { grid-template-columns: 1fr auto; height: 42px; padding: 0 10px; }
  .system-center, .system-brand > span:last-child, .lamp-toggle span:last-child { display: none; }
  .system-actions { gap: 5px; }
  .metal-button { padding-inline: 8px; }
  .desktop { min-height: calc(100dvh - 42px); padding: 90px 10px 105px; overflow-y: auto; }
  .desktop-icons { left: 0; right: 0; top: 13px; flex-direction: row; justify-content: center; gap: 18px; }
  .desktop-icon { width: 67px; gap: 4px; }
  .icon-image { width: 45px; height: 45px; }
  .folder-icon { width: 50px; height: 38px; margin-top: 5px; }
  .id-icon { width: 42px; height: 45px; }
  .id-head { width: 13px; height: 13px; left: 7px; top: 8px; }
  .id-body { width: 21px; height: 13px; left: 4px; top: 24px; }
  .id-icon b { right: 5px; top: 10px; width: 12px; height: 2px; box-shadow: 0 6px #8d846e, 0 12px #8d846e, 0 18px #8d846e; }
  .mail-icon { width: 49px; height: 35px; margin-top: 7px; }
  .mail-icon i { left: 10px; top: -20px; width: 28px; height: 28px; }
  .icon-label { font-size: 9px; }
  .bookshelf-wrap { width: calc(100vw - 26px); margin: 0 auto; }
  .shelf-crown { height: 55px; }
  .books-row { height: 190px; padding-inline: 12px; }
  .diary-book { --book-height: 151px; --book-width: 39px; }
  .lower-shelf { height: 105px; gap: 18px; padding-inline: 20px; transform-origin: center bottom; }
  .bookend { display: none; }
  .desk-tip { bottom: 86px; font-size: 9px; }
  .dock { position: fixed; bottom: max(10px, env(safe-area-inset-bottom)); gap: 5px; padding-inline: 9px; }
  .dock button, .dock a { width: 45px; }
  .dock button > img, .dock button > span:first-child, .dock a > span:first-child { width: 37px; height: 37px; }
  .dock-person::before { left: 11px; top: 6px; width: 12px; height: 12px; box-shadow: 0 13px 0 3px #5a6b5d; }
  .dock-mail::before { left: 5px; top: 5px; width: 24px; height: 24px; }
  .window-layer { inset: 42px 0 0; }
  .os-window { top: 8px; width: calc(100vw - 16px); max-height: calc(100dvh - 58px); border-radius: 6px; }
  .window-titlebar { grid-template-columns: 75px 1fr 75px; padding-inline: 9px; }
  .window-toolbar-text { font-size: 6px; }
  .library-content { min-height: 0; grid-template-columns: 1fr; }
  .library-sidebar { display: none; }
  .library-main { padding: 15px; max-height: calc(100dvh - 135px); }
  .diary-list-item { grid-template-columns: 30px 1fr; }
  .diary-list-item time { display: none; }
  .open-book { display: block; overflow-y: auto; padding: 10px; }
  .open-book::after, .diary-meta-page { display: none; }
  .paper-page { min-height: 0; max-height: none; overflow: visible; padding: 40px 27px; }
  .diary-text-page h2 { font-size: 27px; }
  .diary-navigation { flex-basis: 42px; padding-inline: 10px; }
  .folder-content { min-height: 0; max-height: calc(100dvh - 130px); padding: 35px 18px 20px; }
  .project-grid { grid-template-columns: 1fr; }
  .about-content { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
  .identity-card { width: min(240px, 100%); margin: auto; }
  .portrait-frame { width: 80px; height: 90px; font-size: 45px; }
  .about-paper { padding: 25px; }
  .letter-paper { min-height: 0; padding: 28px 23px; }
  .letter-row { grid-template-columns: 1fr; gap: 20px; }
  .letter-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
