/* web-sidebar : "전체 메뉴" drawer sliding in from the right.
   Header = --web-primary-foreground (dark bar); body = --web-background (light).
   Rows run edge to edge — horizontal padding lives on each row, not on the body. */

.web-sidebar {
	--ws-text: #212529;
	--ws-muted: #868e96;
	--ws-line: #e9ecef;
	--ws-hover: rgba(0,0,0,.04);
	--ws-pad: 1.25rem;
	--ws-sub-pad: 2.25rem; /* sub menu indent */

	position:fixed; top:0; right:0; z-index:500;
	width:340px; max-width:88vw; height:100%;
	display:flex; flex-direction:column;
	background:var(--web-background);
	color:var(--ws-text);
	box-shadow:-8px 0 30px rgba(0,0,0,.25);
	transform:translateX(105%);
	visibility:hidden;
	transition:transform .28s ease, visibility 0s linear .28s;
}
.web-sidebar.is-open { transform:none; visibility:visible; transition:transform .28s ease; }
.web-sidebar a { color:inherit; }
.web-sidebar a:hover { text-decoration:none; }
.web-sidebar button { font:inherit; color:inherit; background:none; border:0; padding:0; cursor:pointer; }

.ws-mask {
	position:fixed; inset:0; z-index:499;
	background:rgba(0,0,0,.6);
	opacity:0; visibility:hidden;
	transition:opacity .28s ease, visibility 0s linear .28s;
}
.ws-mask.is-open { opacity:1; visibility:visible; transition:opacity .28s ease; }
html.ws-lock, html.ws-lock body { overflow:hidden; }

/* --- Header (the only dark area) --- */
.web-sidebar .ws-head {
	flex:0 0 auto;
	display:flex; align-items:center; gap:.5rem;
	padding:.9rem 1rem .9rem var(--ws-pad);
	background:var(--web-primary-foreground);
	color:#fff;
}
.web-sidebar .ws-title { flex:1 1 auto; margin:0; font-size:17px; font-weight:800; color:#fff; }
.web-sidebar .ws-back { display:none; width:28px; margin-left:-.4rem; font-size:24px; line-height:1; color:rgba(255,255,255,.7); }
.web-sidebar.is-sub .ws-back { display:block; }
.web-sidebar .ws-close {
	flex:0 0 40px; height:40px;
	display:flex; align-items:center; justify-content:center;
	border:1px solid rgba(255,255,255,.2); border-radius:10px;
	color:#fff;
	transition:background .15s ease;
}
.web-sidebar .ws-close:hover,
.web-sidebar .ws-back:hover { background:rgba(255,255,255,.1); color:#fff; }

/* --- Body / panels --- */
.web-sidebar .ws-body {
	flex:1 1 auto; min-height:0;
	overflow-y:auto; overflow-x:hidden; -webkit-overflow-scrolling:touch;
	padding:0 0 2rem;
	scrollbar-width:thin;
}
.web-sidebar .ws-panel { display:none; }
.web-sidebar .ws-panel.is-active { display:block; }

/* --- Buttons --- */
.web-sidebar .ws-auth { display:flex; gap:.5rem; padding:1rem var(--ws-pad); }
.web-sidebar .ws-btn {
	flex:1 1 0;
	display:flex; align-items:center; justify-content:center;
	height:44px; border-radius:10px;
	font-size:15px; font-weight:700; white-space:nowrap;
	transition:background .15s ease, border-color .15s ease, filter .15s ease;
}
.web-sidebar .ws-btn-fill {
	background:var(--web-primary-foreground);
	color:#fff;
}
.web-sidebar .ws-btn-fill:hover { color:#fff; background:color-mix(in srgb, var(--web-primary-foreground) 85%, #fff); }
.web-sidebar .ws-btn-line { background:#fff; border:1px solid #dee2e6; color:var(--web-primary-foreground); }
.web-sidebar .ws-btn-line:hover { border-color:var(--web-primary-foreground); color:var(--web-primary-foreground); }
.web-sidebar .ws-btn-block { flex:none; width:100%; }

/* --- User card --- */
.web-sidebar .ws-user {
	display:flex; align-items:center; gap:.75rem;
	padding:1rem var(--ws-pad) 0;
}
.web-sidebar .ws-user-photo { width:44px; height:44px; border-radius:50%; object-fit:cover; }
.web-sidebar .ws-user-info { flex:1 1 auto; min-width:0; display:flex; flex-direction:column; }
.web-sidebar .ws-user-nick { color:var(--web-primary-foreground); font-size:15px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.web-sidebar .ws-user-meta { color:var(--ws-muted); font-size:13px; }
.web-sidebar .ws-user-meta .en,
.web-sidebar .ws-user-meta a { color:var(--web-primary-hover); }
.web-sidebar .ws-user-noti { position:relative; width:38px; height:38px; border-radius:10px; font-size:17px; color:var(--ws-text); }
.web-sidebar .ws-user-noti:hover { background:var(--ws-hover); }
.web-sidebar .ws-user-noti b {
	position:absolute; top:2px; right:0;
	min-width:17px; padding:0 4px; border-radius:9px;
	background:#ff4d5e; color:#fff; font-size:10px; line-height:17px; text-align:center;
}

/* --- Menu accordion (edge-to-edge rows) --- */
.web-sidebar .ws-ul,
.web-sidebar .ws-ul1,
.web-sidebar .ws-ul2 { list-style:none; margin:0; padding:0; }
.web-sidebar .ws-ul { border-top:1px solid var(--ws-line); }
.web-sidebar .ws-li { border-bottom:1px solid var(--ws-line); }
.web-sidebar .ws-row { display:flex; align-items:center; }
.web-sidebar .ws-a {
	flex:1 1 auto; min-width:0;
	padding:.95rem var(--ws-pad);
	font-weight:700; color:var(--web-primary-foreground); /* size from .f-sm */
}
.web-sidebar .ws-li.active > .ws-row .ws-a { color:var(--web-primary-hover); }
.web-sidebar .ws-toggle { position:relative; flex:0 0 52px; align-self:stretch; color:var(--ws-muted); }
.web-sidebar .ws-toggle::before,
.web-sidebar .ws-toggle::after {
	content:""; position:absolute; top:50%; left:50%;
	width:11px; height:1.5px; margin:-.75px 0 0 -5.5px;
	background:currentColor; border-radius:1px;
	transition:transform .2s ease;
}
.web-sidebar .ws-toggle::after { transform:rotate(90deg); }         /* + */
.web-sidebar .ws-li.open .ws-toggle::after { transform:rotate(0); } /* − */
.web-sidebar .ws-toggle:hover { color:var(--web-primary-foreground); }

.web-sidebar .ws-ul1 { display:none; padding:0; }
.web-sidebar .ws-li1,
.web-sidebar .ws-line { border-top:1px solid var(--ws-line); } /* edge-to-edge divider on each sub item */
.web-sidebar .ws-li.open > .ws-ul1 { display:block; }
/* Open group: tinted parent row + a stronger closing border after the last sub item */
.web-sidebar .ws-li.open > .ws-row { background:color-mix(in srgb, var(--web-primary) 9%, #fff); }
.web-sidebar .ws-li.open { border-bottom-color:color-mix(in srgb, var(--web-primary) 55%, #fff); }
.web-sidebar .ws-a1,
.web-sidebar .ws-a2 {
	display:block;
	padding:.75rem var(--ws-pad) .75rem var(--ws-sub-pad);
	color:var(--ws-text); /* size from .f-sm */
	transition:background .15s ease, color .15s ease;
}
/* Sub item count badge (slots categories) */
.web-sidebar .ws-a1 { display:flex; align-items:center; justify-content:space-between; gap:.5rem; }
.web-sidebar .ws-cnt {
	flex:0 0 auto; min-width:26px; padding:0 7px;
	border-radius:4px; background:var(--web-primary-foreground); color:var(--web-primary);
	font-size:11px; font-weight:700; line-height:20px; text-align:center;
}
.web-sidebar .ws-a1:hover,
.web-sidebar .ws-a2:hover { background:var(--ws-hover); color:var(--web-primary-foreground); }
.web-sidebar .ws-li1.active > .ws-a1,
.web-sidebar .ws-li2.active > .ws-a2 { color:var(--web-primary-hover); font-weight:700; }
.web-sidebar .ws-a2 { padding-left:calc(var(--ws-sub-pad) + .75rem); color:var(--ws-muted); }
.web-sidebar .ws-line { padding:.6rem var(--ws-pad) .25rem var(--ws-sub-pad); font-size:12px; font-weight:700; color:var(--ws-muted); }

/* --- Footer (language + stats) --- */
.web-sidebar .ws-foot {
	display:flex; flex-wrap:wrap; align-items:baseline; gap:.35rem .9rem;
	padding:1rem var(--ws-pad);
	font-size:12.5px; color:var(--ws-muted); line-height:1.6;
}
.web-sidebar .ws-lang { color:var(--ws-text); white-space:nowrap; }

/* --- Login form --- */
.web-sidebar .ws-form { padding:1.25rem var(--ws-pad) 0; }
.web-sidebar .ws-field {
	display:flex; align-items:center;
	margin-bottom:.55rem;
	border:1px solid #dee2e6; border-radius:10px;
	background:#fff;
	transition:border-color .15s ease;
}
.web-sidebar .ws-field:focus-within { border-color:var(--web-primary-foreground); }
.web-sidebar .ws-field .fa { flex:0 0 40px; text-align:center; color:#adb5bd; }
.web-sidebar .ws-field input {
	flex:1 1 auto; min-width:0; height:46px;
	padding:0 .75rem 0 0;
	border:0; outline:0; background:transparent;
	color:var(--web-primary-foreground); font-size:15px;
}
.web-sidebar .ws-field input::placeholder { color:#adb5bd; }
.web-sidebar .ws-check { display:flex; align-items:center; gap:.45rem; margin:.3rem 0 1rem; font-size:14px; color:var(--ws-text); cursor:pointer; }
.web-sidebar .ws-check input { width:16px; height:16px; accent-color:var(--web-primary); }
.web-sidebar .ws-form-links { display:flex; justify-content:center; gap:.6rem; margin-top:1rem; font-size:14px; color:var(--ws-muted); }
.web-sidebar .ws-form-links a:hover { color:var(--web-primary-foreground); }
.web-sidebar .ws-social { padding:1.25rem var(--ws-pad) 0; }

/* --- User panel --- */
.web-sidebar .ws-xp { padding:1rem var(--ws-pad) 0; font-size:13px; color:var(--ws-muted); }
.web-sidebar .ws-xp-label { display:flex; justify-content:space-between; margin-bottom:.3rem; }
.web-sidebar .ws-xp-bar { height:6px; border-radius:3px; background:#e9ecef; overflow:hidden; }
.web-sidebar .ws-xp-bar span { display:block; height:100%; background:var(--web-primary); }
.web-sidebar .ws-links { list-style:none; margin:1rem 0 0; padding:0; border-top:1px solid var(--ws-line); }
.web-sidebar .ws-links li { border-bottom:1px solid var(--ws-line); }
.web-sidebar .ws-links a { display:flex; justify-content:space-between; align-items:center; padding:.85rem var(--ws-pad); font-size:15px; }
.web-sidebar .ws-links a:hover { background:var(--ws-hover); color:var(--web-primary-foreground); }
.web-sidebar .ws-links b.en { color:var(--web-primary-hover); font-size:14px; }
.web-sidebar .ws-badge { min-width:20px; padding:0 6px; border-radius:10px; background:#ff4d5e; color:#fff; font-size:11px; line-height:20px; text-align:center; }

/* --- Noti panel --- */
.web-sidebar .ws-noti-head { display:flex; justify-content:space-between; padding:1rem var(--ws-pad) .6rem; font-size:13px; color:var(--ws-muted); }
.web-sidebar .ws-noti-head a:hover { color:var(--web-primary-foreground); }
.web-sidebar .ws-noti { list-style:none; margin:0; padding:0; border-top:1px solid var(--ws-line); }
.web-sidebar .ws-noti li { border-bottom:1px solid var(--ws-line); }
.web-sidebar .ws-noti a { display:flex; flex-direction:column; gap:.15rem; padding:.8rem var(--ws-pad); font-size:14px; }
.web-sidebar .ws-noti a:hover { background:var(--ws-hover); }
.web-sidebar .ws-noti b { color:var(--web-primary-hover); }
.web-sidebar .ws-noti-subj { color:var(--ws-muted); font-size:13px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.web-sidebar .ws-noti-time { color:var(--ws-muted); font-size:12px; }
.web-sidebar .ws-empty { padding:2rem var(--ws-pad); text-align:center; color:var(--ws-muted); font-size:14px; }

/* --- Go to top --- */
.ws-top {
	position:fixed; right:20px; bottom:20px; z-index:2;
	width:42px; height:42px; border:0; border-radius:50%;
	background:rgba(0,0,0,.5); color:#fff; font-size:17px;
	opacity:0; visibility:hidden; cursor:pointer;
	transition:opacity .2s ease, visibility 0s linear .2s;
}
.ws-top.is-show { opacity:1; visibility:visible; transition:opacity .2s ease; }
