/* 月読堂 net window (net.js): gate → boot log → menu → IRC / 掲示板 / BLOG. 800×600 game content inside an original
   title bar and border (804 wide outside), fixed size, draggable by the bar. Same look in both themes.
   Positions and colours from the design handoff (NET_HANDOFF.md). */
#net { position: fixed; z-index: 43; width: 804px; box-sizing: border-box; background: #3a2c7a; border: 1px solid #0c0818; padding: 0 1px 1px; user-select: none;
  clip-path: polygon(7px 0, calc(100% - 7px) 0, 100% 7px, 100% 100%, 0 100%, 0 7px);
  font: 700 16px/1.5 'Zen Kaku Gothic New', sans-serif; color: #fff; -webkit-font-smoothing: antialiased;
  text-shadow: -1px -1px 0 #1a0f24, -1px 0 0 #1a0f24, -1px 1px 0 #1a0f24, 0 -1px 0 #1a0f24, 0 1px 0 #1a0f24, 1px -1px 0 #1a0f24, 1px 0 0 #1a0f24, 1px 1px 0 #1a0f24;
}
#net .n-body { position: relative; width: 800px; height: 600px; overflow: hidden; background: #000; }
/* title bar (titlebar.css in the handoff) */
#net .n-tb { position: relative; height: 28px; margin: 0 -1px; background: linear-gradient(#4a36a0 0, #2f2274 45%, #1b1348 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), inset 0 -1px 0 rgba(255, 255, 255, .75); cursor: move; }
#net .n-tb:after { content: ""; position: absolute; left: 150px; right: 96px; top: 13px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45) 12%, rgba(255, 255, 255, .45) 88%, transparent); }
#net .n-tb img { position: absolute; left: 9px; top: 6px; width: 16px; height: 16px; image-rendering: pixelated; }
#net .n-tb b { position: absolute; left: 32px; top: 4px; font-weight: 700; font-size: 13px; line-height: 20px; letter-spacing: 1px;
  text-shadow: -1px -1px 0 #120a22, -1px 0 0 #120a22, -1px 1px 0 #120a22, 0 -1px 0 #120a22, 0 1px 0 #120a22, 1px -1px 0 #120a22, 1px 0 0 #120a22, 1px 1px 0 #120a22; }
#net .n-tbb { position: absolute; top: 5px; width: 22px; height: 18px; border: 1px solid rgba(255, 255, 255, .72); background: rgba(14, 8, 34, .55); box-shadow: 0 0 0 1px #120a22; cursor: pointer; }
#net .n-tbb svg { position: absolute; left: 0; top: 0; }
#net .n-min { right: 59px; } #net .n-pop { right: 33px; } #net .n-cls { right: 7px; }
#net .n-min:hover, #net .n-pop:hover { background: rgba(124, 104, 236, .85); border-color: #fff; }
#net .n-min:active, #net .n-pop:active { background: rgba(58, 44, 150, .95); border-color: #cfc6ff; box-shadow: 0 0 0 1px #120a22, inset 0 2px 3px rgba(0, 0, 0, .55); }
#net .n-cls:hover { background: rgba(226, 72, 128, .92); border-color: #fff; }
#net .n-cls:active { background: rgba(150, 34, 84, .96); border-color: #ffc6dc; box-shadow: 0 0 0 1px #120a22, inset 0 2px 3px rgba(0, 0, 0, .55); }
#net.n-off { background: #35323f; }
#net.n-off .n-tb { background: linear-gradient(#4b4858 0, #35323f 45%, #24222c 100%); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -1px 0 rgba(255, 255, 255, .35); }
#net.n-off .n-tb:after { opacity: .4; } #net.n-off .n-tb img, #net.n-off .n-tb b, #net.n-off .n-tbb { opacity: .55; }
#net.n-up .n-body { display: none; }
#net[hidden] { display: none; }
#net * { box-sizing: border-box; }
#net .n-layer { position: absolute; left: 0; top: 0; width: 800px; height: 600px; }
#net .n-shell { z-index: 9; pointer-events: none; }
#net .n-abs { position: absolute; }
#net .n-c { position: absolute; left: 0; right: 0; text-align: center; }
#net .n-scr[hidden], #net .n-ov[hidden] { display: none; }
#net .n-y { color: #ffe14a; } #net .n-dim { color: #c9b8d8; } #net .n-sys { color: #b7c3ea; }
#net .n-mono { font-family: 'BIZ UDGothic', monospace; font-weight: 700; }
#net .n-rnd { font-family: 'M PLUS Rounded 1c', sans-serif; }
#net button { font: inherit; color: inherit; text-shadow: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
#net a { color: #ffe9c4; }
/* typing line: a real input that grows with its text, followed by the blinking block cursor */
#net .n-ln { display: inline-flex; align-items: baseline; white-space: pre; }
#net .n-ln input { width: 2px; min-width: 2px; padding: 0; border: 0; outline: 0; background: none; color: #fff; font: inherit; text-shadow: inherit; caret-color: transparent; user-select: text; }
#net .n-ln .n-meas { position: absolute; visibility: hidden; white-space: pre; }
#net .n-cur { display: inline-block; width: 9px; height: 17px; margin-left: 2px; background: #fff; box-shadow: 0 0 0 1px #1a0f24; vertical-align: -2px; animation: net-bk 1s steps(1) infinite; }
#net .n-ln:not(:focus-within) .n-cur { visibility: hidden; }
@keyframes net-bk { 50% { opacity: 0; } }

/* gate */
#net .n-dg { display: inline-block; width: 13px; height: 16px; background: url(/img/net/counter_digits_130x16.webp) no-repeat; vertical-align: -2px; }
#net .n-gate-in { position: absolute; left: 260px; top: 374px; width: 280px; height: 34px; padding: 7px 10px; font-size: 16px; line-height: 18px; cursor: text;
  background: rgba(20, 4, 10, .62); border: 1px solid #fff; box-shadow: 0 0 0 1px #1a0f24, inset 0 0 12px rgba(255, 120, 150, .25); overflow: hidden; }
#net .n-enter { position: absolute; left: 288px; top: 466px; width: 225px; height: 35px; background: url(/img/net/btn_enter_normal_225x35.webp); }
#net .n-enter:hover { background-image: url(/img/net/btn_enter_hover_225x35.webp); }
#net .n-enter:active { background-image: url(/img/net/btn_enter_press_225x35.webp); }

/* boot log */
#net .n-boot { position: absolute; left: 78px; top: 108px; font: 400 16px/32px 'BIZ UDGothic', monospace; white-space: pre; }

/* menu */
#net .n-mhead { left: 622px; top: 122px; pointer-events: none; }
#net .n-mi { position: absolute; left: 622px; height: 32px; }
#net .n-mirc { top: 166px; width: 47px; background: url(/img/net/menu_irc_normal_47x32.webp); }
#net .n-mirc:hover { background-image: url(/img/net/menu_irc_hover_47x32.webp); } #net .n-mirc:active { background-image: url(/img/net/menu_irc_press_47x32.webp); }
#net .n-mboard { top: 202px; width: 72px; background: url(/img/net/menu_board_normal_72x32.webp); }
#net .n-mboard:hover { background-image: url(/img/net/menu_board_hover_72x32.webp); } #net .n-mboard:active { background-image: url(/img/net/menu_board_press_72x32.webp); }
#net .n-mblog { top: 238px; width: 62px; background: url(/img/net/menu_blog_normal_62x32.webp); }
#net .n-mblog:hover { background-image: url(/img/net/menu_blog_hover_62x32.webp); } #net .n-mblog:active { background-image: url(/img/net/menu_blog_press_62x32.webp); }
#net .n-mbg { top: 274px; width: 54px; background: url(/img/net/menu_bg_normal_54x32.webp); }
#net .n-mbg:hover { background-image: url(/img/net/menu_bg_hover_54x32.webp); } #net .n-mbg:active { background-image: url(/img/net/menu_bg_press_54x32.webp); }
#net .n-exit { position: absolute; left: 626px; top: 310px; width: 46px; height: 32px; background: url(/img/net/menu_exit_normal_46x32.webp); }
#net .n-exit:hover { background-image: url(/img/net/menu_exit_hover_46x32.webp); }
#net .n-exit:active { background-image: url(/img/net/menu_exit_press_46x32.webp); }

/* IRC */
#net .n-irc { position: absolute; left: 42px; top: 66px; width: 716px; height: 456px; overflow-y: auto; font: 700 17px/22px 'BIZ UDGothic', monospace; user-select: text; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .4) transparent; }
#net .n-irc div { padding-left: 10ch; text-indent: -10ch; white-space: pre-wrap; word-break: break-all; }
#net .n-irc b { display: inline-block; width: 10ch; text-indent: 0; color: #ffe14a; font-weight: 700; }
#net .n-irc div.n-sys { padding-left: 0; text-indent: 0; }
#net .n-irc-rule { position: absolute; left: 42px; top: 528px; width: 716px; height: 1px; background: rgba(255, 255, 255, .55); }
#net .n-irc-in { position: absolute; left: 42px; top: 538px; width: 716px; font: 700 17px/22px 'BIZ UDGothic', monospace; cursor: text; overflow: hidden; }

/* 掲示板 */
#net .n-posts { position: absolute; left: 42px; top: 62px; width: 728px; height: 506px; padding: 10px 8px 0 0; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .4) transparent; user-select: text; }
#net .n-post { width: 720px; border-top: 3px solid #fff; box-shadow: 0 -1px 0 #1a0f24; padding-top: 9px; margin-bottom: 24px; font-size: 16px; line-height: 24px; }
#net .n-post .n-h { cursor: pointer; }
#net .n-post .n-h:hover { color: #ffe9c4; }
#net .n-post .n-q { margin-top: 24px; white-space: pre-wrap; }
#net .n-post .n-b { margin-top: 24px; padding-left: 1em; white-space: pre-wrap; word-break: break-all; }
#net .n-empty { position: absolute; left: 0; right: 0; top: 280px; text-align: center; color: #c9b8d8; }
/* hover bar: slides down when the mouse is near the top (or stays, when pinned) */
#net .n-hbar { position: absolute; left: 0; top: 4px; width: 800px; height: 28px; z-index: 12; transform: translateY(-40px); transition: transform .18s ease-out; pointer-events: none; }
#net .n-hbar.show { transform: none; }
#net .n-hbar.show button { pointer-events: auto; }   /* the bar's picture lets drags through to the handle below */
#net .n-bar { position: absolute; top: 0; height: 28px; font-weight: 500; font-size: 12px; }
#net .n-bar img { position: absolute; left: 0; top: 0; }
#net .n-bar span, #net .n-bar button { position: absolute; white-space: nowrap; }
#net .n-bar .n-rb { top: 2px; font: 700 12px/1.5 'M PLUS Rounded 1c', sans-serif; }
#net .n-bar .n-ls { letter-spacing: 1px; }
#net .n-bar .n-bt13 { font-size: 13px; }
#net .n-bar .n-tbtn:hover { color: #ffe9c4; }
#net .n-spr { position: absolute; background-repeat: no-repeat; }
#net .n-chev { top: 2px; width: 26px; height: 23px; }
#net .n-chev.prev { background-image: url(/img/net/bar_btn_prev_104x23.webp); }
#net .n-chev.next { background-image: url(/img/net/bar_btn_next_104x23.webp); }
#net .n-chev:hover { background-position: -26px 0; } #net .n-chev:active { background-position: -52px 0; }
#net .n-chev:disabled { background-position: -78px 0; cursor: default; }
#net .n-pin { left: 220px; top: 3px; width: 29px; height: 19px; background-image: url(/img/net/bar_pin_232x19.webp); background-position: 0 0; }
#net .n-pin:hover { background-position: -29px 0; } #net .n-pin:active { background-position: -58px 0; }
#net .n-pin.on { background-position: -116px 0; } #net .n-pin.on:hover { background-position: -145px 0; } #net .n-pin.on:active { background-position: -174px 0; }
#net .n-music { left: 254px; top: 3px; width: 24px; height: 19px; background-image: url(/img/net/bar_music_96x19.webp); background-position: 0 0; }
#net .n-music:hover { background-position: -24px 0; } #net .n-music.off { background-position: -48px 0; } #net .n-music.off:hover { background-position: -72px 0; }
#net .n-tip { position: absolute; top: 28px; transform: translateX(-50%); display: none; white-space: nowrap; pointer-events: none; z-index: 20;
  font: 700 11px/16px 'M PLUS Rounded 1c', sans-serif; padding: 1px 7px; background: rgba(10, 6, 24, .88); border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px #1a0f24; }
#net .n-chev:hover + .n-tip { display: block; }

/* 掲示板 news while reading: notice in the page (was on the newest page) or flag on the hover bar (older page) */
#net .n-newer { position: absolute; right: 42px; top: 64px; z-index: 8; padding: 1px 10px; font-size: 13px; color: #ffe14a;
  background: rgba(10, 6, 24, .78); border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px #1a0f24; }
#net .n-newer:hover { color: #ffe9c4; }
#net .n-newer[hidden], #net .n-newflag[hidden] { display: none; }
#net .n-bar .n-newflag { color: #ffe14a; }

/* page history */
#net .n-ov { position: absolute; inset: 0; }
#net .n-hist { z-index: 15; }
#net .n-histopen .n-hbar, #net .n-histopen .n-shell { display: none; }
#net .n-hrow { position: absolute; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; width: 370px; text-align: left; line-height: 1.4; }
#net .n-hrow b { display: inline-block; font-weight: 500; }
#net .n-hrow:hover { color: #ffe9c4; }
#net .n-hcur { position: absolute; pointer-events: none; }
#net .n-hclose { left: 716px; top: 576px; width: 72px; height: 21px; background-image: url(/img/net/history_close_72x84.webp); }
#net .n-hclose:hover { background-position: 0 -21px; } #net .n-hclose:active { background-position: 0 -42px; }
#net .n-hpg { top: 575px; width: 26px; height: 23px; }

/* post box */
#net .n-pbox { z-index: 16; }
#net .n-pbox .n-lb { position: absolute; font-size: 13px; font-weight: 500; }
#net .n-fld { position: absolute; background: rgba(10, 6, 24, .55); border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 0 0 1px #1a0f24; color: #fff; }
#net .n-fld.n-title { left: 143px; top: 182px; width: 584px; height: 32px; padding: 3px 10px; line-height: 24px; cursor: text; overflow: hidden; }
#net textarea.n-fld { left: 143px; top: 224px; width: 584px; height: 178px; padding: 6px 10px; resize: none; outline: 0; font: 700 16px/24px 'Zen Kaku Gothic New', sans-serif; text-shadow: inherit; caret-color: #fff; user-select: text; }
#net .n-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#net .n-pbtn { position: absolute; top: 438px; width: 126px; height: 30px; display: grid; place-items: center; font-size: 14px; letter-spacing: 6px; padding-left: 6px;
  background: rgba(10, 6, 24, .6); border: 1px solid #fff; box-shadow: 0 0 0 1px #1a0f24; }
#net .n-pbtn.go { color: #ffe14a; border-color: #ffe14a; background: rgba(60, 40, 110, .75); box-shadow: 0 0 0 1px #1a0f24, 0 0 10px rgba(255, 225, 74, .45); }
#net .n-pbtn:hover { background: rgba(60, 40, 110, .9); }
#net .n-perr { position: absolute; left: 143px; top: 406px; width: 480px; font-size: 12px; font-weight: 500; color: #ffb0b8; }

/* glossary links (IRC lines, 掲示板 posts, blog pages): violet until this visitor has opened the entry, then gold */
#net .n-lk { color: #b48ce0; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
#net .n-lk.n-read { color: #eed289; }
#net .n-lk:hover { color: #dcc8f2; text-decoration-thickness: 2px;
  text-shadow: -1px -1px 0 #1a0f24, -1px 0 0 #1a0f24, -1px 1px 0 #1a0f24, 0 -1px 0 #1a0f24, 0 1px 0 #1a0f24, 1px -1px 0 #1a0f24, 1px 0 0 #1a0f24, 1px 1px 0 #1a0f24, 0 0 8px #ff9a3c; }
#net .n-lk.n-read:hover { color: #fff6dc; }
/* blog page */
#net .n-bbg { object-fit: cover; }
#net .n-bbar { position: absolute; left: 0; top: 4px; width: 383px; height: 28px; }
#net .n-bbar img { position: absolute; left: 0; top: 0; }
#net .n-bterm { position: absolute; left: 116px; top: 2px; width: 262px; overflow: hidden; white-space: nowrap; font: 700 13px/1.5 'M PLUS Rounded 1c', sans-serif; }
#net .n-bdig { position: absolute; top: 11px; width: 9px; height: 13px; background: url(/img/net/blog_digits_90x13.webp) no-repeat; }
#net .n-bnav { top: 6px; }
#net .n-bnav + .n-tip { top: 32px; }
#net .n-bexit { left: 752px; top: 6px; width: 38px; height: 23px; background-image: url(/img/net/blog_btn_exit_152x23.webp); }
#net .n-bexit:hover { background-position: -38px 0; } #net .n-bexit:active { background-position: -76px 0; }
#net .n-btext { position: absolute; left: 76px; top: 98px; width: 648px; height: 404px; overflow-y: auto; font-size: 16px; line-height: 26px; user-select: text;
  scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .4) transparent; }
#net .n-btext .n-sp1 { float: right; width: 0; height: 312px; }
#net .n-btext .n-sp2 { float: right; clear: right; width: 178px; height: 0; }
#net .n-btext .n-bh { text-indent: 1em; margin-bottom: 26px; }
#net .n-btext p { margin: 0; text-indent: 1em; word-break: break-all; }
#net .n-bsrc { position: absolute; left: 76px; top: 508px; width: 470px; font-size: 11px; font-weight: 500; line-height: 16px; }
#net .n-bsrc a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
#net .n-bsrc a:hover { color: #ffe9c4; }
#net .n-foot { position: absolute; left: 560px; top: 416px; width: 176px; padding: 5px 9px 6px; font-weight: 500; font-size: 11px; line-height: 17px;
  background: rgba(10, 6, 24, .5); border: 1px solid rgba(255, 255, 255, .7); box-shadow: 0 0 0 1px #1a0f24; }
#net .n-ft { font-weight: 700; font-size: 11px; letter-spacing: 2px; border-bottom: 1px solid rgba(255, 255, 255, .4); margin-bottom: 3px; }
#net .n-frows { font-weight: 400; font-size: 11px; min-height: 85px; }
#net .n-frows div { display: flex; justify-content: space-between; }
/* BLOG list (over the menu) */
#net .n-blist { z-index: 15; }
#net .n-lrow { position: absolute; font-size: 15px; font-weight: 500; line-height: 1.4; text-align: left; white-space: nowrap; }
#net .n-lrow .n-ltx { display: block; max-width: 246px; overflow: hidden; white-space: nowrap; }
#net .n-lrow:hover { color: #ffe9c4; }
#net .n-new { position: absolute; left: 0; top: -7px; font: 700 8px/8px 'M PLUS Rounded 1c', sans-serif; letter-spacing: .5px; color: #fefe20; }
#net .n-lpage { left: 24px; top: 576px; font-size: 12px; font-weight: 700; }
#net .n-lpg { top: 574px; }
#net .n-lpager[hidden] { display: none; }

/* pop-out (/net/?pop=1): only the 800×600 content, the browser window is the frame */
body.n-popped { overflow: hidden; }
body.n-popped #net { border: 0; padding: 0; background: #000; clip-path: none; width: 800px; }
body.n-popped #net .n-tb { display: none; }

/* standalone page (/net, /net/irc, /net/bbs) */
body.netpage { margin: 0; min-height: 100vh; background: #07050f radial-gradient(ellipse at 50% 40%, #1a1338 0, #07050f 70%); }

/* the button that opens it (home, リンク panel) */
.netbtn { display: block; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; }
.netbtn img { width: 88px; height: 31px; }
.netbtn:hover img, .netbtn.on img { outline: 2px solid #ffe14a; }

/* backgrounds: the chosen picture (or the fx0602 loop) at the bottom; non-default ones get a dark layer between the shell bars */
#net .n-bgslot video, #net .n-bgslot img { object-fit: cover; }
#net .n-dimlayer { display: none; position: absolute; left: 0; top: 59px; width: 800px; height: 513px; background: rgba(8, 6, 24, .58); }
#net .n-alt .n-dimlayer { display: block; }
/* background picker (over the menu) */
#net .n-pick { z-index: 15; }
#net .n-plabel { left: 30px; font-size: 15px; font-weight: 700; letter-spacing: 1px; }
#net .n-th { position: absolute; width: 122px; height: 92px; padding: 0; border: 1px solid rgba(255, 255, 255, .62); box-shadow: 0 0 0 1px #1a0f24; }
#net .n-th img { display: block; width: 120px; height: 90px; }
#net .n-th .n-play { position: absolute; right: 4px; bottom: 4px; width: 18px; height: 14px; }
#net .n-th:hover { border-color: #fff; box-shadow: 0 0 0 1px #1a0f24, 0 0 9px rgba(255, 255, 255, .75); }
#net .n-th:hover img:first-child { filter: brightness(1.12); }
#net .n-cap { position: absolute; width: 122px; text-align: center; font: 700 11px/1.5 'M PLUS Rounded 1c', sans-serif; pointer-events: none; }
#net .n-th:hover + .n-cap { color: #ffe9c4; }
#net .n-pcur { pointer-events: none; }
