/* My Little Desktop — app and widget styles (uses tokens from os.css) */
.col { display: flex; flex-direction: column; min-height: 0; }
.small { font-size: 12px; }
.tnum { font-variant-numeric: tabular-nums; }
.card { background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: 0 2px 0 var(--ivory); min-width: 0; }
.card h4 { margin: 0 0 8px; font: 19px var(--f-hand); color: var(--a2); }
.chip { display: block; font-size: 11px; line-height: 1.3; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--c, var(--a)) 18%, #fff); border-left: 3px solid var(--c, var(--a)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; color: var(--ink); }
.chip-plan { --c: var(--star); }
.progress { height: 12px; border-radius: 99px; background: var(--ivory); border: 1px solid var(--line); overflow: hidden; margin: 6px 0; }
.progress i { display: block; height: 100%; border-radius: 99px; background: repeating-linear-gradient(-45deg, var(--a) 0 8px, color-mix(in srgb, var(--a) 70%, #fff) 8px 16px); transition: width .3s; }
.paper-note { background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 6px 10px; font-size: 16px; margin: 0 4px; transform: rotate(-1.2deg); box-shadow: 0 2px 4px rgba(60, 25, 20, .1); }
.paper-note p { margin: 2px 0; color: var(--a2); }
.link-btn { border: 0; background: none; color: var(--a2); font-weight: 700; cursor: pointer; padding: 2px 0; font-size: 12px; text-decoration: underline; text-underline-offset: 2px; }

/* checkbox */
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; position: relative; }
.check input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; cursor: pointer; }
.check .box { width: 20px; height: 20px; flex: none; border: 2px solid var(--a); border-radius: 5px; background: #fff; display: grid; place-items: center; }
.check input:checked + .box { background: var(--a); }
.check input:checked + .box::after { content: ''; width: 10px; height: 5px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.check input:focus-visible + .box { outline: 3px solid var(--star); outline-offset: 2px; }

/* toggle switch */
.toggle-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; margin-bottom: 10px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; position: relative; }
.toggle input { position: absolute; opacity: 0; width: 40px; height: 22px; margin: 0; cursor: pointer; }
.toggle .sw { width: 40px; height: 22px; border-radius: 99px; background: var(--line); position: relative; transition: background .2s; flex: none; }
.toggle .sw::after { content: ''; position: absolute; left: 2px; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); transition: transform .2s; }
.toggle input:checked + .sw { background: var(--a); }
.toggle input:checked + .sw::after { transform: translateX(18px); }
.toggle input:focus-visible + .sw { outline: 3px solid var(--star); outline-offset: 2px; }
.mini-toggle { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 10px; cursor: pointer; font-size: 12px; font-weight: 700; color: var(--ink-soft); }
.mini-toggle.on { background: var(--a3); color: var(--a2); border-color: var(--a); }
.cdot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.cdot[aria-checked="true"] { box-shadow: 0 0 0 3px var(--ink); }
.color-pick, .swatch-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ---------- Mini calendar ---------- */
.minical { background: #fff; border: 2px solid var(--a3); border-radius: 14px; padding: 6px; }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 2px 4px; }
.mc-head strong { font: 17px var(--f-hand); color: var(--a2); }
.mc-nav { border: 0; background: var(--a4); color: var(--a2); width: 24px; height: 24px; border-radius: 50%; cursor: pointer; font-size: 16px; line-height: 1; }
.mc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; text-align: center; }
.mc-wd { font-size: 10px; font-weight: 800; color: var(--ink-soft); }
.mc-day { border: 0; background: none; font-size: 12px; padding: 3px 0; border-radius: 50%; cursor: pointer; aspect-ratio: 1; display: grid; place-items: center; font-variant-numeric: tabular-nums; position: relative; }
.mc-day:hover { background: var(--a4); }
.mc-day.out { color: #c9b5a0; }
.mc-day.marked::after { content: ''; position: absolute; bottom: 2px; width: 4px; height: 4px; border-radius: 50%; background: var(--leaf); }
.mc-day.sel { background: var(--a3); }
.mc-day.today { background: var(--a); color: var(--on-a); font-weight: 800; border-radius: 40% 40% 50% 50%; }

/* ---------- Planner & Calendar ---------- */
.planner-main { display: flex; flex-direction: column; gap: 10px; }
.pl-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.pl-head h3 { margin: 0; font-size: 22px; color: var(--a2); min-width: 0; text-wrap: balance; }
.pl-grid, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 2px solid var(--a3); border-radius: 12px; overflow: hidden; background: var(--a3); gap: 1px; }
.pl-wd { background: var(--a4); text-align: center; font: 15px var(--f-hand); color: var(--a2); padding: 2px 0; }
.pl-cell, .cal-cell { background: #fff; border: 0; min-height: 64px; padding: 3px 4px; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px; min-width: 0; position: relative; }
.pl-cell:hover, .cal-cell:hover { background: var(--a4); }
.pl-cell.out, .cal-cell.out { background: #fcf8f2; color: #c4ad96; }
.pl-cell.sel, .cal-cell.sel { box-shadow: inset 0 0 0 2px var(--a); }
.pl-num { font: 16px var(--f-hand); font-variant-numeric: tabular-nums; }
.today .pl-num { background: var(--a); color: var(--on-a); width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50% 50% 45% 45%; }
.pl-items { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.more { font-size: 10px; color: var(--ink-soft); }
.pl-week { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.wk-day { background: #fff; border: 2px solid var(--line); border-radius: 12px; padding: 8px; text-align: left; cursor: pointer; min-height: 110px; display: flex; flex-direction: column; gap: 4px; }
.wk-day:hover { border-color: var(--a); }
.wk-day.today { border-color: var(--a); background: var(--a4); }
.wk-day strong { font-size: 17px; color: var(--a2); }
.wk-day ul { margin: 0; padding: 0; list-style: none; font-size: 12px; display: flex; flex-direction: column; gap: 2px; }
.wk-ev { border-left: 3px solid var(--c); padding-left: 4px; }
.wk-pr { color: var(--a2); }
.pl-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.prio { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.prio-n { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--a); color: var(--on-a); font: 15px var(--f-hand); }
.appt-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.appt-list li { display: flex; gap: 6px; align-items: center; }
.appt-list input[type=time] { width: 112px; flex: none; }
.from-cal { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; }
textarea.lined { background-color: #fff; background-image: linear-gradient(transparent 23px, var(--a3) 24px); background-size: 100% 24px; line-height: 24px; padding-top: 0; font: 18px/24px var(--f-hand); color: var(--ink); }
.tl-head { display: flex; align-items: baseline; gap: 10px; justify-content: space-between; }
.tl-head h3 { margin: 0; font-size: 22px; color: var(--a2); }
.tl-add { margin: 8px 0; }
.tasklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tasklist li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 10px; background: #fff; border: 1px solid var(--ivory); }
.tasklist li.done .tl-text { text-decoration: line-through; color: var(--ink-soft); }
.tl-text { flex: 1; min-width: 0; border: 0; background: none; font: 18px var(--f-hand); color: var(--ink); padding: 2px 4px; border-radius: 6px; }
.tl-text:focus { outline: 2px solid var(--a3); }
.due { font-size: 11px; font-weight: 700; color: var(--ink-soft); background: var(--ivory); border-radius: 6px; padding: 1px 6px; }
.due.late { color: #fff; background: var(--danger); }
.cal-app .main { padding-right: 8px; }
.cal-side { width: 230px; flex: none; overflow-y: auto; padding: 12px; background: linear-gradient(var(--a4), var(--cream)); border-left: 2px dashed var(--a3); display: flex; flex-direction: column; gap: 8px; }
.cal-side h3 { margin: 0; font-size: 20px; color: var(--a2); }
.ev-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ev-item { width: 100%; display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: center; text-align: left; padding: 6px 8px; border: 0; border-left: 5px solid var(--c); border-radius: 8px; background: #fff; cursor: pointer; box-shadow: 0 1px 2px rgba(60, 25, 20, .12); }
.ev-time { font-size: 11px; font-weight: 800; color: var(--ink-soft); white-space: nowrap; }
.ev-title { font: 17px var(--f-hand); min-width: 0; overflow-wrap: anywhere; }
.bell { width: 14px; height: 14px; background: var(--a2); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a6 6 0 0 0-6 6v4l-2 4h16l-2-4V8a6 6 0 0 0-6-6zm-2 17a2 2 0 0 0 4 0z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a6 6 0 0 0-6 6v4l-2 4h16l-2-4V8a6 6 0 0 0-6-6zm-2 17a2 2 0 0 0 4 0z'/%3E%3C/svg%3E") center/contain no-repeat; }
.ev-form { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 12px; }
.ev-form label { display: flex; flex-direction: column; gap: 3px; }
.lbl { font-weight: 700; }
.notif-btn { align-self: flex-start; }
.compact .cal-app { flex-direction: column; }
.compact .cal-side { width: auto; border-left: 0; border-top: 2px dashed var(--a3); }

/* ---------- Notes & Diary ---------- */
.notes-app .side { width: 160px; }
.note-col { width: 200px; flex: none; display: flex; flex-direction: column; border-right: 2px dashed var(--a3); background: #fffaf2; min-height: 0; }
.note-search { padding: 8px; }
.note-list { list-style: none; margin: 0; padding: 0 6px 8px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.note-item { width: 100%; text-align: left; display: flex; flex-direction: column; gap: 1px; padding: 6px 8px; border: 1px solid var(--ivory); border-radius: 10px; background: #fff; cursor: pointer; }
.note-item strong { font: 17px var(--f-hand); color: var(--a2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item span { font-size: 12px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item small { font-size: 10px; color: #b39a85; }
.note-item.sel { border-color: var(--a); background: var(--a4); }
.note-edit, .diary-edit { display: flex; flex-direction: column; gap: 8px; }
.note-title, .diary-title { font: 22px var(--f-hand); color: var(--a2); }
.paper-wrap { flex: 1; min-height: 180px; position: relative; display: flex; border-radius: 12px; border: 2px solid var(--line); overflow: hidden;
  background: #fffef9; box-shadow: 0 3px 0 var(--ivory); }
.paper-wrap::before { content: ''; width: 34px; flex: none; border-right: 2px solid color-mix(in srgb, var(--a) 40%, transparent);
  background: radial-gradient(circle at 16px 18px, var(--ivory) 6px, transparent 7px) 0 0/34px 36px repeat-y; }
.note-paper { flex: 1; border: 0; resize: none; padding: 0 12px; outline: none; background: linear-gradient(transparent 27px, color-mix(in srgb, var(--a) 22%, transparent) 28px) 0 0/100% 28px; color: var(--ink); min-height: 100%; }
.note-paper.font-hand { font: 20px/28px var(--f-hand); }
.note-paper.font-round { font: 15px/28px var(--f-body); }
.note-paper.font-type { font: 15px/28px 'Courier New', Courier, monospace; }
.note-tools .field { min-width: 0; }
.diary-side { width: 210px; }
.otd { background: #fff; border: 2px dashed var(--a); border-radius: 12px; padding: 4px; margin-bottom: 6px; }
.moods { display: flex; gap: 4px; flex-wrap: wrap; }
.mood { border: 2px solid color-mix(in srgb, var(--c) 50%, #fff); background: #fff; border-radius: 99px; padding: 2px 10px; font: 15px var(--f-hand); cursor: pointer; color: var(--ink); }
.mood[aria-checked="true"] { background: var(--c); color: #fff; border-color: var(--c); }
.compact .notes-app .note-col { width: auto; max-height: 30%; border-right: 0; border-bottom: 2px dashed var(--a3); }
.compact .notes-app .side, .compact .diary-side { width: auto; }

/* ---------- Photos ---------- */
.photos-main.drop, .playlist.drop { outline: 3px dashed var(--a); outline-offset: -8px; background: var(--a4); }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(var(--ts, 140px), 1fr)); gap: 10px; }
.ptile { position: relative; padding: 6px 6px 18px; background: #fff; border: 0; border-radius: 4px; box-shadow: 0 2px 6px rgba(60, 25, 20, .2); cursor: pointer; transition: transform .15s; aspect-ratio: 1 / 1.1; }
.ptile:nth-child(3n+1) { transform: rotate(-1.2deg); } .ptile:nth-child(3n+2) { transform: rotate(.9deg); }
.ptile:hover { transform: rotate(0) scale(1.03); z-index: 1; }
.ptile img { width: 100%; height: 100%; object-fit: cover; background: var(--ivory); display: block; }
.fav-heart { position: absolute; right: 8px; top: 8px; width: 20px; height: 20px; background: var(--a); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 5.8-8 11-8 11z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-8-5.2-8-11a4.5 4.5 0 0 1 8-2.8A4.5 4.5 0 0 1 20 10c0 5.8-8 11-8 11z'/%3E%3C/svg%3E") center/contain no-repeat; filter: drop-shadow(0 0 1px #fff); }
.album-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.album-card { border: 0; background: none; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.album-cover { width: 100%; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 6px solid #fff; box-shadow: 4px 4px 0 var(--a3), 0 3px 8px rgba(60, 25, 20, .2); background: var(--a4); }
.album-cover img { width: 100%; height: 100%; object-fit: cover; }
.album-empty { display: block; width: 100%; height: 100%; background: var(--apple-svg) center/40% no-repeat; opacity: .5; }
.album-card strong { font-size: 18px; }
.memories h3 { font-size: 22px; color: var(--a2); margin: 14px 0 8px; }
.memories h3:first-child { margin-top: 0; }
.lightbox { position: absolute; inset: 0; z-index: 20; background: rgba(40, 24, 20, .92); display: flex; flex-direction: column; color: #fff; outline: none; }
.lb-top, .lb-bottom { display: flex; align-items: center; gap: 6px; padding: 8px 10px; flex-wrap: wrap; }
.lb-stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 8px; }
.lb-img { max-width: calc(100% - 100px); max-height: 100%; object-fit: contain; border: 6px solid #fff; border-radius: 4px; box-shadow: 0 8px 24px rgba(0, 0, 0, .5); background: #fff; }
.lb-nav { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .9); color: var(--a2); font-size: 26px; line-height: 1; cursor: pointer; flex: none; }
.drop-hint { border: 3px dashed var(--a3); border-radius: 16px; }

/* ---------- Music ---------- */
.music-app { display: flex; height: 100%; min-height: 0; }
.cd-player { width: 260px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px; background: linear-gradient(var(--a4), var(--cream)); border-right: 2px dashed var(--a3); overflow-y: auto; }
.cd { width: 150px; height: 150px; border-radius: 50%; flex: none; position: relative; box-shadow: 0 6px 14px rgba(60, 25, 20, .3);
  background: radial-gradient(circle, #fff 0 9%, #ddd 9.5% 11%, transparent 11.5%), conic-gradient(from 20deg, #e9e9ee, #fff, #cfd6e2, #f5e7f0, #fff, #d9e6d0, #e9e9ee); }
.cd-label { position: absolute; inset: 26%; border-radius: 50%; background: radial-gradient(circle, #fff 0 22%, transparent 23%), var(--apple-svg) center/58% no-repeat, var(--a3); }
.cd.spin, .wm-cover.spin { animation: spin 3s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.np { text-align: center; display: flex; flex-direction: column; min-width: 0; max-width: 100%; }
.np-title { font-size: 21px; color: var(--a2); overflow-wrap: anywhere; }
.seekrow { width: 100%; flex-wrap: nowrap; }
.seek { flex: 1; min-width: 0; accent-color: var(--a); }
.vol input, .settings input[type=range] { accent-color: var(--a); }
.pctrls { justify-content: center; }
.pbtn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--a2); cursor: pointer; position: relative; padding: 0;
  background: linear-gradient(color-mix(in srgb, var(--a) 50%, #fff), var(--a) 55%, var(--a2)); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 2px 3px rgba(60, 25, 20, .25); }
.pbtn.play { width: 46px; height: 46px; }
.pbtn.sm { width: 28px; height: 28px; } .pbtn.play.sm { width: 32px; height: 32px; }
.pbtn::before { content: ''; position: absolute; inset: 28%; background: var(--on-a); -webkit-mask: var(--g) center/contain no-repeat; mask: var(--g) center/contain no-repeat; }
.pbtn.play { --g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 4l14 8-14 8z'/%3E%3C/svg%3E"); }
.pbtn.play.playing { --g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='4' width='5' height='16' rx='1.5'/%3E%3Crect x='14' y='4' width='5' height='16' rx='1.5'/%3E%3C/svg%3E"); }
.pbtn.prev { --g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4L9 12l11 8zM4 4h3v16H4z'/%3E%3C/svg%3E"); }
.pbtn.next { --g: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4l11 8-11 8zM17 4h3v16h-3z'/%3E%3C/svg%3E"); }
.playlist { flex: 1; min-width: 0; overflow-y: auto; }
.tracks { margin: 0; padding: 6px 10px; list-style: none; display: flex; flex-direction: column; gap: 4px; counter-reset: tr; }
.tracks li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 10px; background: #fff; border: 1px solid var(--ivory); counter-increment: tr; }
.tracks li::before { content: counter(tr); width: 22px; text-align: center; font: 15px var(--f-hand); color: var(--ink-soft); }
.tracks li.cur { border-color: var(--a); background: var(--a4); }
.track-play { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; border: 0; background: none; cursor: pointer; padding: 2px; }
.tt { font: 17px var(--f-hand); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.compact .music-app { flex-direction: column; overflow-y: auto; }
.compact .cd-player { width: auto; border-right: 0; border-bottom: 2px dashed var(--a3); overflow: visible; }
.compact .cd { width: 110px; height: 110px; }
.compact .playlist { overflow: visible; }

/* ---------- My Computer, Folders, Recycle Bin ---------- */
.computer h3 { font-size: 20px; color: var(--a2); margin: 14px 0 6px; }
.drive { display: flex; align-items: center; gap: 12px; background: #fff; border: 2px solid var(--line); border-radius: 14px; padding: 10px 12px; flex-wrap: wrap; }
.drive img { width: 52px; }
.drive strong { font-size: 19px; }
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.lib { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border: 2px solid transparent; background: #fff; border-radius: 12px; cursor: pointer; text-align: left; box-shadow: 0 1px 3px rgba(60, 25, 20, .12); }
.lib:hover { border-color: var(--a3); }
.lib img { width: 40px; height: 40px; object-fit: contain; flex: none; }
.lib span { display: flex; flex-direction: column; min-width: 0; }
.lib strong { font: 17px var(--f-hand); }
.tiny { width: 20px; height: 20px; object-fit: contain; }
.crumbs { font: 17px var(--f-hand); color: var(--ink-soft); margin-bottom: 10px; }
.crumb { border: 0; background: none; font: inherit; color: var(--a2); cursor: pointer; padding: 0 2px; text-decoration: underline; text-underline-offset: 3px; }
.file-grid { list-style: none; margin: 0 0 10px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.file { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border: 2px solid transparent; border-radius: 12px; background: none; cursor: pointer; }
.file img { width: 54px; height: 54px; object-fit: contain; }
.file span { font: 15px/1.15 var(--f-hand); text-align: center; overflow-wrap: anywhere; }
.file:hover { background: var(--a4); }
.file.sel { border-color: var(--a); background: var(--a3); }
.doc-edit { display: flex; flex-direction: column; gap: 8px; }
.doc-area { flex: 1; min-height: 220px; font: 14px/1.6 var(--f-body); }
.bin-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.bin-list li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; background: #fff; border: 1px solid var(--ivory); border-radius: 12px; flex-wrap: wrap; }
.bin-list img { width: 34px; height: 34px; object-fit: contain; }
.bin-list .grow { display: flex; flex-direction: column; }

/* ---------- Paint ---------- */
.paint-app { display: flex; flex-direction: column; height: 100%; }
.paint-tools { gap: 6px; }
.color-in { width: 30px; height: 28px; border: 0; padding: 0; background: none; cursor: pointer; }
.paint-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 10px; background: repeating-conic-gradient(var(--ivory) 0 25%, var(--cream) 0 50%) 0 0/24px 24px; overflow: hidden; }
.paint-canvas { max-width: 100%; max-height: 100%; aspect-ratio: 1000 / 680; background: #fffdf7; border-radius: 6px; box-shadow: 0 4px 14px rgba(60, 25, 20, .25); cursor: crosshair; touch-action: none; }

/* ---------- Settings ---------- */
.set-h { font: 21px var(--f-hand); color: var(--a2); margin: 4px 0 6px; }
.set-h:not(:first-child) { margin-top: 18px; }
.theme-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.theme-card, .wall-card { border: 3px solid transparent; background: #fff; border-radius: 14px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; box-shadow: 0 1px 4px rgba(60, 25, 20, .15); }
.theme-card img { width: 80px; }
.theme-card span { font-size: 16px; }
.theme-card[aria-checked="true"], .wall-card[aria-checked="true"] { border-color: var(--a); background: var(--a4); }
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.wall-card span:last-child { font-size: 12px; font-weight: 700; text-align: center; }
.wall-prev { width: 100%; aspect-ratio: 16 / 10; border-radius: 8px; background-size: cover; background-position: center; border: 1px solid var(--line); }
.about { display: flex; align-items: center; gap: 14px; }
.about-list { line-height: 1.8; }

/* ---------- Widgets ---------- */
.widget { position: absolute; width: 210px; background: var(--cream); border: 3px solid var(--a); border-radius: 16px; box-shadow: 0 8px 18px rgba(60, 25, 20, .25); overflow: visible; }
.widget.dragging { opacity: .9; box-shadow: 0 14px 28px rgba(60, 25, 20, .35); z-index: 5; }
.wg-grip { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 6px 3px 10px; border-radius: 12px 12px 0 0; cursor: grab; touch-action: none; color: var(--on-a);
  background: linear-gradient(color-mix(in srgb, var(--a) 55%, #fff), var(--a) 55%, var(--a2)); }
.wg-name { font: 16px/1.2 var(--f-hand); }
.wg-x { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .9); padding: 0; cursor: pointer; background: radial-gradient(circle at 40% 30%, #fff, #f3e2d2); position: relative; }
.wg-x::before { content: ''; position: absolute; inset: 0; background: var(--a2); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3l-6 6' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/11px no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M3 3l6 6M9 3l-6 6' stroke='black' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center/11px no-repeat; }
.wg-body { padding: 8px 10px 10px; }
.wg-clock { width: 250px; }
.wg-clock .wg-body { padding: 8px; }
.gingham-frame { position: relative; padding: 10px; border-radius: 10px; background-color: #fff; background-image: linear-gradient(90deg, color-mix(in srgb, var(--a) 55%, transparent) 50%, transparent 50%), linear-gradient(color-mix(in srgb, var(--a) 55%, transparent) 50%, transparent 50%); background-size: 12px 12px; }
.wc-card { background: var(--cream); border-radius: 6px; padding: 6px 10px 8px; text-align: center; border: 2px dashed var(--a3); }
.wc-day { font: 19px var(--f-hand); color: var(--a2); }
.wc-time { font: 44px/1 var(--f-hand); color: var(--a); letter-spacing: 1px; }
.wc-date { font: 15px var(--f-hand); color: var(--ink-soft); }
.wg-bow { position: absolute; right: -10px; top: -14px; width: 54px; height: 32px; background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .9) 0 4px, transparent 4px 8px), repeating-linear-gradient(0deg, rgba(255, 255, 255, .9) 0 4px, transparent 4px 8px), var(--a);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 28'%3E%3Cpath d='M23 12 C16 2 4 2 3 9 C2 16 12 18 21 14 L14 27 L19 26 L23 16 L27 26 L32 27 L25 14 C34 18 44 16 43 9 C42 2 30 2 23 12Z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 28'%3E%3Cpath d='M23 12 C16 2 4 2 3 9 C2 16 12 18 21 14 L14 27 L19 26 L23 16 L27 26 L32 27 L25 14 C34 18 44 16 43 9 C42 2 30 2 23 12Z'/%3E%3C/svg%3E") center/contain no-repeat; filter: drop-shadow(0 1px 1px rgba(0,0,0,.3)); }
.wg-apple { position: absolute; left: -14px; bottom: -12px; width: 40px; height: 40px; background: var(--apple-svg) center/contain no-repeat; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.wg-calendar { width: 200px; }
.wg-calendar .minical { border: 0; padding: 0; }
.wg-calendar .mc-day { font-size: 11px; padding: 1px 0; }
.wt-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.wt-text { font: 17px/1.1 var(--f-hand); }
.wt-list li.done .wt-text { text-decoration: line-through; color: var(--ink-soft); }
.wt-add { width: 100%; margin: 6px 0 2px; border: 0; border-bottom: 2px dashed var(--a3); background: transparent; font: 16px var(--f-hand); color: var(--ink); padding: 2px; }
.wt-add:focus { outline: none; border-bottom-color: var(--a); }
.wg-music { width: 250px; }
.wm { display: flex; gap: 10px; align-items: center; }
.wm-cover { width: 64px; height: 64px; border-radius: 50%; flex: none; background: radial-gradient(circle, #fff 0 10%, var(--a3) 11% 30%, transparent 31%), conic-gradient(#e9e9ee, #fff, #cfd6e2, #f5e7f0, #fff, #d9e6d0, #e9e9ee); box-shadow: 0 2px 6px rgba(60, 25, 20, .3); }
.wm-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.wm-info strong { font-size: 17px; color: var(--a2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wm-bar { height: 5px; border-radius: 9px; background: var(--ivory); overflow: hidden; margin: 2px 0; }
.wm-bar i { display: block; height: 100%; background: var(--a); }
.wm-ctrls { display: flex; align-items: center; gap: 6px; }
.wg-sticky { width: 180px; background: #fff7c9; border-color: var(--star); transform: rotate(-2deg); }
.wg-sticky .wg-grip { background: linear-gradient(#fbe590, var(--star)); color: #6b4a07; }
.sticky-text { width: 100%; min-height: 110px; border: 0; background: transparent; resize: vertical; font: 19px/1.3 var(--f-hand); color: #6b4a07; outline: none; }
.wg-photo { width: 180px; transform: rotate(2deg); }
.polaroid { display: flex; flex-direction: column; gap: 4px; width: 100%; padding: 6px 6px 4px; border: 0; background: #fff; box-shadow: 0 2px 6px rgba(60, 25, 20, .2); cursor: pointer; }
.polaroid img, .polaroid-empty { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--a4); }
.polaroid-empty { background: var(--apple-svg) center/40% no-repeat, var(--a4); }
.polaroid .cap { font-size: 16px; color: var(--ink); }
.compact #widgetLayer { display: none; }

/* ---------- Compact (phone) adjustments ---------- */
.compact .pl-side { display: none; }
.compact .note-title { flex-basis: 100%; }
.compact { --tb-h: 52px; }
.compact #quickLaunch { display: none; }
.compact #startBtn { padding: 0 10px 0 6px; font-size: 20px; }
.compact .task span { display: none; }
.compact .task { flex: none; padding: 0 6px; }
.compact #trayClock #clockDate { display: none; }
.compact #desktopIcons { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); grid-auto-columns: auto; right: 10px; align-content: start; overflow-y: auto; }
.compact .dicon { width: 100%; }
.compact #startMenu { left: 4px; right: 4px; width: auto; }
.compact .win-title { height: 44px; }
.compact .wc { width: 30px; height: 30px; }
.compact .field, .compact .btn { min-height: 40px; font-size: 16px; }
.compact .btn-sm { min-height: 36px; }
.compact .pl-cell, .compact .cal-cell { min-height: 46px; }
.compact .pl-items .chip { font-size: 9px; }
.compact .lightbox .lb-img { max-width: 100%; }
.compact .lb-nav { position: absolute; top: 50%; }
.compact .lb-nav:first-child { left: 6px; } .compact .lb-nav:last-child { right: 6px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
