/* 我的台阶：顶栏、问候和玻璃楼梯、我的工具、我参与的、工具页、设置、开屏、离开时收进入口 */

/* ---------- 我的台阶 ---------- */

/* 内容宽度跟着屏幕走：大屏放宽，顶栏和下面的内容左右对齐 */
#my {
  --m-w: clamp(1120px, 80vw, 1560px);
  --m-pad: clamp(16px, 4vw, 48px);
  position: relative;
  z-index: 3;
  min-height: 100vh;
  background:
    radial-gradient(1000px 520px at 12% -10%, rgba(91, 140, 255, .12), transparent 60%),
    radial-gradient(900px 520px at 100% 110%, rgba(255, 122, 217, .08), transparent 60%),
    var(--my-bg);
  color: var(--text);
}
.m-av {
  display: grid;
  flex: none;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .35), transparent 55%), linear-gradient(135deg, var(--c1), var(--c2));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.m-av.big { width: 64px; height: 64px; font-size: 26px; box-shadow: 0 12px 28px -14px rgba(0, 0, 0, .6); }

/* ---------- 顶栏 ---------- */

.m-bar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 max(var(--m-pad), calc((100% - var(--m-w)) / 2 + var(--m-pad)));
  border-bottom: 1px solid var(--line);
  background: var(--my-bar);
  backdrop-filter: blur(14px);
}
.m-brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; color: var(--text); text-decoration: none; font: 700 18px var(--font); letter-spacing: .06em; white-space: nowrap; }
.m-brand .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.m-brand span { overflow: hidden; text-overflow: ellipsis; }
.m-bar-r { display: flex; align-items: center; gap: 10px; transition: opacity .4s; }
.m-site { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text-2); text-decoration: none; font-size: 13px; white-space: nowrap; transition: color .25s, background .25s; }
.m-site .ic { width: 15px; height: 15px; }
.m-site-s { display: none; }
.m-site:hover { background: var(--card-hover); color: var(--text); }
.m-me { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 4px; border: 1px solid var(--line-2); border-radius: 999px; background: transparent; color: var(--text-2); font: 13px var(--font); cursor: pointer; transition: color .25s, background .25s; }
.m-me:hover { background: var(--card-hover); color: var(--text); }
.m-me > span:not(.m-av) { max-width: 8em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-me .ic { width: 15px; height: 15px; }
/* 从个人站登录跳过来时，顶上一个「回到刚才的页面」 */
.m-back {
  position: fixed;
  left: 50%;
  top: 78px;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px 0 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--panel);
  box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .55);
  color: var(--text);
  text-decoration: none;
  font-size: 13.5px;
  transform: translateX(-50%);
  animation: up .5s var(--ease-out) .5s backwards;
}
.m-back .ic { width: 16px; height: 16px; }
.m-back + .m-main { padding-top: calc(clamp(28px, 5vh, 52px) + 44px); }

/* ---------- 问候 ---------- */

.m-main { max-width: var(--m-w); margin: 0 auto; padding: clamp(28px, 5vh, 52px) var(--m-pad) 80px; animation: up .6s var(--ease-out) backwards; }
/* 顶部：左边问候，右边个人站那座玻璃楼梯（可以拖着转） */
.m-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 24px; }
.m-date { display: block; font: 12.5px var(--font-latin); letter-spacing: .08em; color: var(--text-3); }
.m-hero h1 { margin: 10px 0 0; font-size: clamp(30px, 3.2vw, 60px); line-height: 1.2; letter-spacing: .02em; }
.m-hero p { max-width: 30em; margin: 14px 0 0; font-size: clamp(15px, .95vw, 18px); line-height: 1.8; color: var(--text-2); }
.stairs-stage.m-stairs { height: clamp(300px, 46vh, 520px); margin: 0; }
/* 下面两栏：左边我的工具，右边我参与的。不用卡片，标题下一条细线 */
.m-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; gap: clamp(28px, 4vw, 56px); margin-top: clamp(8px, 2vh, 24px); }
.m-sec > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.m-sec h2 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: clamp(15px, .9vw, 17px); letter-spacing: .06em; }
.m-sec h2 em { min-width: 20px; padding: 0 7px; border-radius: 99px; background: var(--card-2); font: 600 11.5px/20px var(--font-latin); font-style: normal; text-align: center; color: var(--text-3); }
.m-sec header a { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-3); text-decoration: none; transition: color .25s; }
.m-sec header a .ic { width: 14px; height: 14px; }
.m-sec header a:hover { color: var(--text); }

/* ---------- 我的工具 ---------- */

.m-cover { width: clamp(64px, 4.2vw, 78px); height: clamp(64px, 4.2vw, 78px); border-radius: 28%; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .6); transition: transform .45s var(--ease-spring); }
.m-cover.sm { width: 34px; height: 34px; border-radius: 10px; box-shadow: none; }
/* 我的工具：像手机桌面上的 App 图标 */
.m-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(96px, 6.6vw, 124px), 1fr)); gap: 22px 12px; }
.m-app { position: relative; display: flex; flex-direction: column; align-items: center; }
.m-app > a, a.m-app { display: flex; flex-direction: column; align-items: center; gap: 10px; color: var(--text-2); text-decoration: none; font-size: 13px; text-align: center; }
.m-app a:hover .m-cover, a.m-app:hover .m-cover { transform: translateY(-3px); }
/* 还没上线的工具：颜色淡一点，点了只提示不跳 */
.m-app.soon .m-cover { opacity: .5; }
.m-app.soon a:hover .m-cover { transform: none; }
.m-del {
  position: absolute;
  top: -8px;
  left: calc(50% - 42px);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-2);
  border-radius: 50%;
  background: var(--panel);
  color: var(--text-3);
  opacity: 0;
  cursor: pointer;
  transition: color .25s, opacity .25s;
}
.m-del .ic { width: 12px; height: 12px; }
.m-app:hover .m-del, .m-del:focus-visible { opacity: 1; }
.m-del:hover { color: var(--text); }
.m-add .m-cover { border: 1.5px dashed var(--line-2); background: transparent; box-shadow: none; color: var(--text-3); }
.mm-cover, .m-cover {
  display: grid;
  flex: none;
  place-items: center;
  background: radial-gradient(circle at 28% 20%, rgba(255, 255, 255, .32), transparent 55%), linear-gradient(135deg, var(--c1, #3a3f55), var(--c2, #23263a));
  color: #fff;
}
.mm-cover { width: 3.4em; height: 3.4em; border-radius: 1em; box-shadow: 0 .6em 1.4em -.7em rgba(0, 0, 0, .6); }
.mm-cover .ic, .m-cover .ic { width: 48%; height: 48%; stroke-width: 1.9; }
/* 提问、选题这类：淡淡的同色底，细边，图标用那个颜色 */
.mm-cover.soft, .m-cover.soft { background: color-mix(in srgb, var(--t) 15%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--t) 30%, transparent); color: var(--t); }

/* ---------- 我参与的 ---------- */

/* 我参与的：下拉，选一条跳过去 */
.m-dd { position: relative; }
.m-dd-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s;
}
.m-dd-btn:hover, .m-dd-btn[aria-expanded='true'] { background: var(--card-hover); }
.m-dd-btn > span:not(.m-cover) { display: grid; flex: 1; min-width: 0; }
.m-dd-btn b { font-size: clamp(14px, .85vw, 16px); }
.m-dd-btn small { font-size: 12px; color: var(--text-3); }
.m-dd-btn > .ic { flex: none; width: 16px; height: 16px; color: var(--text-3); transition: transform .3s var(--ease-out); }
.m-dd-btn[aria-expanded='true'] > .ic { transform: rotate(180deg); }
.m-dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  max-height: 280px;
  padding: 6px;
  overflow-y: auto;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--panel);
  box-shadow: 0 20px 50px -18px rgba(0, 0, 0, .6);
  animation: up .25s var(--ease-out);
}
.m-dd-menu a { display: grid; gap: 2px; padding: 9px 10px; border-radius: 10px; color: var(--text); text-decoration: none; font-size: 13.5px; transition: background .2s; }
.m-dd-menu a:hover { background: var(--card-2); }
.m-dd-menu a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-dd-menu a small { font-size: 11.5px; color: var(--text-3); }
.m-dd-menu p { margin: 0; padding: 10px; font-size: 13px; color: var(--text-3); }
.m-dd-menu p a { display: inline; padding: 0; color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- 没登录 ---------- */

.m-guest { max-width: 560px; margin: 8vh auto 0; text-align: center; }
.m-guest h1 { margin: 0; font-size: clamp(28px, 3vw, 42px); }
.m-guest p { color: var(--text-2); line-height: 1.9; }
.m-guest-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }

/* ---------- 设置 ---------- */

/* 设置 */
.s-modal.m-settings { width: min(460px, 100%); }
.m-set { display: grid; gap: 14px; margin-top: 4px; }
.m-set-av { display: flex; align-items: center; gap: 18px; padding-bottom: 6px; }
.m-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.m-swatches label { cursor: pointer; }
.m-swatches input { position: absolute; opacity: 0; pointer-events: none; }
.m-swatches span { display: block; width: 26px; height: 26px; border-radius: 50%; background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px transparent; transition: box-shadow .2s; }
.m-swatches input:checked + span { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--text-2); }
.m-swatches input:focus-visible + span { outline: 2px solid rgba(140, 160, 255, .7); outline-offset: 4px; }
.m-field { display: grid; gap: 6px; }
.m-field > span { font-size: 12.5px; letter-spacing: .06em; color: var(--text-3); }
.m-field input { height: 42px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 11px; outline: 0; background: var(--field); color: var(--text); font: 14px var(--font); transition: border-color .25s; }
.m-field input:focus { border-color: var(--text-3); }
.m-field input::placeholder { color: var(--text-3); }
.m-field b { font: 600 14px var(--font-latin); }
.m-set-acts { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; }
/* 注销账号：设置最下面一行不显眼的小字；点开的确认框里按钮和上面的话隔开一点 */
.m-set-gone { justify-self: center; padding: 4px 8px; border: 0; background: none; color: var(--text-3); font: 12.5px var(--font); cursor: pointer; }
.m-set-gone:hover { color: var(--text-2); text-decoration: underline; text-underline-offset: 3px; }
.m-gone-acts { margin-top: 24px; }

/* ---------- 开屏 ---------- */

/* 开屏：一条横线升成台阶，再缩到左上角变成标志 */
.m-splash { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: var(--my-bg); cursor: pointer; transition: background-color .5s ease; }
.m-splash svg { width: 132px; height: 132px; overflow: visible; transition: transform .62s cubic-bezier(.65, 0, .35, 1); }
.m-splash path { fill: none; stroke: var(--text); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: splash-draw .42s cubic-bezier(.5, 0, .2, 1) forwards; }
@keyframes splash-draw { to { stroke-dashoffset: 0; } }
.m-splash.leave { background-color: transparent; }
#my.splashing .m-brand .ic, #my.splashing .m-bar-r { opacity: 0; }
#my.splashing .m-main { opacity: 0; animation: none; }

/* ---------- 离开时 ---------- */

.m-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 60;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  transform-origin: 0 0;
  pointer-events: none;
  background:
    radial-gradient(1000px 520px at 12% -10%, rgba(91, 140, 255, .12), transparent 60%),
    radial-gradient(900px 520px at 100% 110%, rgba(255, 122, 217, .08), transparent 60%),
    var(--my-bg);
  box-shadow: 0 0 0 1px var(--line-2);
  color: var(--text);
}

/* ---------- 白天 ---------- */

body.day .mm-cover.soft, body.day .m-cover.soft { color: color-mix(in srgb, var(--t) 78%, #000); }

@media (max-width: 820px) {
  .m-hero { grid-template-columns: minmax(0, 1fr) clamp(120px, 36vw, 300px); gap: 8px; }
  .m-hero h1 { font-size: clamp(26px, 6.4vw, 40px); }
  .stairs-stage.m-stairs { height: clamp(190px, 46vw, 340px); margin: 0 -8px 0 0; }
  .m-grid { grid-template-columns: minmax(0, 1fr); }
  .m-me > span:not(.m-av), .m-site-l { display: none; }
  .m-site-s { display: inline; }
  .m-site { padding: 0 12px; }
  .m-del { opacity: 1; }
}
