/* Windows XP Luna(青)の再現。日本語版XPのUIフォントは MS UI Gothic 9pt。 */
#os, #os * { box-sizing: border-box; }
#os {
  position: absolute; inset: 0; overflow: hidden; background: #004e98;
  font: 12px "MS UI Gothic", "MS PGothic", "Tahoma", sans-serif; color: #000;
  user-select: none; -webkit-font-smoothing: none; font-smooth: never;
}
#os input, #os textarea, #os select, #os button { font: 12px "MS UI Gothic", "MS PGothic", Tahoma, sans-serif; }
#os.dragging iframe { pointer-events: none; }

/* ---------- デスクトップ ---------- */
#wallpaper { position: absolute; inset: 0; width: 1024px; height: 768px; }
#deskicons { position: absolute; left: 0; top: 0; bottom: 30px; right: 0; }
.dicon { position: absolute; width: 75px; text-align: center; padding-top: 2px; }
.dicon .img { width: 32px; height: 32px; margin: 0 auto 3px; display: block; }
.dicon .lbl {
  display: inline-block; max-width: 73px; padding: 1px 2px; line-height: 13px; color: #fff; word-break: break-all;
  text-shadow: 1px 1px 1px #000, 1px 1px 2px #000;
}
.dicon.sel .lbl { background: #316ac5; text-shadow: none; outline: 1px dotted #c0c0ff; }
.dicon.sel .img { filter: brightness(.65) sepia(1) hue-rotate(190deg) saturate(3); }

/* ---------- タスクバー ---------- */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px; z-index: 9000; display: flex;
  background: linear-gradient(to bottom, #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%);
}
#startbtn {
  width: 98px; height: 30px; flex: none; position: relative; color: #fff; padding-left: 33px; line-height: 28px;
  font: italic bold 15px/29px "Franklin Gothic Medium", "Trebuchet MS", "MS UI Gothic", sans-serif;
  text-shadow: 1px 1px 2px rgba(0,0,0,.7);
  border-radius: 0 9px 9px 0 / 0 14px 14px 0;
  background: linear-gradient(to bottom, #296d2a 0, #5fb45c 5%, #78c578 9%, #5bb359 14%, #40a23d 22%, #389c34 40%, #3a9e36 60%, #3fa33c 84%, #3b9d38 88%, #2a7f2a 95%, #1e6a22 100%);
  box-shadow: inset -2px 0 3px rgba(0,50,0,.55), 2px 0 3px rgba(0,0,0,.4), inset 0 1px 1px rgba(255,255,255,.3);
}
#startbtn:hover { filter: brightness(1.1); }
#startbtn.on { filter: brightness(.82); }
#startbtn svg { position: absolute; left: 8px; top: 6px; }
#taskbtns { flex: 1; display: flex; padding: 3px 3px 0 8px; gap: 2px; overflow: hidden; min-width: 0; }
.tbtn {
  flex: 0 1 160px; min-width: 40px; height: 23px; border-radius: 3px; color: #fff; display: flex; align-items: center; padding: 0 6px; gap: 4px;
  overflow: hidden; white-space: nowrap; background: #3c81f3;
  box-shadow: inset 1px 1px 0 rgba(255,255,255,.28), inset -1px -1px 0 rgba(0,0,0,.25), inset 0 -3px 3px rgba(0,0,50,.12);
}
.tbtn:hover { background: #5393f7; }
.tbtn.active { background: #1e52b7; box-shadow: inset 1px 1px 2px rgba(0,0,0,.45), inset -1px -1px 0 rgba(255,255,255,.12); font-weight: bold; }
.tbtn .t { overflow: hidden; text-overflow: ellipsis; }
.tbtn svg { flex: none; }
#tray {
  flex: none; height: 30px; color: #fff; display: flex; align-items: center; gap: 5px; padding: 0 10px 0 9px;
  background: linear-gradient(to bottom, #0c59b9 1%, #139ee9 6%, #18b5f2 10%, #139beb 14%, #1290e8 19%, #0d8dea 63%, #0d9ff1 81%, #0f9eed 88%, #119be9 91%, #1392e2 94%, #137ed7 97%, #095bc9 100%);
  border-left: 1px solid #092e51; box-shadow: inset 1px 0 1px #18bbff;
}
#clock { margin-left: 3px; text-shadow: 0 0 1px rgba(0,0,0,.4); }
.trayicon { width: 16px; height: 16px; display: block; }

/* ---------- ウィンドウ ---------- */
.win { position: absolute; display: flex; flex-direction: column; border-radius: 8px 8px 0 0; background: #ece9d8; }
.win.max { border-radius: 0; }
.win .frame-l, .win .frame-r, .win .frame-b { position: absolute; }
.titlebar {
  height: 29px; flex: none; display: flex; align-items: center; padding: 0 5px 0 5px; color: #fff; border-radius: 7px 7px 0 0;
  background: linear-gradient(to bottom, #0058ee 0%, #3593ff 4%, #288eff 6%, #127dff 8%, #036ffc 10%, #0262ee 14%, #0057e5 20%, #0054e3 24%, #0055eb 56%, #005bf5 66%, #026afe 76%, #0062ef 86%, #0052d6 92%, #0040ab 94%, #003092 100%);
  text-shadow: 1px 1px #0f1089;
}
.win.max .titlebar { border-radius: 0; }
.win.inactive .titlebar {
  background: linear-gradient(to bottom, #7697e7 0%, #7e9ee3 3%, #94afe8 6%, #97b4e9 8%, #82a5e4 14%, #7c9fe2 17%, #7996de 25%, #7b99e1 56%, #82a9e9 81%, #80a5e7 89%, #7b96e1 94%, #7a93df 97%, #abbae3 100%);
  color: #d8e4f8; text-shadow: none;
}
.titlebar .ticon { width: 16px; height: 16px; flex: none; margin-right: 4px; }
.titlebar .ttext {
  flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  font: bold 13px "MS UI Gothic", "Trebuchet MS", sans-serif; letter-spacing: 0;
}
.tb { width: 21px; height: 21px; flex: none; margin-left: 2px; border-radius: 3px; border: 1px solid #fff; position: relative;
  background: radial-gradient(circle at 90% 90%, #0054e9 0%, #2263d5 55%, #4479e4 70%, #a3bbec 90%, #fff 100%); }
.tb:hover { filter: brightness(1.18); }
.tb:active { filter: brightness(.85); }
.tb.close { background: radial-gradient(circle at 90% 90%, #cc4600 0%, #dc6527 55%, #cd7546 70%, #ffccb2 90%, #fff 100%); }
.tb svg { position: absolute; left: 0; top: 0; }
.win.inactive .tb { filter: saturate(.55) brightness(1.12); }
.winbody {
  flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; background: #ece9d8;
  border: solid #0831d9; border-width: 0 3px 3px 3px; box-shadow: inset 1px 0 0 #166aee, inset -1px 0 0 #0855dd, inset 0 -1px 0 #0855dd;
}
.win.inactive .winbody { border-color: #6582e0; box-shadow: none; }
.win.max .winbody { border-width: 0; }
.grip { position: absolute; z-index: 5; }
.grip.e { right: -3px; top: 0; bottom: 6px; width: 6px; cursor: e-resize; }
.grip.w { left: -3px; top: 0; bottom: 6px; width: 6px; cursor: w-resize; }
.grip.s { left: 6px; right: 6px; bottom: -3px; height: 6px; cursor: s-resize; }
.grip.se { right: -3px; bottom: -3px; width: 12px; height: 12px; cursor: se-resize; }
.grip.sw { left: -3px; bottom: -3px; width: 12px; height: 12px; cursor: sw-resize; }

/* ---------- メニューバー ---------- */
.menubar { height: 20px; flex: none; display: flex; align-items: center; background: #ece9d8; padding-left: 1px; border-bottom: 1px solid #d8d2bd; }
.menubar .mi { padding: 0 7px; height: 18px; line-height: 18px; }
.menubar .mi:hover, .menubar .mi.on { background: #316ac5; color: #fff; }
.menu {
  position: absolute; z-index: 9800; min-width: 150px; background: #fff; border: 1px solid #aca899; padding: 2px;
  box-shadow: 2px 2px 3px rgba(0,0,0,.4);
}
.menu .row { display: flex; align-items: center; height: 18px; padding: 0 16px 0 20px; position: relative; white-space: nowrap; }
.menu .row:hover, .menu .row.on { background: #316ac5; color: #fff; }
.menu .row.dis { color: #aca899; background: none; }
.menu .row .chk { position: absolute; left: 6px; }
.menu .row .sub { position: absolute; right: 4px; font-size: 9px; }
.menu .row .key { margin-left: auto; padding-left: 20px; }
.menu .sep { height: 1px; margin: 3px 1px; background: #aca899; }

/* ---------- コントロール ---------- */
.xbtn {
  min-width: 75px; height: 23px; padding: 0 8px; border: 1px solid #003c74; border-radius: 3px; color: #000;
  background: linear-gradient(to bottom, #fff 0%, #f6f5ef 60%, #ecebe5 86%, #d6d0c5 100%);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.4);
}
.xbtn:hover { box-shadow: inset 0 2px 0 #fff0cf, inset 0 -2px 0 #e5a01a, inset 2px 0 0 #f9d27d, inset -2px 0 0 #f9d27d; }
.xbtn:active { background: linear-gradient(to bottom, #cdcac3 0%, #e3e3db 8%, #f0efea 90%, #f4f3ee 100%); }
.xbtn.def { box-shadow: inset 0 2px 0 #cee7ff, inset 0 -2px 0 #6982ee, inset 2px 0 0 #98b8ea, inset -2px 0 0 #98b8ea; }
.xbtn[disabled] { color: #aca899; border-color: #c9c7ba; background: #f5f4ea; box-shadow: none; }
.xin { height: 21px; border: 1px solid #7f9db9; background: #fff; padding: 1px 3px; outline: none; user-select: text; }
.xin:focus { outline: none; }
.xin[readonly] { background: #ece9d8; }
fieldset.xgrp { border: 1px solid #d0d0bf; border-radius: 4px; padding: 6px 8px; margin: 0; }
fieldset.xgrp legend { color: #0046d5; padding: 0 2px; }
.pane-scroll::-webkit-scrollbar, #os textarea::-webkit-scrollbar { width: 17px; height: 17px; }

/* ---------- ダイアログ ---------- */
.dlgbody { padding: 12px 12px 10px; display: flex; flex-direction: column; flex: 1; min-height: 0; }
.dlgrow { display: flex; gap: 12px; flex: 1; align-items: flex-start; }
.dlgtext { padding-top: 6px; line-height: 15px; white-space: pre-wrap; word-break: break-all; user-select: text; }
.dlgbtns { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
#modal { position: absolute; inset: 0; z-index: 9500; display: none; }
#modal.on { display: block; }

/* ---------- スタートメニュー ---------- */
#startmenu {
  position: absolute; left: 0; bottom: 30px; width: 380px; z-index: 9600; display: none; border-radius: 6px 6px 0 0; overflow: hidden;
  box-shadow: 2px 0 4px rgba(0,0,0,.4); background: #4282d6; border: 1px solid #0046bf; border-bottom: none;
}
#startmenu.on { display: block; }
.sm-head {
  height: 62px; display: flex; align-items: center; gap: 8px; padding: 0 8px; color: #fff; font: bold 15px "MS UI Gothic", Tahoma, sans-serif;
  text-shadow: 1px 1px 2px #0d3d8c;
  background: linear-gradient(to bottom, #1868ce 0%, #0e60cb 12%, #0e60cb 20%, #1164cf 32%, #1667cf 33%, #1b6cd3 47%, #1e70d9 54%, #2476dc 60%, #297ae0 65%, #3482e3 77%, #3786e5 79%, #428ee9 90%, #4791eb 100%);
  box-shadow: inset 0 1px 0 #72a8ec;
}
.sm-pic { width: 48px; height: 48px; border: 2px solid #d9e6f7; border-radius: 3px; background: #fff; overflow: hidden; box-shadow: 1px 1px 2px rgba(0,0,0,.4); }
.sm-orange { height: 2px; background: linear-gradient(to right, rgba(218,136,61,0) 0, #da883d 50%, rgba(218,136,61,0) 100%); }
.sm-cols { display: flex; background: #fff; }
.sm-left { flex: 1 1 50%; min-height: 330px; padding: 6px 0 0; display: flex; flex-direction: column; background: #fff; }
.sm-right { flex: 1 1 50%; padding: 6px 0; background: #d3e5fa; border-left: 1px solid #95bdee; }
.sm-item { display: flex; align-items: center; gap: 6px; padding: 2px 6px; min-height: 34px; color: #000; }
.sm-item.big b { display: block; }
.sm-item small { color: #808080; font-size: 11px; }
.sm-item:hover { background: #316ac5; color: #fff; }
.sm-item:hover small { color: #fff; }
.sm-right .sm-item { min-height: 26px; color: #00136b; }
.sm-right .sm-item:hover { color: #fff; }
.sm-right .bold { font-weight: bold; }
.sm-sep { height: 1px; margin: 4px 8px; background: linear-gradient(to right, rgba(0,0,0,0), #bcbcbc 30%, #bcbcbc 70%, rgba(0,0,0,0)); }
.sm-right .sm-sep { background: #bcd4f1; }
.sm-all { margin-top: auto; padding: 5px 0 6px; text-align: center; font-weight: bold; display: flex; justify-content: center; align-items: center; gap: 8px; }
.sm-all:hover { background: #316ac5; color: #fff; }
.sm-foot { height: 36px; display: flex; justify-content: flex-end; align-items: center; gap: 4px; padding: 0 6px; color: #fff;
  background: linear-gradient(to bottom, #4282d6 0%, #3b85e0 3%, #418ae3 5%, #418ae3 17%, #3c87e2 21%, #3786e4 26%, #3482e3 29%, #2e7ee1 39%, #2374df 49%, #2072db 57%, #196edb 62%, #176bd8 72%, #1468d5 75%, #1165d2 83%, #0f61cb 88%); }
.sm-foot .fb { display: flex; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 2px; }
.sm-foot .fb:hover { background: #2f71cd; }

/* ---------- 起動画面 ---------- */
#boot { position: absolute; inset: 0; z-index: 9900; background: #000; color: #c0c0c0; font: 16px/18px "MS Gothic", "Courier New", monospace; display: none; overflow: hidden; }
#boot.on { display: block; }
#boot pre { margin: 16px; font: inherit; white-space: pre; }
.xplogo { position: absolute; left: 0; right: 0; top: 248px; text-align: center; color: #fff; }
.xpbar { position: absolute; left: 50%; top: 472px; width: 124px; margin-left: -62px; height: 14px; border: 2px solid #b2b2b2; border-radius: 4px; overflow: hidden; padding: 1px; }
.xpbar i { position: absolute; top: 1px; height: 8px; width: 34px; animation: xpbar 1.9s linear infinite;
  background: linear-gradient(to right, #1f3fa0 0 8px, transparent 8px 13px, #3c6ce0 13px 21px, transparent 21px 26px, #1f3fa0 26px 34px); box-shadow: 0 0 0 0 #000; }
@keyframes xpbar { from { left: -36px; } to { left: 124px; } }

#welcome { position: absolute; inset: 0; z-index: 9890; display: none; background: #5a7edc; color: #fff; }
#welcome.on { display: block; }
.wc-top, .wc-bot { position: absolute; left: 0; right: 0; height: 80px; background: #00309c; }
.wc-top { top: 0; border-bottom: 2px solid transparent; border-image: linear-gradient(to right, #00309c, #fff 30%, #d9a067 50%, #00309c) 1; }
.wc-bot { bottom: 0; height: 88px; border-top: 2px solid transparent; border-image: linear-gradient(to right, #00309c, #e09b4e 30%, #f6c78a 45%, #00309c) 1; }
.wc-mid { position: absolute; left: 0; right: 0; top: 82px; bottom: 90px;
  background: radial-gradient(ellipse at 18% 8%, #a4bdf3 0%, #7e9ce8 22%, #5a7edc 50%, #5a7edc 100%); }
.wc-title { position: absolute; left: 110px; top: 300px; font: italic bold 38px "Franklin Gothic Medium", "MS UI Gothic", sans-serif; text-shadow: 1px 2px 3px #17378c; }
.wc-users { position: absolute; left: 512px; top: 200px; bottom: 200px; width: 2px; background: linear-gradient(to bottom, rgba(255,255,255,0), #fff 50%, rgba(255,255,255,0)); }
.wc-user { position: absolute; left: 540px; top: 330px; display: flex; gap: 14px; align-items: center; border-radius: 6px; padding: 8px 40px 8px 8px; font-size: 18px; font-weight: bold; }
.wc-user:hover { background: linear-gradient(to right, #1e4ac0, rgba(30,74,192,0)); }
.wc-user .sm-pic { width: 52px; height: 52px; }
.wc-msg { position: absolute; left: 0; right: 0; top: 338px; text-align: center; font: italic bold 38px "Franklin Gothic Medium", "MS UI Gothic", sans-serif; text-shadow: 1px 2px 3px #17378c; }

/* ---------- 汎用の一覧 ---------- */
.listview { background: #fff; overflow: auto; flex: 1; }
.lrow { display: flex; height: 18px; align-items: center; padding: 0 3px; white-space: nowrap; gap: 4px; }
.lrow.sel { background: #316ac5; color: #fff; }
.lhead { display: flex; height: 18px; background: #ece9d8; border-bottom: 1px solid #aca899; }
.lhead span { padding: 2px 5px; border-right: 1px solid #d0cdb9; white-space: nowrap; overflow: hidden; }
