/* SakuSaku Multilingual – language switcher */
.sakuml-switcher { --sakuml-radius: 10px; }
.sakuml-switcher a { text-decoration: none; display: inline-flex; align-items: center; gap: .4em; }
.sakuml-switcher .sakuml-current > a { font-weight: 600; }
.sakuml-flag { font-size: 1.15em; line-height: 1; display: inline-block; }
img.sakuml-flag { width: 20px; height: auto; border-radius: 2px; vertical-align: middle; }
.sakuml-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* List */
ul.sakuml-switcher--list { list-style: none; margin: 0; padding: 0; }
ul.sakuml-switcher--list li { margin: .3em 0; }

/* Inline */
ul.sakuml-switcher--inline { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: .35em 1em; }
ul.sakuml-switcher--inline li { margin: 0; }

/* Dropdown */
.sakuml-switcher--dropdown select { max-width: 100%; }

/* Popup (details/summary) */
details.sakuml-switcher--popup { position: relative; display: inline-block; font-size: 15px; line-height: 1.4; }
details.sakuml-switcher--popup > summary {
	list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .45em;
	padding: .45em .85em; border-radius: 999px; background: #fff; color: #1e1e1e;
	border: 1px solid rgba(0, 0, 0, .14); box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
	user-select: none;
}
details.sakuml-switcher--popup > summary::-webkit-details-marker { display: none; }
details.sakuml-switcher--popup > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.sakuml-caret { width: .45em; height: .45em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); margin-left: .15em; opacity: .7; }
details[open].sakuml-switcher--popup .sakuml-caret { transform: rotate(-135deg) translateY(-2px); }
details.sakuml-switcher--popup > ul {
	position: absolute; top: calc(100% + 6px); left: 0; z-index: 1000; min-width: 190px;
	list-style: none; margin: 0; padding: 6px; background: #fff; color: #1e1e1e;
	border-radius: var(--sakuml-radius); box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
}
details.sakuml-switcher--popup li { margin: 0; }
details.sakuml-switcher--popup li a { display: flex; padding: .45em .7em; border-radius: 6px; color: inherit; }
details.sakuml-switcher--popup li a:hover,
details.sakuml-switcher--popup li a:focus { background: #f0f0f1; }
details.sakuml-switcher--popup li.sakuml-current a { background: #f6f7f7; }

/* Globe: [globe] EN [v] — inherits the text color of where it is placed */
details.sakuml-switcher--globe { position: relative; display: inline-block; vertical-align: middle; line-height: 1; color: inherit; }
details.sakuml-switcher--globe > summary {
	list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .5em;
	padding: .4em .55em; margin: 0; border-radius: 8px; color: inherit; background: transparent;
	font: inherit; font-weight: 700; letter-spacing: .02em; user-select: none; -webkit-tap-highlight-color: transparent;
	transition: background-color .15s ease;
}
details.sakuml-switcher--globe > summary::-webkit-details-marker { display: none; }
details.sakuml-switcher--globe > summary::marker { content: ""; }
details.sakuml-switcher--globe > summary:hover,
details[open].sakuml-switcher--globe > summary { background: rgba(127, 127, 127, .16); }
details.sakuml-switcher--globe > summary:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.sakuml-switcher--globe .sakuml-icon { flex: none; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.sakuml-switcher--globe .sakuml-icon-globe { width: 1.3em; height: 1.3em; stroke-width: 1.6; }
.sakuml-switcher--globe .sakuml-icon-chevron { width: 1em; height: 1em; stroke-width: 2.4; transition: transform .2s ease; }
details[open].sakuml-switcher--globe .sakuml-icon-chevron { transform: rotate(180deg); }
details.sakuml-switcher--globe > summary .sakuml-code { font-size: 1em; line-height: 1; }
details.sakuml-switcher--globe > .sakuml-menu {
	position: absolute; top: calc(100% + 8px); right: 0; left: auto; z-index: 99999;
	min-width: 210px; margin: 0; padding: 6px; list-style: none; text-align: left;
	background: #fff; color: #1e1e1e; border-radius: 12px; font-size: 15px; font-weight: 400; line-height: 1.3; letter-spacing: normal;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .16), 0 0 0 1px rgba(0, 0, 0, .06);
}
details.sakuml-switcher--globe.sakuml-align-left > .sakuml-menu,
details.sakuml-switcher--globe.sakuml-flip > .sakuml-menu { left: 0; right: auto; }
details.sakuml-switcher--globe.sakuml-align-left.sakuml-flip > .sakuml-menu { left: auto; right: 0; }
details.sakuml-switcher--globe .sakuml-menu li { margin: 0; padding: 0; list-style: none; border: 0; background: none; }
details.sakuml-switcher--globe .sakuml-menu li::before { content: none; }
details.sakuml-switcher--globe .sakuml-menu a {
	display: flex; align-items: center; gap: .75em; padding: .6em .75em; border-radius: 8px;
	color: #1e1e1e; text-decoration: none; box-shadow: none; white-space: nowrap;
}
details.sakuml-switcher--globe .sakuml-menu a:hover,
details.sakuml-switcher--globe .sakuml-menu a:focus-visible { background: #f1f3f6; color: #1e1e1e; outline: none; }
details.sakuml-switcher--globe .sakuml-menu .sakuml-code {
	flex: none; min-width: 2.1em; font-size: .78em; font-weight: 700; letter-spacing: .04em; color: #646970;
}
details.sakuml-switcher--globe .sakuml-menu .sakuml-name { flex: 1 1 auto; }
details.sakuml-switcher--globe .sakuml-menu .sakuml-current a { font-weight: 600; }
details.sakuml-switcher--globe .sakuml-menu .sakuml-current .sakuml-code { color: inherit; }
details.sakuml-switcher--globe .sakuml-icon-check { width: 1.1em; height: 1.1em; stroke-width: 2.4; margin-left: auto; }

/* Floating */
.sakuml-floating { position: fixed; bottom: 20px; z-index: 99990; }
.sakuml-floating details.sakuml-switcher--globe > summary {
	padding: .65em .95em; border-radius: 999px; font-size: 15px; background: #fff; color: #1e1e1e;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .14), 0 0 0 1px rgba(0, 0, 0, .06);
}
.sakuml-floating details.sakuml-switcher--globe > summary:hover,
.sakuml-floating details[open].sakuml-switcher--globe > summary { background: #f6f7f7; }
.sakuml-floating details.sakuml-switcher--globe > .sakuml-menu { top: auto; bottom: calc(100% + 8px); }
.sakuml-floating--bottom-right { right: 20px; }
.sakuml-floating--bottom-left { left: 20px; }
.sakuml-floating details.sakuml-switcher--popup > ul { top: auto; bottom: calc(100% + 8px); }
.sakuml-floating--bottom-right details.sakuml-switcher--popup > ul { left: auto; right: 0; }

@media (prefers-color-scheme: dark) {
	details.sakuml-switcher--popup > summary,
	details.sakuml-switcher--popup > ul { background: #1f1f1f; color: #f0f0f0; border-color: rgba(255, 255, 255, .16); }
	details.sakuml-switcher--popup li a:hover,
	details.sakuml-switcher--popup li a:focus,
	details.sakuml-switcher--popup li.sakuml-current a { background: #2c2c2c; }
}

/* Menu switcher */
.sakuml-menu-item .sakuml-flag { margin-right: .1em; }
.sakuml-menu-item svg.sakuml-menu-icon { display: inline-block; width: 1.25em; height: 1.25em; margin: 0; vertical-align: -.28em; fill: none; stroke: currentColor; }
.sakuml-menu-item svg.sakuml-menu-chevron { display: none; width: 1em; height: 1em; margin: 0 0 0 .3em; vertical-align: -.15em; fill: none; stroke: currentColor; transition: transform .2s ease; }
/* tagDiv (Newspaper) header menu: our arrow replaces the menu's own sub-menu icon on this item.
   The mobile menu keeps tagDiv's own expand arrow. */
.sakuml-tagdiv .tdb-menu .sakuml-menu-globe > a svg.sakuml-menu-chevron { display: inline-block; }
.sakuml-tagdiv .tdb-menu .sakuml-menu-globe > a > .tdb-sub-menu-icon { display: none !important; }
.sakuml-tagdiv .tdb-menu .sakuml-menu-globe:hover > a svg.sakuml-menu-chevron { transform: rotate(180deg); }
