/* The width of the sidebar: the slider and its buttons are centred in the page beside it. */
:root { --page-left: 260px; }
/* The prism of a server's tabs (views/server-cube.js), always 3D: the body of the tab in front, the sides next to it at its edges. */
.cube-stage { --peek: clamp(22px, 6vw, 190px); position: relative; flex: 1 1 0; width: clamp(280px, calc(100% - 2 * var(--peek)), 2200px); min-height: 320px; margin: 10px auto 0; perspective: calc(var(--R, 540px) * 2.6); }
.cube-stage { touch-action: pan-y; }
.cube-hit { touch-action: none; }
.cube-stage.dragging { cursor: grabbing; user-select: none; -webkit-user-select: none; }
.cube-prism { position: absolute; inset: 0; transform-style: preserve-3d; transform: translateZ(calc(var(--R, 540px) * -1)) rotateY(var(--a, 0deg)); }
.cube-stage.snap .cube-prism { transition: transform var(--glide, 0.46s) cubic-bezier(0.3, 1.45, 0.5, 1); }
.cube-face { position: absolute; inset: 0; transform: rotateY(var(--r, 0deg)) translateZ(var(--R, 540px)); -webkit-backface-visibility: hidden; backface-visibility: hidden;
  overflow: auto; padding: 14px 16px; border-radius: var(--radius-card); background: var(--card-glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 30px 60px -20px rgba(0, 0, 0, 0.5); }
.cube-face.near > .server-tab-body { pointer-events: none; }
.cube-face > .server-tab-body { display: block; height: 100%; min-height: 0; } /* (block: a table in a flex column took the width of its content, and its text broke letter by letter) */
.cube-face .server-tab-body table { width: 100%; }
/* What is in a side fills it: the forms are not held to the widths of a page, the console takes the height. */
.cube-face { container-type: inline-size; }
/* The settings fill the side in two columns (the look of the server and its settings; then the save row across; the template and the delete). */
.cube-face .mc-settings-form { max-width: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.cube-face .mc-settings-form > :not(section) { grid-column: 1 / -1; }
@container (max-width: 760px) { .cube-face .mc-settings-form { grid-template-columns: minmax(0, 1fr); } }
.cube-face .mc-console { height: 100%; min-height: 0; }
/* a long console stays inside its side and scrolls there */
.cube-face .mc-log { height: 0; flex: 1 1 0; min-height: 120px; overflow: auto; overflow-wrap: anywhere; }
/* A side next to the body: pointing at it dims it and shows the name of its tab with an arrow towards it, on the edge that shows. */
.cube-hit { position: absolute; inset: 0; z-index: 3; border: 0; border-radius: inherit; background: transparent; cursor: pointer; transition: background-color 0.18s ease; }
.cube-hit:hover, .cube-hit:focus-visible { background: color-mix(in srgb, var(--bg) 40%, transparent); }
/* The name of the tab of a side that is pointed at, with an arrow towards it: on the stage (flat, so it stands straight), beside the front side
   where the side next to it shows. */
.cube-label { position: absolute; top: 50%; z-index: 6; display: flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--separator); color: var(--text); font-size: 22px; line-height: 1; white-space: nowrap; pointer-events: none; opacity: 0; transform: translateY(-50%) scale(0.9); transition: opacity 0.18s ease, transform 0.25s cubic-bezier(0.3, 1.5, 0.5, 1); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.cube-label b { font-size: 16px; }
.cube-label.r { left: calc(100% + 12px); }
.cube-label.l { right: calc(100% + 12px); }
.cube-stage.peek-r .cube-label.r, .cube-stage.peek-l .cube-label.l { opacity: 1; transform: translateY(-50%); }
.cube-ph { display: grid; align-content: center; justify-items: center; gap: 6px; height: 100%; color: var(--muted); text-align: center; }
.cube-ph svg { width: 64px; height: 64px; color: var(--accent); }
.cube-ph b { color: var(--text); font-size: 26px; }
@media (prefers-reduced-motion: reduce) { .cube-stage.snap .cube-prism { transition: none; } }
@media (max-width: 760px) { .cube-face { padding: 10px; } }

/* The page of a server with the prism: the head is in the middle, over a soft dark vignette, as in the design. */
.cube-page { overflow-x: clip; /* the sides next to the body reach out to the edges of the page, not under the sidebar or past the window */ background: radial-gradient(60% 60% at 50% 45%, color-mix(in srgb, var(--bg) 30%, transparent), color-mix(in srgb, var(--bg) 78%, transparent)); }
.cube-page { display: flex; flex-direction: column; min-height: 100dvh; }
/* (28px more under the stage, so that it does not touch the buttons and the slider) */
body.has-lgtb .page.cube-page { padding-bottom: calc(var(--lgtb-bottom) + 62px + 12px + 52px + 18px + 28px + env(safe-area-inset-bottom, 0px)); }
.cube-page > .server-area { display: flex; flex: 1; flex-direction: column; min-height: 0; }
/* The head (with the address and its copy and change buttons), the notes: whole, never squeezed by the prism, which takes what is left. */
.cube-page .server-area > :not(.cube-stage) { flex: none; }
.cube-page .server-head, .cube-page .server-head-text { flex-direction: column; align-items: center; text-align: center; }
.cube-page .server-head { margin-bottom: 28px; } /* (and 28px between the address and the stage) */
.cube-page .server-title-row, .cube-page .server-address, .cube-page .server-controls { justify-content: center; }
/* The address, its copy button and the change button stay on one line (the copy field has a width of its own to share). */
.cube-page .server-address { flex-wrap: nowrap; max-width: 100%; }
.cube-page .server-address .copy-field { flex: 0 1 460px; min-width: 200px; }
.cube-page .server-address .btn { flex: none; }
.cube-page .server-address-note { flex-basis: auto; }
.cube-page .page-title { font-size: 34px; letter-spacing: -0.02em; }
.cube-page .server-notes, .cube-page .mp-card, .cube-page .modpack { max-width: 940px; margin-inline: auto; }

/* The start, stop and kill buttons sit on the slider (in the middle of the page, not of the window), and the unsaved-changes bar above them. */
.cube-dock { position: fixed; z-index: 49; left: var(--page-left, 260px); right: 0; bottom: calc(var(--lgtb-bottom) + 62px + 12px + env(safe-area-inset-bottom, 0px)); display: flex; justify-content: center; gap: 8px; pointer-events: none; }
.cube-dock > * { pointer-events: auto; }
.cube-dock .server-controls { display: flex; gap: 8px; padding: 6px; border-radius: 999px; background: var(--glass-strong); border: 1px solid var(--separator); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); }
.cube-dock .btn { border-radius: 999px; }
body.has-lgtb .lgtb { left: var(--page-left, 260px); }
body.has-lgtb .unsaved-bar { bottom: calc(var(--lgtb-bottom) + 62px + 12px + 52px + 12px + env(safe-area-inset-bottom, 0px)); left: calc(var(--page-left, 260px) + (100vw - var(--page-left, 260px)) / 2); }
@media (max-width: 760px) {
  :root { --page-left: 0px; }
  .cube-dock { bottom: calc(var(--lgtb-bottom) + 62px + 12px); }
}

/* The choice of the look of the page of a server (cube or list), big, at the top left. */
.view-bar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.view-bar .view-switch { margin: 0; }
/* 서버 목록: the way back, a button at the top left */
.view-bar .server-back { margin: 0; padding: 10px 18px 10px 12px; border: 1px solid var(--separator); border-radius: 999px; background: var(--fill); color: var(--text); font-size: 15px; font-weight: 700; text-decoration: none; }
.view-bar .server-back:hover { background: var(--surface-2); }
.view-bar .server-back .icon { width: 16px; height: 16px; }
.cube-page .view-bar { position: absolute; top: 18px; left: 24px; z-index: 30; margin: 0; }
.view-tour-again { padding: 9px 16px; border: 1px solid var(--separator); border-radius: 999px; background: var(--fill); color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.view-tour-again:hover { color: var(--text); }
.view-switch { display: inline-flex; gap: 4px; margin: 0 0 14px; padding: 5px; border-radius: 999px; background: var(--fill); border: 1px solid var(--separator); }
.view-switch-opt { min-width: 84px; padding: 10px 22px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: background-color 0.18s ease, color 0.18s ease; }
.view-switch-opt.on { background: var(--yellow); color: var(--on-yellow); box-shadow: 0 2px 0 #c99700; }
.cube-page { position: relative; }

/* The tour of the prism (views/server-tour.js): a finger that pulls the next side to the left, the prism nodding with it, and a note. */
@property --a { syntax: "<angle>"; inherits: true; initial-value: 0deg; }
@keyframes cube-nod { 0%, 25% { --a: 0deg; } 60%, 70% { --a: -22deg; } 100% { --a: 0deg; } }
@keyframes cube-finger { 0%, 12% { transform: translateX(0); opacity: 0; } 25% { opacity: 1; } 60%, 70% { transform: translateX(-130px); opacity: 1; } 85%, 100% { transform: translateX(-130px); opacity: 0; } }
@keyframes cube-ring { 0%, 20% { transform: scale(0.6); opacity: 0; } 30% { transform: scale(1); opacity: 0.9; } 70% { transform: scale(1.5); opacity: 0; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: no-preference) {
  .cube-stage.tour:not(.snap):not(.dragging) .cube-prism { animation: cube-nod 3s ease-in-out infinite; }
  .cube-tour-finger { animation: cube-finger 3s ease-in-out infinite; }
  .cube-tour-finger i { animation: cube-ring 3s ease-out infinite; }
}
.cube-tour-finger { position: absolute; top: 50%; right: -150px; z-index: 7; width: 44px; height: 44px; margin-top: -22px; pointer-events: none; }
.cube-tour-finger em { position: absolute; inset: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5); }
.cube-tour-finger i { position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--yellow); }
.cube-tour-card { position: absolute; top: 14px; right: 14px; z-index: 7; display: grid; gap: 4px; max-width: 280px; padding: 14px 16px; border-radius: var(--radius-card); background: var(--glass-strong); border: 1px solid var(--separator); box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.6); -webkit-backdrop-filter: var(--blur); backdrop-filter: var(--blur); color: var(--text); font-size: 13px; line-height: 1.45; }
.cube-tour-card b { font-size: 15px; }
.cube-tour-card.slider { position: fixed; top: auto; right: auto; left: calc(var(--page-left, 260px) + (100vw - var(--page-left, 260px)) / 2); bottom: calc(var(--lgtb-bottom) + 62px + 12px + 52px + 12px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 52; text-align: center; }
.cube-tour-skip { justify-self: end; margin-top: 4px; padding: 4px 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; }
@media (max-width: 760px) { .cube-tour-finger { right: -40px; } .cube-tour-card { top: auto; bottom: 10px; right: 10px; left: 10px; max-width: none; } .cube-page .view-bar { left: 12px; top: 10px; flex-wrap: wrap; max-width: calc(100% - 24px); } .view-switch-opt { min-width: 64px; padding: 8px 14px; } }
@media (max-width: 1180px) { .cube-page .server-head { margin-top: 58px; } } /* the title does not run into the buttons at the top left */

/* The still pictures of the sides next to the body (server-cube.js skeleton): the boxes of the real tabs, in their layout. All the text in them is blurred
   (the letters are clear, their shadow is the blur), so that nothing of the server's own can be read; no filter, so the rounded clip of the side holds. */
.cube-skel { display: flex; flex-direction: column; gap: 12px; height: 100%; pointer-events: none; overflow: hidden; }
.cube-skel * { color: transparent !important; text-shadow: 0 0 7px color-mix(in srgb, var(--text) 62%, transparent); }
.cube-skel .mc-line.warn { text-shadow: 0 0 7px color-mix(in srgb, var(--warn) 80%, transparent); }
.cube-skel .btn.primary { text-shadow: 0 0 6px color-mix(in srgb, var(--on-yellow) 70%, transparent); }
.cube-skel .mc-log { height: auto; flex: 1; min-height: 0; overflow: hidden; }
.cube-skel .mc-console { height: 100%; }
.cube-skel .pv-btn { cursor: default; }
.cube-sample-input { display: flex; align-items: center; min-height: 40px; padding: 0 12px; }
.cube-sample-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pv-col { display: flex; flex-direction: column; gap: 16px; }
.pv-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.pv-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.pv-sw { width: 30px; height: 30px; border-radius: 8px; background: #888; }
.pv-sw.s0 { background: #000; } .pv-sw.s1 { background: #1a1aaa; } .pv-sw.s2 { background: #3fa535; } .pv-sw.s3 { background: #4aa7a7; } .pv-sw.s4 { background: #aa2a1a; } .pv-sw.s5 { background: #a22aaa; } .pv-sw.s6 { background: #f2b53a; } .pv-sw.s7 { background: #aaaaaa; }
.pv-motd { display: flex; gap: 10px; padding: 10px; border: 2px solid var(--separator); background: #000; }
.pv-motdtext { display: flex; flex-direction: column; gap: 6px; font: 13px/1.4 var(--mono); }
.pv-ico { flex: none; display: inline-block; width: 16px; height: 16px; margin-right: 6px; border-radius: 4px; vertical-align: -3px; background: color-mix(in srgb, var(--accent) 55%, transparent); }
.pv-motd .pv-ico { width: 64px; height: 64px; margin: 0; border-radius: 6px; background: #3a3a3a; }
.pv-ico.dir { background: color-mix(in srgb, var(--accent) 70%, transparent); }
.pv-ico.json, .pv-ico.cfg { background: color-mix(in srgb, #f5d442 80%, transparent); }
.pv-ico.img { background: color-mix(in srgb, #ff6b8a 70%, transparent); }
.pv-ico.jar { background: color-mix(in srgb, #b28dff 70%, transparent); }
.pv-check { flex: none; display: inline-block; width: 16px; height: 16px; border-radius: 4px; background: color-mix(in srgb, var(--text) 30%, transparent); }
.pv-checkrow { display: flex; align-items: center; gap: 10px; }
.pv-checkrow.on .pv-check { background: var(--accent); }
.pv-panehead { display: flex; justify-content: space-between; font-size: 12px; }
.pv-filepane { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.pv-filepane .mc-files { width: 100%; }
.pv-filepane .pv-c { width: 28px; }
.pv-r { text-align: right; white-space: nowrap; }
.pv-mods { display: flex; flex-direction: column; gap: 12px; }
.pv-drop { padding: 18px; border: 1px dashed var(--separator); border-radius: 10px; text-align: center; }
.pv-search { max-width: 320px; }
.pv-modrow { display: flex; align-items: center; gap: 14px; padding: 14px 8px; border-bottom: 1px solid var(--separator); font-size: 14px; }
.pv-grow { flex: 1; }
.pv-date { width: 170px; text-align: right; }
.pv-players { display: flex; flex-direction: column; gap: 14px; }

/* The page of a server enters without the rise of its panel (style.css panel-up): a transform on the area that holds the buttons at the top left (they are
   placed against the page) put them in the wrong place until it was over. */
.page-fade .page.server-veil.cube-page > * { animation: none; }

/* The file explorer ends with its side: the panes take the height of the side, and each list scrolls in its pane (a pane has no length of its own here). */
.cube-face > .server-tab-body:has(> .mc-tabs-wrap) { display: flex; flex-direction: column; }
.cube-face .mc-tabs-wrap { flex: 1; min-height: 0; }
.cube-face .mc-dual-area { height: 100%; min-height: 0; }
.cube-face .mc-dual-area.mc-dual { grid-auto-rows: minmax(0, 1fr); align-items: stretch; }
.cube-face .mc-dual-area > .mc-pane { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.cube-face .mc-dual-area:not(.mc-dual) > .mc-pane { overflow: hidden; }
.cube-face .mc-pane-body, .cube-face .mc-files-browser { display: flex; flex: 1; flex-direction: column; min-height: 0; }
.cube-face .mc-files-list { flex: 1; min-height: 0; overflow: auto; }
.cube-face .mc-files-fill { min-height: 24px; }
.cube-face .mc-newtab { min-height: 0; align-self: stretch; }
