/* ============================================================
   SHANKAR XP — Windows XP (Luna) themed personal site, v4
   Gradient values match measured Luna Blue chrome.
   ============================================================ */

:root {
  --face: #ece9d8;
  --win-border: #0831d9;
  --sel: #316ac5;
  --link: #215dc6;
  font-size: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font: 11px Tahoma, "Segoe UI", Verdana, sans-serif;
  background: #000;
  overflow: hidden;
  height: 100vh;
  height: 100dvh;
  user-select: none;
}

/* XP shows the arrow over buttons & chrome; the hand is only for hyperlinks */
button { font: inherit; cursor: default; background: none; border: 0; }
a { color: inherit; }
::selection { background: #316ac5; color: #fff; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 16px; height: 16px; flex: none; vertical-align: -3px; }

/* ============ XP SCROLLBARS ============ */
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #f0f0ea; box-shadow: inset 1px 0 0 #dcdac8; }
::-webkit-scrollbar-thumb {
  border: 1px solid #7196e0; border-radius: 2px;
  background: linear-gradient(90deg, #cadefc 0%, #bad2fb 45%, #9cbdf4 100%);
  box-shadow: inset 1px 1px 0 #e6f0ff;
}
::-webkit-scrollbar-thumb:horizontal {
  background: linear-gradient(180deg, #cadefc 0%, #bad2fb 45%, #9cbdf4 100%);
}
::-webkit-scrollbar-button:single-button {
  width: 16px; height: 16px;
  border: 1px solid #7196e0; border-radius: 2px;
  background-color: #c6d8f7;
  background-repeat: no-repeat; background-position: center;
  background-image: linear-gradient(180deg, #dcE9fd, #aac7f4);
}
::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M4 0 L8 5 L0 5 Z' fill='%234d6185'/%3E%3C/svg%3E"), linear-gradient(180deg, #dce9fd, #aac7f4);
}
::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5'%3E%3Cpath d='M4 5 L8 0 L0 0 Z' fill='%234d6185'/%3E%3C/svg%3E"), linear-gradient(180deg, #dce9fd, #aac7f4);
}
::-webkit-scrollbar-corner { background: #f0f0ea; }

/* ============ BOOT ============ */
.boot {
  position: fixed; inset: 0; z-index: 400; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3.4rem; color: #fff;
  transition: opacity .4s;
}
.boot.done { opacity: 0; pointer-events: none; }
.boot__brand { text-align: center; }
.boot__flag { width: 78px; height: 78px; filter: drop-shadow(0 0 16px rgba(120,170,255,0.35)); }
.boot__corp { font-size: 15px; color: #d8d8d8; letter-spacing: 0.02em; margin-top: 0.4rem; }
.boot__corp .r { font-size: 9px; vertical-align: super; }
.boot__title { font: 700 46px "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; letter-spacing: -0.01em; line-height: 1; }
.boot__title .xp { color: #ff8c1a; font-style: italic; font-size: 30px; vertical-align: super; padding-left: 2px; }
.boot__sub { color: #9fb6d9; font-size: 10px; margin-top: 0.6rem; letter-spacing: 0.28em; text-transform: uppercase; }
.boot__bar {
  width: 200px; height: 17px; border: 1px solid #8a8a8a; border-radius: 8px;
  padding: 2px; overflow: hidden;
}
.boot__chase { display: flex; gap: 3px; height: 100%; animation: chase 1.6s linear infinite; position: relative; left: -50px; width: 45px; }
.boot__chase span { flex: 1; border-radius: 2px; background: linear-gradient(180deg, #99b9f1 0%, #3363cd 50%, #2049a8 51%, #4a77d4 100%); }
@keyframes chase { to { transform: translateX(300px); } }
.boot__foot { position: absolute; bottom: 1.3rem; left: 1.6rem; color: #8a8a8a; font-size: 11px; }

/* ============ LOGIN ============ */
.login {
  position: fixed; inset: 0; z-index: 390;
  background: linear-gradient(180deg, #00309c 0%, #3a6ea5 8%, #5a7edc 45%, #5a7edc 55%, #3a6ea5 92%, #00309c 100%);
  display: flex; flex-direction: column; justify-content: center;
  color: #fff;
}
.login__band {
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border-top: 1px solid rgba(255,255,255,0.55); border-bottom: 1px solid rgba(255,255,255,0.45);
  display: flex; align-items: center; justify-content: center;
  gap: clamp(1.5rem, 6vw, 5rem); padding: 3.6rem 1.5rem; flex-wrap: wrap;
  box-shadow: 0 -30px 60px rgba(255,255,255,0.06) inset;
}
.login__left { text-align: left; max-width: 300px; }
.login__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 1.2rem; }
.login__flag { width: 56px; height: 56px; filter: drop-shadow(2px 2px 3px rgba(0,0,30,0.4)); }
.login__word { font: 700 30px "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif; text-shadow: 2px 2px 3px rgba(0,0,30,0.4); }
.login__word b { color: #ff8c1a; font-style: italic; font-size: 20px; vertical-align: super; }
.login__left p { font-size: 16px; color: #dfe9ff; font-weight: 300; }
.login__divider { width: 1px; align-self: stretch; background: linear-gradient(180deg, transparent, #9db8ea, transparent); }
.login__user {
  display: flex; align-items: center; gap: 14px;
  color: #fff; padding: 12px 18px; border-radius: 6px; text-align: left;
  transition: background .2s;
}
.login__user:hover, .login__user:focus-visible { background: rgba(255,255,255,0.15); outline: none; }
.login__user:hover .login__avatar { box-shadow: 0 0 0 2px #ffd76e, 0 4px 14px rgba(0,0,0,0.35); }
.login__avatar {
  width: 64px; height: 64px; border-radius: 6px; border: 2px solid #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35); overflow: hidden; flex: none;
}
.login__avatar svg { width: 100%; height: 100%; display: block; }
.login__meta { display: flex; flex-direction: column; gap: 3px; }
.login__meta b { font-size: 19px; font-weight: 700; }
.login__meta i { font-style: normal; color: #cfe0ff; font-size: 12px; }
.login__footer {
  position: absolute; bottom: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.2rem 2rem; font-size: 12px; color: #cfe0ff; flex-wrap: wrap;
  background: linear-gradient(180deg, #10298c, #00309c);
  border-top: 2px solid #e79b07;
}
.login__off { cursor: pointer; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #fff; }
.login__off svg { width: 22px; height: 22px; }
.login__note { max-width: 46ch; }

/* welcome interstitial */
.welcome-flash {
  position: fixed; inset: 0; z-index: 395;
  background: linear-gradient(180deg, #00309c 0%, #3a6ea5 8%, #5a7edc 45%, #5a7edc 55%, #3a6ea5 92%, #00309c 100%);
  display: grid; place-items: center;
}
.welcome-flash span {
  color: #fff; font: italic 400 54px Georgia, "Times New Roman", serif;
  text-shadow: 2px 3px 6px rgba(0,0,30,0.5); letter-spacing: 0.01em;
  animation: wfade 1s ease;
}
@keyframes wfade { from { opacity: 0; transform: translateY(8px); } }

/* ============ DESKTOP ============ */
.desktop { position: fixed; inset: 0; overflow: hidden; }
.bliss { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }

/* desktop icons */
.icons {
  position: absolute; top: 8px; left: 8px; z-index: 1;
  display: flex; flex-direction: column; gap: 2px;
}
.dicon {
  width: 84px; padding: 6px 2px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.dicon__img { width: 34px; height: 34px; filter: drop-shadow(1px 2px 2px rgba(0,0,0,0.45)); }
.dicon__label {
  color: #fff; font-size: 11px; text-align: center; line-height: 1.25;
  text-shadow: 1px 1px 2px #000, 0 0 4px rgba(0,0,0,0.7);
  padding: 1px 3px;
}
.dicon.sel .dicon__label { background: var(--sel); text-shadow: none; outline: 1px dotted #ffef9c; }
.dicon.sel .dicon__img { opacity: 0.75; }
.dicon:focus-visible { outline: none; }
.dicon:focus-visible .dicon__label { outline: 1px dotted #fff; }

/* ============ WINDOWS ============ */
.win {
  position: absolute; left: var(--x, 15%); top: var(--y, 12%);
  width: min(var(--w, 540px), calc(100vw - 12px));
  height: var(--h, auto);
  max-height: calc(100dvh - 42px);
  display: flex; flex-direction: column;
  background: var(--face);
  border: 3px solid var(--win-border); border-top: 0;
  border-radius: 8px 8px 0 0;
  box-shadow: 2px 5px 16px rgba(0, 10, 40, 0.45);
  z-index: 10;
}
.win.max { left: 0 !important; top: 0 !important; width: 100vw !important; height: calc(100dvh - 30px); max-height: none; border-radius: 0; border-width: 0 1px 1px; }
.win__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 25px; padding: 0 3px 0 6px; margin: 0 -3px;
  border-radius: 7px 7px 0 0;
  background: linear-gradient(180deg, #0997ff 0%, #0053ee 8%, #0050ee 40%, #0066ff 88%, #0066ff 93%, #005bff 95%, #003dd7 96%, #003dd7 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4), inset 2px 0 2px rgba(120,190,255,0.5), inset -2px 0 2px rgba(120,190,255,0.5);
  touch-action: none;
}
.win:not(.focus) .win__bar {
  background: linear-gradient(180deg, #7697e7 0%, #7e9ee3 8%, #94afe8 40%, #97b4e9 88%, #82a5e4 93%, #7998e2 95%, #7b99e1 96%, #7b99e1 100%);
}
.win:not(.focus) { border-color: #6582f5; }
.win:not(.focus) .win__title { color: #d8e4f8; text-shadow: 1px 1px 1px rgba(0,0,30,0.3); }
.win__title {
  display: flex; align-items: center; gap: 5px;
  font: 700 13px "Trebuchet MS", Tahoma, sans-serif; color: #fff;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.win__title .ic { width: 16px; height: 16px; }
.win__btns { display: flex; gap: 2px; flex: none; }
.win__btns button {
  width: 21px; height: 21px; border-radius: 3px; border: 1px solid #fff;
  background-color: #2a63c6;
  background-image: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.6), transparent 55%),
                    linear-gradient(180deg, #7aa4e8 0%, #3a70d0 45%, #2a63c6 50%, #1a4aa5 100%);
  background-repeat: no-repeat; background-position: center;
  box-shadow: inset 0 -2px 3px rgba(0,10,60,0.35);
}
.win__btns button:hover { filter: brightness(1.18); }
.win__btns button:active { filter: brightness(0.85); }
.win__btns button[data-act="min"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21'%3E%3Crect x='4' y='13' width='8' height='3' fill='white'/%3E%3C/svg%3E"),
                    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.6), transparent 55%),
                    linear-gradient(180deg, #7aa4e8 0%, #3a70d0 45%, #2a63c6 50%, #1a4aa5 100%);
}
.win__btns button[data-act="max"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21'%3E%3Cpath d='M5.5 7.5 h9 v8 h-9 z' fill='none' stroke='white' stroke-width='1.4'/%3E%3Cpath d='M5.5 7 h9' stroke='white' stroke-width='3'/%3E%3C/svg%3E"),
                    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.6), transparent 55%),
                    linear-gradient(180deg, #7aa4e8 0%, #3a70d0 45%, #2a63c6 50%, #1a4aa5 100%);
}
.win__btns button[data-act="close"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21'%3E%3Cpath d='M6.5 6.5 L14.5 14.5 M14.5 6.5 L6.5 14.5' stroke='white' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"),
                    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.55), transparent 55%),
                    linear-gradient(180deg, #f0a58c 0%, #e0603a 45%, #d54a1a 50%, #a83210 100%);
}
.win:not(.focus) .win__btns button { opacity: 0.85; }

.win__menu {
  display: flex; gap: 2px; padding: 2px 4px;
  background: var(--face); border-bottom: 1px solid #d8d4c8; color: #000;
}
.win__menu span { padding: 2px 7px; }
.win__menu span:hover { background: var(--sel); color: #fff; }
.win__toolbar {
  display: flex; align-items: center; gap: 2px; padding: 3px 6px;
  border-bottom: 1px solid #d8d4c8; background: var(--face); color: #333;
}
.tb-btn { padding: 3px 7px; border: 1px solid transparent; border-radius: 3px; display: inline-flex; align-items: center; gap: 4px; }
.ic--tb { width: 20px; height: 20px; }
.tb-btn i { font-style: normal; font-size: 8px; color: #555; }
.tb-btn:hover { border-color: #b5b2a5; background: linear-gradient(180deg, #fff, #f0eee2); box-shadow: 1px 1px 1px rgba(0,0,0,0.1); }
.tb-sep { width: 1px; height: 18px; background: #c9c5b5; margin: 0 5px; border-right: 1px solid #fff; }
.win__addressbar {
  display: flex; align-items: center; gap: 6px; padding: 3px 6px;
  border-bottom: 1px solid #d8d4c8; background: var(--face); color: #555;
}
.win__address {
  flex: 1; display: flex; align-items: center; gap: 4px;
  border: 1px solid #7f9db9; background: #fff; padding: 2px 4px;
}
.win__address input { flex: 1; font: inherit; border: 0; outline: none; background: none; }
.win__go { color: #333; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; }

.win__body { flex: 1; overflow: auto; user-select: text; }
.win__status {
  display: flex; border-top: 1px solid #d8d4c8; background: var(--face);
  color: #333; padding: 3px 8px; gap: 14px;
}
.win__status > span { flex: 1; }
.win__status-zone { flex: none !important; display: inline-flex; align-items: center; gap: 4px; border-left: 1px solid #c9c5b5; padding-left: 10px; }

/* welcome window */
.welcome { display: grid; grid-template-columns: 1.2fr 1fr; }
.welcome__hero {
  padding: 1.6rem 1.4rem;
  background:
    radial-gradient(ellipse at 20% 15%, rgba(255,255,255,0.35), transparent 50%),
    linear-gradient(135deg, #2f71c9, #6ba7e0 60%, #8ec64b 135%);
  color: #fff;
}
.welcome__hi { font-size: 13px; color: #dcebff; }
.welcome__hero h1 {
  font: 700 30px "Franklin Gothic Medium", "Trebuchet MS", Tahoma, sans-serif;
  line-height: 1.05; margin: 0.3rem 0 0.8rem; text-shadow: 1px 2px 3px rgba(0,30,80,0.4);
}
.welcome__role { font-size: 12px; line-height: 1.5; color: #eaf3ff; }
.welcome__tips { padding: 1rem 1.1rem; font-size: 11px; }
.welcome__tips > p b { font-size: 12px; color: #003399; }
.welcome__tips ul { list-style: none; margin: 0.5rem 0 1rem; display: flex; flex-direction: column; gap: 0.55rem; }
@media (max-width: 560px) { .welcome { grid-template-columns: 1fr; } }

/* Adobe Reader-style PDF viewer */
.pdf {
  background: #9a9a9a; padding: 14px;
  display: flex; justify-content: center; align-items: flex-start;
  border-top: 1px solid #7f9db9;
}
.pdf img {
  width: 92%; max-width: none; flex: none;
  background: #fff; box-shadow: 2px 3px 10px rgba(0, 0, 0, 0.55);
}
.pdf__pct { padding: 3px 4px; color: #333; min-width: 42px; text-align: center; }
#pdfZoomIn, #pdfZoomOut { min-width: 24px; justify-content: center; font-size: 13px; }

/* notepad */
.notepad { background: #fff; border-top: 1px solid #7f9db9; }
.notepad pre {
  font: 12px "Lucida Console", Monaco, monospace;
  line-height: 1.5; padding: 4px 6px; white-space: pre-wrap;
}

/* explorer */
.explorer { flex: 1; display: flex; overflow: hidden; min-height: 260px; border-top: 1px solid #7f9db9; }
.xpane {
  width: 186px; flex: none; overflow-y: auto; padding: 10px;
  background: linear-gradient(180deg, #748bff 0%, #4a63d8 100%);
  display: flex; flex-direction: column; gap: 10px;
}
.xpane__panel { border-radius: 4px 4px 0 0; overflow: hidden; box-shadow: 0 1px 3px rgba(0,10,60,0.3); }
.xpane__panel header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 5px 10px; font-weight: 700; color: var(--link);
  background: linear-gradient(90deg, #fff, #c6d3f7);
}
.xpane__panel header i { font-style: normal; color: #4d6fc3; font-weight: 700; }
.xpane__body { background: #d6dff7; padding: 8px 10px; display: flex; flex-direction: column; gap: 7px; }
.xpane__body a { color: var(--link); text-decoration: none; }
.xpane__body a:hover { color: #0b3d91; text-decoration: underline; }
.explorer__grid {
  flex: 1; overflow: auto; background: #fff; padding: 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 4px; align-content: start;
}
.explorer__loading { grid-column: 1/-1; color: #666; }
.repo {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px; border: 1px solid transparent;
  text-decoration: none; text-align: center;
}
.repo:hover { background: #e8f0fb; border: 1px dotted #98b7e4; }
.repo__img { position: relative; width: 34px; height: 34px; }
.repo__img .base { width: 34px; height: 34px; }
.repo__img .badge { position: absolute; right: -6px; bottom: -4px; width: 18px; height: 18px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35)); }
.repo__name { color: #000; word-break: break-word; line-height: 1.3; }
.repo__meta { font-size: 10px; color: #777; }
@media (max-width: 620px) { .xpane { display: none; } }

/* properties dialog */
.props { padding: 10px 12px 12px; background: var(--face); }
.props__tabs { display: flex; }
.props__tabs button {
  border: 1px solid #919b9c; border-bottom: 0; background: linear-gradient(180deg, #fff, #f0ede1);
  border-radius: 3px 3px 0 0; padding: 3px 11px; position: relative; top: 1px; margin-right: 2px;
}
.props__tabs button.active {
  background: #fdfcf7; padding-top: 5px; z-index: 2;
  box-shadow: inset 0 2px 0 #f8b842;
}
.props__pane {
  border: 1px solid #919b9c; background: #fdfcf7; padding: 14px;
  display: flex; flex-direction: column; gap: 9px; min-height: 230px;
}
.props__sysrow { display: flex; gap: 14px; align-items: center; }
.props__sysrow svg { width: 52px; height: 52px; flex: none; }
.props__sysrow b { font-size: 12px; }
.props hr { border: 0; border-top: 1px solid #d8d4c8; }
.props__row { display: grid; grid-template-columns: 105px 1fr; gap: 8px; }
.props__row span { color: #666; }
.xp-item b { display: block; }
.xp-item i { color: #666; font-size: 10px; }
.xp-item p { margin-top: 3px; line-height: 1.5; color: #333; }
.xp-item ul { margin: 4px 0 0 15px; line-height: 1.55; color: #333; display: flex; flex-direction: column; gap: 2px; }
.xp-item li b { display: inline; }
.props__ok { display: flex; justify-content: flex-end; gap: 6px; padding-top: 10px; }
.props__pdf { margin-right: auto; }
.xp-btn.disabled { color: #a0a0a0; border-color: #c0bcae; box-shadow: none; pointer-events: none; }

/* XP push buttons */
.xp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 23px; padding: 2px 14px;
  border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff 0%, #ecebe5 86%, #d8d0c4 100%);
  color: #000; text-decoration: none;
}
.xp-btn:hover { box-shadow: inset 0 0 0 1px #fff2cf, inset 0 0 0 2px #f8b842; }
.xp-btn:active { background: linear-gradient(180deg, #d8d3c8, #e8e5da); box-shadow: none; }
.xp-btn:disabled { color: #a0a0a0; border-color: #c0bcae; box-shadow: none; cursor: default; }

/* contact */
.contact { padding: 12px; display: flex; flex-direction: column; gap: 9px; border-top: 1px solid #7f9db9; background: #fff; }
.contact__field { display: grid; grid-template-columns: 58px 1fr; gap: 8px; border-bottom: 1px solid #e6e2d4; padding-bottom: 6px; }
.contact__field span { color: #666; }
.contact__links { display: flex; flex-wrap: wrap; gap: 7px; padding: 6px 0; }
.contact__hint { color: #777; font-size: 10px; }

/* cmd */
.win--cmd { background: #000; }
.cmd { background: #000; }
.cmd pre {
  font: 12px "Lucida Console", Monaco, monospace;
  color: #c7c7c7; padding: 6px 8px; line-height: 1.45; white-space: pre-wrap;
}
.cmd .ok { color: #4be34b; }

/* ============ TASKBAR ============ */
.taskbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 30px; z-index: 300;
  display: flex; align-items: stretch;
  background: linear-gradient(180deg,
    #1f2f86 0%, #3165c4 3%, #3682e5 6%, #4490e6 10%, #3883e5 12%, #2b71e0 15%,
    #2663da 18%, #235bd6 20%, #2258d5 23%, #2157d6 38%, #245ddb 54%, #2562df 86%,
    #245fdc 89%, #2158d4 92%, #1d4ec0 95%, #1941a5 98%);
}
.start {
  display: flex; align-items: center; gap: 5px;
  color: #fff; font: italic 700 17px "Franklin Gothic Medium", "Trebuchet MS", sans-serif;
  padding: 0 22px 0 9px; margin-right: 4px;
  border-radius: 0 12px 12px 0;
  background:
    radial-gradient(ellipse at 10% 15%, rgba(255,255,255,0.45), transparent 45%),
    linear-gradient(180deg, #5eac56 0%, #3c9338 14%, #2f8a2f 19%, #2c872c 85%, #246d24 96%);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.55);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.4), 2px 0 6px rgba(0,0,20,0.45);
}
.start:hover { filter: brightness(1.12); }
.start:active { filter: brightness(0.9); }
.start__flag { width: 22px; height: 22px; filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.5)); }
.quicklaunch { display: flex; align-items: center; gap: 2px; padding: 0 6px 0 2px; }
.quicklaunch__grip {
  width: 3px; height: 20px; margin-right: 4px;
  background: linear-gradient(180deg, #6f9be8, #3f6fd0);
  border-radius: 2px; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}
.quicklaunch button { width: 24px; height: 24px; border-radius: 3px; padding: 2px; }
.quicklaunch button:hover { background: rgba(255,255,255,0.18); }
.quicklaunch svg { width: 100%; height: 100%; }
.taskbar__wins { flex: 1; display: flex; gap: 3px; padding: 3px 4px; overflow-x: auto; scrollbar-width: none; }
.taskbar__wins::-webkit-scrollbar { display: none; }
.task-btn {
  flex: 0 1 158px; min-width: 56px; display: flex; align-items: center; gap: 5px;
  border-radius: 3px; padding: 0 7px;
  background: linear-gradient(180deg, #4993e6 0%, #2765cd 8%, #2765cd 85%, #2159b8 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), 1px 1px 2px rgba(0,10,50,0.3);
  color: #fff; white-space: nowrap; overflow: hidden;
}
.task-btn span { overflow: hidden; text-overflow: ellipsis; }
.task-btn:hover { filter: brightness(1.1); }
.task-btn.active {
  background: linear-gradient(180deg, #1c48a8, #16388a);
  box-shadow: inset 1px 1px 3px rgba(0,0,30,0.55);
}
.tray {
  display: flex; align-items: center; gap: 7px; padding: 0 12px 0 14px;
  background: linear-gradient(180deg,
    #0c59b9 0%, #139ee9 5%, #18b5f2 9%, #13a4ec 13%, #117ec2 18%,
    #0f65a5 62%, #0d5896 80%, #094f8a 87%, #083e78 97%);
  border-left: 1px solid #1042af;
  box-shadow: inset 2px 0 3px rgba(0,20,60,0.3), inset 3px 0 1px rgba(24,187,255,0.4);
  color: #fff;
}
.tray__ico { width: 15px; height: 15px; filter: drop-shadow(0 1px 1px rgba(0,0,0,0.3)); }
#trayClock { min-width: 52px; text-align: right; }

/* balloon */
.balloon {
  position: fixed; right: 10px; bottom: 44px; z-index: 305;
  width: 240px; background: #ffffe1; color: #000;
  border: 1px solid #000; border-radius: 7px;
  padding: 9px 22px 9px 11px;
  box-shadow: 2px 3px 6px rgba(0,0,0,0.4);
}
.balloon::after {
  content: ""; position: absolute; right: 28px; bottom: -11px;
  border: 11px solid transparent; border-top-color: #ffffe1; border-right-width: 2px; border-left-width: 14px;
}
.balloon::before {
  content: ""; position: absolute; right: 26px; bottom: -13px;
  border: 12px solid transparent; border-top-color: #000; border-right-width: 2px; border-left-width: 15px;
}
.balloon b { display: block; margin-bottom: 3px; }
.balloon p { line-height: 1.45; }
.balloon__x { position: absolute; top: 5px; right: 5px; font-size: 9px; color: #444; }
.balloon__x:hover { color: #000; }

/* ============ START MENU ============ */
.startmenu {
  position: fixed; left: 0; bottom: 30px; z-index: 310;
  width: min(390px, 97vw); border-radius: 6px 6px 0 0; overflow: hidden;
  background: #fff;
  border: 1px solid #003cbf;
  box-shadow: 3px -2px 14px rgba(0, 10, 50, 0.5), inset 0 0 0 1px rgba(255,255,255,0.3);
}
.startmenu__user {
  display: flex; align-items: center; gap: 9px; padding: 8px 11px;
  background: linear-gradient(180deg, #4282d6 0%, #3b85e0 5%, #418ae3 17%, #2e7ee1 39%, #2374df 49%, #196edb 62%, #0f63d0 83%, #0e60cd 100%);
  color: #fff; font-weight: 700; font-size: 14px; text-shadow: 1px 1px 2px rgba(0,0,30,0.5);
}
.startmenu__user svg {
  width: 42px; height: 42px; border: 2px solid rgba(255,255,255,0.85); border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,30,0.4);
}
.startmenu__orange { height: 2px; background: linear-gradient(90deg, transparent, #f79b34 30%, #f79b34 70%, transparent); }
.startmenu__cols { display: grid; grid-template-columns: 1.28fr 1fr; }
.startmenu__left { background: #fff; padding: 5px 4px; display: flex; flex-direction: column; }
.startmenu__left button {
  display: grid; grid-template-columns: 26px 1fr; align-items: center; gap: 1px 7px;
  text-align: left; padding: 5px 7px; border-radius: 2px;
}
.startmenu__left button svg { width: 24px; height: 24px; grid-row: span 2; }
.startmenu__left button b { font-weight: 700; }
.startmenu__left button i { font-style: normal; color: #808080; font-size: 10px; grid-column: 2; }
.startmenu__left button:hover { background: var(--sel); color: #fff; }
.startmenu__left button:hover i { color: #d6e4fa; }
.startmenu__sep { height: 1px; background: #d9d5ce; margin: 4px 8px; }
.startmenu__all {
  justify-content: center; font-weight: 700;
  display: flex !important; align-items: center; gap: 8px;
}
.startmenu__all .allico {
  width: 16px; height: 16px; border-radius: 50%; flex: none;
  background: linear-gradient(180deg, #6fca5e, #2c872c);
  color: #fff; font-size: 9px; line-height: 16px; text-align: center; font-style: normal;
}
.startmenu__right {
  background: #d3e5fa; border-left: 1px solid #95bdee; padding: 8px 5px;
  display: flex; flex-direction: column; gap: 1px;
}
.startmenu__right a {
  display: flex; align-items: center; gap: 7px;
  color: #00136b; text-decoration: none; padding: 5px 7px; border-radius: 2px;
}
.startmenu__right a svg { width: 22px; height: 22px; }
.startmenu__right a:hover { background: var(--sel); color: #fff; }
.startmenu__sep--r { background: #a9c6e8; }
.startmenu__foot {
  display: flex; justify-content: flex-end; gap: 6px; padding: 6px 10px;
  background: linear-gradient(180deg, #4282d6 0%, #3b85e0 5%, #2e7ee1 39%, #196edb 70%, #0e60cd 100%);
}
.startmenu__foot button { display: inline-flex; align-items: center; gap: 6px; color: #fff; padding: 4px 8px; border-radius: 3px; }
.startmenu__foot button svg { width: 22px; height: 22px; }
.startmenu__foot button:hover { background: rgba(255,255,255,0.18); }

/* ============ SHUTDOWN ============ */
.shutdown {
  position: fixed; inset: 0; z-index: 500; background: #000;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.6rem;
}
.shutdown p { color: #ff8c1a; font: 700 clamp(20px, 4vw, 34px) "Franklin Gothic Medium", "Trebuchet MS", sans-serif; text-align: center; padding: 0 1rem; }
.shutdown button {
  border: 1px solid #555; background: #111; color: #999; padding: 8px 16px; border-radius: 4px;
}
.shutdown button:hover { color: #fff; border-color: #999; }

/* ============ RESTORE GLYPH (maximized windows) ============ */
.win.max .win__btns button[data-act="max"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='21' height='21'%3E%3Cpath d='M8.5 5.5 h7 v6 h-2.5' fill='none' stroke='white' stroke-width='1.3'/%3E%3Cpath d='M8.5 5 h7' stroke='white' stroke-width='2.4'/%3E%3Cpath d='M5.5 9.5 h7 v6 h-7 z' fill='none' stroke='white' stroke-width='1.3'/%3E%3Cpath d='M5.5 9 h7' stroke='white' stroke-width='2.4'/%3E%3C/svg%3E"),
                    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.6), transparent 55%),
                    linear-gradient(180deg, #7aa4e8 0%, #3a70d0 45%, #2a63c6 50%, #1a4aa5 100%);
}

/* ============ MENUS (menu bars, context menus, All Programs) ============ */
.win__menu { position: relative; z-index: 30; }
.win__menu span { position: relative; }
.win__menu span.open { background: var(--sel); color: #fff; }
.menu-drop {
  position: absolute; top: 100%; left: 0; z-index: 60;
  min-width: 158px; padding: 2px; background: #fff;
  border: 1px solid #aca899; box-shadow: 2px 2px 2px rgba(0,0,0,0.25);
  color: #000; font-size: 11px; text-align: left; cursor: default;
}
.menu-drop button {
  display: flex; align-items: center; width: 100%;
  padding: 3px 16px 3px 2px; text-align: left; white-space: nowrap; border-radius: 0;
}
.menu-drop button .mark { width: 16px; flex: none; font-style: normal; font-size: 9px; text-align: center; }
.menu-drop button .ic { margin-right: 5px; }
.menu-drop button:hover:not(:disabled) { background: var(--sel); color: #fff; }
.menu-drop button:disabled { color: #b5b2a5; }
.menu-drop button.bold { font-weight: 700; }
.menu-drop button.sub::after { content: "▸"; margin-left: auto; padding-left: 16px; font-size: 9px; }
.menu-drop hr { border: 0; border-top: 1px solid #e0ddd2; margin: 3px 2px; }
.ctx { position: fixed; top: auto; left: auto; z-index: 350; }
.startmenu__left { position: relative; }
.allmenu { top: auto; left: 66px; bottom: 30px; }

/* ============ DESKTOP LASSO ============ */
.lasso {
  position: absolute; z-index: 5; pointer-events: none;
  border: 1px solid #316ac5; background: rgba(49, 106, 197, 0.3);
}

/* ============ EXPLORER EXTRAS ============ */
.win__addrdrop {
  font-style: normal; font-size: 8px; color: #4d6185;
  align-self: stretch; display: flex; align-items: center; padding: 0 3px;
  border: 1px solid #7196e0; border-radius: 2px; margin-left: 2px;
  background: linear-gradient(180deg, #dce9fd, #aac7f4);
}
.win__go .ic { width: 18px; height: 18px; }
.explorer__grid.view-list, .explorer__grid.view-details { display: block; padding: 6px 10px; }
.view-list .repo, .view-details .repo {
  flex-direction: row; justify-content: flex-start; text-align: left;
  padding: 1px 4px; gap: 6px;
}
.view-list .repo__img, .view-details .repo__img,
.view-list .repo__img .base, .view-details .repo__img .base { width: 16px; height: 16px; }
.view-list .repo__img .badge, .view-details .repo__img .badge { width: 10px; height: 10px; right: -4px; bottom: -3px; }
.view-list .repo__meta { display: none; }
.view-details .repo__name { flex: 1; }
.view-details .repo__meta { width: 150px; flex: none; }

/* ============ NOTEPAD WORD WRAP ============ */
.win.nowrap .notepad pre { white-space: pre; }

/* ============ RESIZE HANDLES ============ */
.win__rs { position: absolute; z-index: 40; }
.win__rs--r { top: 30px; bottom: 12px; right: -4px; width: 7px; cursor: e-resize; }
.win__rs--b { left: 12px; right: 12px; bottom: -4px; height: 7px; cursor: s-resize; }
.win__rs--br { right: -5px; bottom: -5px; width: 15px; height: 15px; cursor: se-resize; }
.win.max .win__rs { display: none; }

/* ============ XP MESSAGE BOX ============ */
.msgbox { position: fixed; inset: 0; z-index: 340; display: grid; place-items: center; }
.msgbox__win {
  width: min(340px, 92vw); background: var(--face);
  border: 3px solid var(--win-border); border-top: 0; border-radius: 8px 8px 0 0;
  box-shadow: 2px 5px 16px rgba(0, 10, 40, 0.45);
}
.msgbox__body { padding: 18px 16px; line-height: 1.65; user-select: text; }
.msgbox__foot { display: flex; justify-content: center; padding: 0 0 14px; }
.msgbox__foot .xp-btn { min-width: 72px; }

/* ============ MINESWEEPER ============ */
#win-mine .win__rs { display: none; }
.mine {
  background: #c0c0c0; padding: 6px; user-select: none;
  border: 3px solid; border-color: #fff #7b7b7b #7b7b7b #fff;
}
.mine__status {
  display: flex; justify-content: space-between; align-items: center;
  padding: 4px 5px; margin-bottom: 6px;
  border: 2px solid; border-color: #7b7b7b #fff #fff #7b7b7b;
}
.mine__led {
  display: flex; background: #000; padding: 1px;
  border: 1px solid; border-color: #7b7b7b #fff #fff #7b7b7b;
}
.mine__led svg { width: 13px; height: 23px; display: block; }
.mine__led polygon { fill: #3a0000; }
.mine__led polygon.on { fill: #f00; }
.mine__face {
  width: 27px; height: 27px; padding: 1px; flex: none;
  background: #c0c0c0;
  border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff;
  display: grid; place-items: center;
}
.mine__face:active { border-color: #7b7b7b #fff #fff #7b7b7b; }
.mine__face svg { width: 20px; height: 20px; }
.mine__grid {
  display: grid; grid-template-columns: repeat(var(--cols, 9), 16px);
  width: max-content;
  border: 3px solid; border-color: #7b7b7b #fff #fff #7b7b7b;
}
.cell {
  position: relative; width: 16px; height: 16px; padding: 0;
  display: grid; place-items: center;
  background: #c0c0c0;
  border: 2px solid; border-color: #fff #7b7b7b #7b7b7b #fff;
  font: 700 11px Tahoma, Verdana, sans-serif; line-height: 1;
}
.cell:not(.open):active { border: 1px solid #9a9a9a; border-width: 1px 0 0 1px; }
.cell.open {
  border: 1px solid #9a9a9a; border-width: 1px 0 0 1px;
}
.cell svg { width: 12px; height: 12px; }
.cell.boom { background: #f00; }
.cell.q { color: #000; }
.cell.wrong::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(45deg, transparent 44%, #e00 44%, #e00 56%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, #e00 44%, #e00 56%, transparent 56%);
}
.cell.n1 { color: #0000ff; } .cell.n2 { color: #008000; }
.cell.n3 { color: #ff0000; } .cell.n4 { color: #000080; }
.cell.n5 { color: #800000; } .cell.n6 { color: #008080; }
.cell.n7 { color: #000000; } .cell.n8 { color: #808080; }

/* ============ RIVER CROSSING ============ */
#win-river .win__rs { display: none; }
.river { user-select: none; }
.river__scene {
  position: relative; height: 235px; overflow: hidden;
  background: #9fd0f5;
  border-top: 1px solid #7f9db9;
}
.river__bg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.river__bank {
  position: absolute; bottom: 0; width: 132px; height: 172px; z-index: 1;
  display: flex; justify-content: center; align-items: flex-start;
  flex-wrap: wrap; gap: 1px; padding: 4px 10px 0;
}
.river__bank--l { left: 0; }
.river__bank--r { right: 0; }
.river__boat {
  position: absolute; bottom: 20px; left: 130px; width: 110px; z-index: 1;
  transition: left 0.9s ease-in-out;
  animation: boatbob 3.4s ease-in-out infinite;
}
.river__boat.docked-r { left: calc(100% - 240px); }
.river__boat.notrans { transition: none; }
.river__seats { display: flex; justify-content: center; gap: 2px; min-height: 53px; }
.river__hull {
  width: 110px; display: block; margin-top: -23px; overflow: visible;
  pointer-events: none; /* decorative — clicks must reach the characters behind it */
  filter: drop-shadow(0 4px 4px rgba(0, 20, 60, 0.4));
}
.river__char { width: 34px; height: 53px; padding: 0; transition: transform 0.12s; }
.river__char svg { width: 100%; height: 100%; display: block; filter: drop-shadow(1px 2px 1.5px rgba(0, 0, 0, 0.35)); }
.river__char:hover { transform: translateY(-3px) scale(1.05); }

/* rowing */
.oar { transform-box: fill-box; }
.oar--l { transform-origin: 100% 0%; }
.oar--r { transform-origin: 0% 0%; }
.wake { opacity: 0; }
.river__boat.rowing .oar--l { animation: rowL 0.85s ease-in-out infinite; }
.river__boat.rowing .oar--r { animation: rowR 0.85s ease-in-out infinite; }
.river__boat.rowing .wake { opacity: 1; animation: wakepulse 0.85s ease-in-out infinite; }
@keyframes rowL { 0%, 100% { transform: rotate(-16deg); } 50% { transform: rotate(20deg); } }
@keyframes rowR { 0%, 100% { transform: rotate(16deg); } 50% { transform: rotate(-20deg); } }
@keyframes wakepulse { 0%, 100% { transform: scaleX(0.85); opacity: 0.35; } 50% { transform: scaleX(1.1); opacity: 0.7; } }

/* the monsters eat */
.river__char.dying { animation: dying 1.5s ease-in forwards; transform-origin: bottom center; }
@keyframes dying {
  0% { transform: none; }
  20% { transform: translateX(-4px) rotate(-7deg); }
  40% { transform: translateX(4px) rotate(7deg); }
  60% { transform: translateX(-3px) rotate(-5deg); opacity: 1; }
  80% { transform: rotate(78deg) translateY(8px); opacity: 0.9; }
  100% { transform: rotate(90deg) translateY(14px) scale(0.5); opacity: 0; }
}
.river__char.feast { animation: feast 0.45s ease-in-out 3; }
@keyframes feast { 0%, 100% { transform: none; } 50% { transform: translateY(-5px) scale(1.14); } }
.river__scene.danger::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(ellipse at center, transparent 42%, rgba(190, 0, 0, 0.4));
  animation: dangerpulse 0.5s ease-in-out 3;
}
@keyframes dangerpulse { 0%, 100% { opacity: 0.15; } 50% { opacity: 0.85; } }

/* HUD */
.river__count {
  position: absolute; top: 8px; left: 10px; z-index: 2; pointer-events: none;
  padding: 4px 12px; border-radius: 6px;
  background: linear-gradient(180deg, #b07a3e, #7a4e22);
  border: 1px solid #4a2c10;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 2px 3px rgba(0, 0, 0, 0.3);
  color: #fff3dd; font: 700 11px "Trebuchet MS", Tahoma, sans-serif;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
}
@keyframes boatbob {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(3px) rotate(0.6deg); }
}
.river__bg .rp { animation: ripple 5.5s ease-in-out infinite; }
@keyframes ripple {
  0%, 100% { transform: translateX(0); opacity: 0.15; }
  50% { transform: translateX(22px); opacity: 0.55; }
}
.river__bg .cl { animation: cloud 16s ease-in-out infinite alternate; }
.river__bg .cl--2 { animation-duration: 22s; animation-delay: -9s; }
@keyframes cloud {
  from { transform: translateX(-10px); }
  to { transform: translateX(12px); }
}
.river__ctrl {
  display: flex; gap: 12px; align-items: center; padding: 9px 12px;
  background: linear-gradient(180deg, #3f7d22, #2a5a13);
  border-top: 2px solid #7ec455;
}
.river__ctrl span {
  color: #eaf7dc; flex: 1; line-height: 1.4;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.35);
}
.river__go {
  font: 700 13px "Trebuchet MS", Tahoma, sans-serif; color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  padding: 6px 18px; border-radius: 14px; border: 1px solid #1d4a0c; flex: none;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.45), transparent 55%),
    linear-gradient(180deg, #8fd64e 0%, #58a82e 45%, #3f8a1e 50%, #57a52c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5), 0 2px 3px rgba(0, 20, 0, 0.35);
}
.river__go:hover { filter: brightness(1.12); }
.river__go:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 30, 0, 0.4); }

/* ============ WINDOW OPEN ANIMATION ============ */
.win.opening { animation: winopen 0.14s ease-out; }
@keyframes winopen { from { transform: scale(0.92); opacity: 0.4; } }

[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .boot__chase { animation: none; }
  .welcome-flash span { animation: none; }
  .win.opening { animation: none; }
  .river__boat, .river__bg .rp, .river__bg .cl,
  .oar, .wake, .river__char.dying, .river__char.feast, .river__scene.danger::after { animation: none; }
  .river__boat { transition: none; }
  .river__char.dying { opacity: 0; }
}
