:root {
  --ink: #202943;
  --ink-soft: #57617a;
  --ink-pale: #8790a1;
  --blue: #29406f;
  --blue-2: #485d8a;
  --border: #e8eaf1;
  --surface: #fff;
  --bg: #f6f7fb;
  --accent: #eebf8c;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .3; cursor: not-allowed; }
:focus-visible { outline: 3px solid #799ee0; outline-offset: 3px; }
.eyebrow { font-size: 10px; font-weight: 850; letter-spacing: .18em; color: #68799b; }
.title-dot { color: #dfaa76; }
.status-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #80b6a5; box-shadow: 0 0 0 4px #80b6a520; }

/* Public page */
.public-page { min-height: 100vh; overflow-x: hidden; background: linear-gradient(130deg, #f8f7f4 0%, #f5f6fd 50%, #f7f7f9 100%); position: relative; }
.public-page::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .36; background-image: radial-gradient(#b8bed2 0.45px, transparent .45px); background-size: 13px 13px; }
.background-orb { position: fixed; pointer-events: none; filter: blur(65px); z-index: 0; opacity: .58; border-radius: 50%; }
.orb-one { left: -170px; top: -150px; width: 370px; height: 370px; background: #e1d9f9; }
.orb-two { right: -170px; bottom: -90px; width: 420px; height: 420px; background: #f3d9ca; }
.public-shell { position: relative; z-index: 1; width: min(100% - 32px, 580px); margin: 0 auto; padding: 36px 0 28px; }
.public-topline { display: flex; gap: 11px; align-items: center; color: #8a91a4; letter-spacing: .17em; font-size: 10px; font-weight: 800; }
.topline-streak { height: 1px; background: #cfd4df; flex: 1; }
.admin-entry { color: #818b9e; letter-spacing: .1em; white-space: nowrap; }
.admin-entry:hover { color: #334a76; }
.profile-head { padding: 43px 12px 43px; text-align: center; }
.profile-avatar { position: relative; display: grid; place-items: center; width: 98px; height: 98px; margin: 0 auto 22px; border-radius: 32px; background: linear-gradient(137deg, #394b72, #222e52 75%); color: #fff; box-shadow: 0 18px 35px #28355332, 0 2px 1px #ffffff80 inset; font-size: 47px; font-weight: 720; text-transform: uppercase; }
.avatar-star { position: absolute; top: -8px; right: -11px; display: grid; place-items: center; border: 4px solid #f6f5f6; width: 32px; height: 32px; border-radius: 50%; background: #f7cf99; color: #3c445f; font-size: 17px; }
.profile-head h1 { font-size: clamp(32px, 6vw, 43px); font-weight: 780; letter-spacing: -.052em; margin: 12px 0 8px; line-height: 1.2; overflow-wrap: anywhere; }
.profile-head p { margin: 0 auto; color: #69738a; font-size: 14px; line-height: 1.85; max-width: 440px; overflow-wrap: anywhere; }
.section-line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 2px 14px; font-size: 10px; letter-spacing: .15em; font-weight: 850; color: #69758f; }
.section-line span:last-child { color: #9a9fae; }
.section-star { font-size: 15px; color: #c1a6b3; padding-left: 6px; }
.link-card { position: relative; display: flex; align-items: center; gap: 17px; min-height: 92px; margin-bottom: 13px; padding: 16px 18px; border-radius: 21px; border: 1px solid #fff; background: #ffffffcf; box-shadow: 0 6px 25px #313b6110, 0 1px 0 #e9eaf288; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease; }
.link-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px #313b611c; border-color: #d9deed; }
.link-icon { width: 56px; height: 56px; border-radius: 16px; background: #f0f1f9; border: 1px solid #e8eaf3; display: grid; place-items: center; font-size: 26px; flex: 0 0 auto; }
.link-card:nth-of-type(3n) .link-icon { background: #f9f0e6; border-color: #f3e8dc; }
.link-card:nth-of-type(3n + 1) .link-icon { background: #eaf2f2; border-color: #e5efed; }
.link-copy { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.link-heading { font-size: 15px; line-height: 1.35; font-weight: 790; color: #27334f; }
.link-description { font-size: 12px; line-height: 1.55; color: #7f8699; }
.link-arrow { border: 1px solid #e5e7ed; background: #fff; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; font-size: 18px; flex: 0 0 auto; transition: background .2s ease, color .2s ease, transform .2s ease; }
.link-card:hover .link-arrow { background: var(--blue); color: #fff; transform: rotate(45deg); }
.public-footer { margin-top: 41px; padding: 23px 0 8px; border-top: 1px solid #e0e2ec; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #9097a9; font-size: 9px; font-weight: 800; letter-spacing: .1em; }
.footer-symbol { color: #d9aa7f; font-size: 19px; }
.empty-public { text-align: center; background: #ffffffa6; border: 1px dashed #ccd0df; padding: 50px 20px; border-radius: 22px; }
.empty-icon { font-size: 35px; color: #6b7fa6; }
.empty-public h2 { font-size: 18px; margin: 12px 0 8px; }
.empty-public p { color: #80889c; margin: 0; font-size: 13px; }

/* Admin shared */
.admin-body { min-height: 100vh; background: #f8f9fc; }
.admin-layout { display: flex; min-height: 100vh; }
.sidebar { position: sticky; top: 0; width: 256px; height: 100vh; flex: 0 0 256px; display: flex; flex-direction: column; padding: 30px 18px 22px; background: #263657; color: #eaf0ff; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; font-weight: 400; font-size: 21px; letter-spacing: -.07em; padding: 5px 11px 54px; }
.brand-glyph { width: 35px; height: 35px; display: grid; place-items: center; border: 1px solid #8495b666; border-radius: 11px; font-size: 24px; }
.brand-strong { font-weight: 850; }
.sidebar-brand small { display: block; font-size: 8px; color: #90a1c1; letter-spacing: .25em; font-weight: 800; padding-top: 5px; }
.nav-caption { padding: 0 13px 15px; color: #92a2c1; font-size: 10px; letter-spacing: .14em; font-weight: 850; }
.nav-item { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; color: #bdc9df; font-size: 13px; font-weight: 650; margin-bottom: 6px; }
.nav-item > span { display: grid; place-items: center; font-size: 19px; width: 20px; }
.nav-item:hover { background: #ffffff11; color: #fff; }
.nav-item.active { background: #e9edf9; color: #27385d; }
.sidebar-spacer { flex: 1; }
.sidebar-bottom { display: flex; align-items: center; gap: 11px; padding: 16px 5px 0; border-top: 1px solid #ffffff21; }
.admin-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: #8c9abe; color: #253452; font-size: 16px; font-weight: 800; }
.sidebar-bottom > div { min-width: 0; flex: 1; }
.sidebar-bottom strong, .sidebar-bottom div span { display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-bottom strong { font-size: 12px; }
.sidebar-bottom div span { font-size: 10px; margin-top: 3px; color: #a5b4d0; }
.logout-btn { color: #fff; background: #ffffff12; border: 0; font-size: 18px; width: 30px; height: 31px; border-radius: 9px; }
.logout-btn:hover { background: #ffffff2c; }
.admin-main { min-width: 0; flex: 1; }
.admin-topbar { height: 72px; padding: 0 46px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #e9ebf2; background: #fff; color: #303a51; font-size: 12px; font-weight: 750; }
.breadcrumb-muted { color: #989fae; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 24px; }
.topbar-online { display: flex; align-items: center; gap: 10px; color: #72988a; font-size: 11px; }
.topbar-preview { color: #3c527f; }
.dashboard-content { max-width: 1260px; margin: 0 auto; padding: 42px 46px 35px; }
.dashboard-heading { display: flex; justify-content: space-between; gap: 20px; align-items: center; margin-bottom: 31px; }
.dashboard-heading h1 { font-size: 36px; font-weight: 780; letter-spacing: -.05em; margin: 6px 0 7px; }
.dashboard-heading p { color: #868fa0; font-size: 13px; margin: 0; line-height: 1.6; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 15px; padding: 12px 18px; border-radius: 11px; min-height: 44px; border: 1px solid transparent; font-size: 12px; font-weight: 780; white-space: nowrap; transition: transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 7px 13px #29406f1c; }
.btn-primary:hover { background: #1d315a; }
.btn-secondary { color: #2a3a61; background: #e8edf7; }
.btn-light { background: #f3f5fa; border-color: #e7eaf1; color: #475b7e; }
.btn-full { width: 100%; justify-content: space-between; margin-top: 3px; }
.notice { margin-bottom: 20px; padding: 13px 17px; border-radius: 11px; font-size: 12px; line-height: 1.7; }
.notice.success { color: #296a53; background: #e7f5ed; border: 1px solid #c9ebd9; }
.notice.error { color: #954444; background: #fff0ed; border: 1px solid #f5d6cf; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; margin-bottom: 24px; }
.stat-tile { position: relative; overflow: hidden; min-height: 148px; padding: 22px 23px; background: #fff; border: 1px solid #eceef3; border-radius: 16px; box-shadow: 0 4px 19px #30446607; }
.stat-tile > span:first-child { color: #69758a; font-size: 12px; font-weight: 680; }
.stat-tile strong { display: block; font-size: 35px; font-weight: 750; letter-spacing: -.05em; margin: 7px 0 0; }
.stat-tile small { color: #97a0b1; font-size: 11px; }
.stat-symbol { position: absolute; top: 18px; right: 18px; background: #f0f2f8; color: #6c7d9d; width: 31px; height: 31px; border-radius: 9px; display: grid; place-items: center; font-size: 19px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: stretch; margin-bottom: 24px; }
.panel { background: #fff; border: 1px solid #ebedf2; border-radius: 17px; padding: 25px; box-shadow: 0 5px 24px #30446608; min-width: 0; }
.panel-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.panel-overline { display: inline-block; color: #9aa5ba; font-size: 10px; font-weight: 850; letter-spacing: .13em; }
.panel h2 { font-size: 19px; letter-spacing: -.035em; margin: 7px 0 5px; font-weight: 760; }
.panel p { margin: 0; font-size: 12px; color: #99a0ac; line-height: 1.5; }
.panel-asterisk { color: #a6afc4; background: #f3f5fa; width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 10px; font-size: 20px; }
.stack-form { display: flex; flex-direction: column; gap: 17px; }
.stack-form label { display: flex; flex-direction: column; gap: 8px; font-size: 11px; font-weight: 750; color: #606b81; }
.stack-form input:not([type="checkbox"]), .stack-form textarea { min-width: 0; width: 100%; outline: none; border: 1px solid #e8eaf1; background: #fbfcff; color: #26344f; border-radius: 10px; padding: 12px 13px; font-size: 12px; font-weight: 500; transition: border-color .2s ease, box-shadow .2s ease; }
.stack-form input:not([type="checkbox"]):focus, .stack-form textarea:focus { border-color: #91a1c6; box-shadow: 0 0 0 3px #cdd6ea55; }
.stack-form textarea { resize: vertical; line-height: 1.5; }
.stack-form input::placeholder, .stack-form textarea::placeholder { color: #afb6c4; }
.stack-form label.checkline { display: flex; flex-direction: row; align-items: center; gap: 10px; cursor: pointer; line-height: 1.5; }
.checkline input { appearance: auto; width: 15px; height: 15px; accent-color: #344b78; }
.required { color: #d2997b; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr) 105px; gap: 13px; }
.manage-panel { padding-bottom: 15px; }
.manage-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-bottom: 22px; }
.list-count { margin-left: 5px; vertical-align: middle; padding: 3px 8px; border-radius: 7px; background: #eff1f8; color: #7989a8; font-size: 11px; }
.manage-card { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #eef0f4; padding: 17px 0; }
.manage-summary { display: flex; flex: 1; min-width: 0; align-items: center; gap: 13px; }
.manage-index { color: #a4abbb; font-size: 10px; font-weight: 850; width: 19px; flex: 0 0 19px; }
.manage-icon { font-size: 20px; display: grid; place-items: center; background: #f0f2f8; border-radius: 11px; width: 43px; height: 43px; flex: 0 0 43px; }
.manage-info { min-width: 0; flex: 1; }
.manage-info strong { display: block; font-size: 12px; font-weight: 800; color: #2e3a55; word-wrap: break-word; }
.manage-url { display: block; margin-top: 5px; color: #95a0b3; font-size: 10px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; max-width: 250px; }
.state-pill { display: inline-block; flex: 0 0 auto; padding: 6px 9px; font-size: 10px; border-radius: 20px; font-weight: 780; }
.is-live { color: #397b64; background: #e7f6ef; }
.is-hidden { color: #8f8392; background: #f2eef2; }
.manage-controls { display: flex; align-items: center; gap: 5px; }
.manage-controls form { margin: 0; }
.icon-btn, .small-action { border: 1px solid #eaedf3; border-radius: 8px; color: #5e6c86; background: #fff; font-size: 11px; padding: 9px 10px; font-weight: 700; white-space: nowrap; }
.icon-btn { font-size: 15px; padding: 6px 10px; }
.icon-btn:hover:not(:disabled), .small-action:hover { background: #f2f4fa; }
.small-action.danger { color: #bd6e71; }
.small-action.danger:hover { background: #fdf1f1; }
.edit-details { position: relative; }
.edit-details > summary { list-style: none; cursor: pointer; }
.edit-details > summary::-webkit-details-marker { display: none; }
.edit-details[open] .edit-action { background: #e6ecf7; }
.edit-popout { position: absolute; z-index: 10; top: calc(100% + 10px); right: 0; width: 340px; padding: 20px; background: #fff; border: 1px solid #e9ecf3; border-radius: 13px; box-shadow: 0 15px 45px #1c2b4426; }
.list-empty { text-align: center; padding: 48px 12px; border-top: 1px solid #eceef3; }
.list-empty span { display: block; color: #9ba7c0; font-size: 28px; margin-bottom: 13px; }
.list-empty strong { font-size: 14px; }
.list-empty p { padding-top: 7px; }
.admin-footnote { padding: 14px 0; margin: 13px 0 0; font-size: 11px; color: #abb3c0; text-align: center; }

/* Sign-in / installation */
.auth-body { display: grid; place-items: center; padding: 34px 16px; background: radial-gradient(circle at 15% 10%, #e4eaf8 0%, transparent 30%), radial-gradient(circle at 95% 95%, #f4e9e5 0%, transparent 32%), #f8f9fc; }
.auth-card { width: min(100%, 446px); padding: 33px 36px 34px; border-radius: 23px; border: 1px solid #eceef4; background: #fff; box-shadow: 0 22px 80px #30426116; }
.back-home { font-size: 11px; font-weight: 750; color: #77849e; display: inline-block; margin-bottom: 29px; }
.back-home:hover { color: #30446b; }
.auth-mark { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; margin-bottom: 24px; background: #263657; color: #f2f5fb; font-size: 31px; }
.auth-card h1 { margin: 8px 0 8px; letter-spacing: -.055em; font-size: 32px; }
.auth-intro { margin: 0 0 27px; color: #8791a5; font-size: 13px; line-height: 1.75; }
.auth-hint { margin: 22px 0 0; font-size: 11px; line-height: 1.7; color: #a2acba; text-align: center; }

@media (max-width: 1180px) {
  .sidebar { width: 224px; flex-basis: 224px; }
  .dashboard-content { padding-left: 28px; padding-right: 28px; }
  .admin-topbar { padding-left: 28px; padding-right: 28px; }
  .manage-card { align-items: flex-start; flex-direction: column; gap: 12px; }
  .manage-controls { align-self: flex-end; }
}
@media (max-width: 770px) {
  .admin-layout { display: block; }
  .sidebar { position: relative; top: auto; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 13px 17px; gap: 8px; }
  .sidebar-brand { padding: 0; font-size: 18px; margin-right: auto; }
  .sidebar-brand small { display: none; }
  .brand-glyph { width: 30px; height: 30px; font-size: 21px; border-radius: 9px; }
  .nav-caption, .sidebar-spacer { display: none; }
  .nav-item { margin: 0; padding: 9px; font-size: 0; border-radius: 9px; }
  .nav-item > span { font-size: 20px; }
  .sidebar-bottom { padding: 0; border: 0; gap: 0; }
  .sidebar-bottom > div, .admin-avatar { display: none; }
  .logout-btn { width: 37px; height: 35px; }
  .admin-topbar { height: 54px; padding: 0 19px; }
  .dashboard-content { padding: 30px 17px 25px; }
  .dashboard-heading { align-items: flex-start; }
  .dashboard-heading h1 { font-size: 30px; }
  .dashboard-grid { grid-template-columns: 1fr; gap: 15px; }
  .stats-grid { gap: 10px; }
  .stat-tile { min-height: 128px; padding: 16px; }
  .stat-tile strong { font-size: 28px; }
  .stat-symbol { display: none; }
  .panel { padding: 20px; }
  .manage-card { flex-direction: column; }
  .manage-summary { width: 100%; }
}
@media (max-width: 540px) {
  .public-shell { width: min(100% - 28px, 580px); padding-top: 27px; }
  .profile-head { padding: 39px 5px 34px; }
  .profile-avatar { width: 86px; height: 86px; border-radius: 28px; font-size: 42px; }
  .profile-head h1 { font-size: 33px; }
  .link-card { padding: 13px; gap: 12px; min-height: 80px; border-radius: 17px; }
  .link-icon { width: 48px; height: 48px; border-radius: 13px; font-size: 23px; }
  .link-heading { font-size: 14px; }
  .link-arrow { width: 31px; height: 31px; }
  .public-footer { font-size: 8px; letter-spacing: .02em; }
  .dashboard-heading { flex-direction: column; }
  .dashboard-heading .btn { align-self: stretch; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-tile:last-child { grid-column: 1 / -1; min-height: 105px; }
  .stat-tile { min-height: 117px; }
  .manage-heading { flex-direction: column; align-items: flex-start; }
  .manage-heading .btn { width: 100%; }
  .manage-controls { align-self: stretch; gap: 6px; flex-wrap: wrap; }
  .manage-controls .small-action { padding: 8px; }
  .manage-info strong { font-size: 12px; }
  .manage-icon { width: 37px; height: 37px; flex-basis: 37px; }
  .state-pill { font-size: 9px; }
  .edit-details[open] { flex-basis: 100%; order: 2; }
  .edit-popout { position: static; width: 100%; margin-top: 11px; box-shadow: none; border-color: #e4e9f2; }
  .topbar-online { display: none; }
  .auth-card { padding: 27px 23px 29px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}


:root {
  --public-bg-image: none;
}
.public-page.has-custom-bg {
  background-image: linear-gradient(135deg, rgba(250,250,252,.66), rgba(245,247,252,.82)), var(--public-bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.btn, .icon-btn, .small-action, .logout-btn, .demo-controls button {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.65);
  box-shadow: 0 8px 24px rgba(27,45,84,.10), inset 0 1px 0 rgba(255,255,255,.7);
}
.btn-primary { color: #233559; background: rgba(232,240,255,.6); border-color: rgba(255,255,255,.7); }
.btn-primary:hover { background: rgba(223,234,255,.82); }
.btn-secondary { color: #2a3a61; background: rgba(242,246,255,.62); }
.btn-light { background: rgba(255,255,255,.48); border-color: rgba(221,228,239,.85); color: #475b7e; }
.frost-select {
  min-width: 0; width: 100%; outline: none; border: 1px solid #e8eaf1; background: rgba(255,255,255,.72); color: #26344f; border-radius: 10px; padding: 12px 13px; font-size: 12px; font-weight: 500;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.field-hint { display:block; margin-top:6px; font-size:11px; color:#8d99ad; }
.bg-preview-wrap { display:flex; flex-direction:column; gap:10px; }
.bg-preview { width:100%; max-height:165px; object-fit:cover; border-radius:16px; border:1px solid #e9ecf3; box-shadow:0 10px 30px rgba(30,49,84,.08); }
.compact-form { margin-top: 12px; }
.theme-glass .link-card, .theme-glass .profile-avatar, .theme-glass .link-arrow { backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.theme-brutal.public-page { background: #f6cd11; }
.theme-brutal.public-page::before { opacity: 0; background: none; }
.theme-brutal .background-orb { display:none; }
.theme-brutal .public-shell { width:min(100% - 26px, 430px); padding-top:28px; }
.theme-brutal .public-topline { color:#111; font-size:11px; letter-spacing:.06em; }
.theme-brutal .admin-entry, .theme-brutal .profile-head p, .theme-brutal .section-line, .theme-brutal .public-footer { color:#111; }
.theme-brutal .profile-head { text-align:left; padding: 16px 0 26px; }
.theme-brutal .profile-avatar { margin:0 0 18px; width:86px; height:86px; border-radius:28px; background:#fff; color:#111; border:4px solid #111; box-shadow:10px 10px 0 #111; }
.theme-brutal .avatar-star { border:3px solid #111; background:#ff4fa0; color:#fff; }
.theme-brutal .profile-head h1 { font-size: clamp(34px, 8vw, 54px); line-height:1.02; max-width: 320px; }
.theme-brutal .section-line { padding-bottom:12px; }
.theme-brutal .link-card { background:#fff; border:4px solid #111; box-shadow:10px 10px 0 #111; border-radius:18px; padding:14px; min-height:96px; margin-bottom:16px; }
.theme-brutal .link-card:hover { transform: translate(-2px,-2px); box-shadow:14px 14px 0 #111; border-color:#111; }
.theme-brutal .link-icon { border:3px solid #111; background:#ffd84e; border-radius:14px; }
.theme-brutal .link-card:nth-of-type(2n) .link-icon { background:#71e459; }
.theme-brutal .link-card:nth-of-type(3n) .link-icon { background:#9f84ff; }
.theme-brutal .link-heading, .theme-brutal .link-description { color:#111; }
.theme-brutal .link-arrow { width:48px; height:48px; border-radius:14px; border:3px solid #111; background:#ffe042; color:#111; font-size:30px; font-weight:900; }
.theme-brutal .link-card:hover .link-arrow { background:#ffe042; color:#111; transform:none; }
.theme-brutal .public-footer { border-top:3px solid #111; padding-top:18px; letter-spacing:.04em; }
.theme-midnight.public-page { background: linear-gradient(145deg, #0f172a 0%, #121d37 50%, #0f172a 100%); }
.theme-midnight.public-page::before { opacity:.14; background-image: radial-gradient(#fff 0.5px, transparent .5px); }
.theme-midnight .public-topline, .theme-midnight .admin-entry, .theme-midnight .profile-head p, .theme-midnight .section-line, .theme-midnight .public-footer { color:#c7d2e6; }
.theme-midnight .profile-head h1, .theme-midnight .link-heading { color:#fff; }
.theme-midnight .profile-avatar { background: linear-gradient(135deg, rgba(126,142,255,.9), rgba(76,92,182,.9)); }
.theme-midnight .link-card, .theme-midnight .empty-public { background: rgba(17,26,48,.58); border-color: rgba(255,255,255,.12); box-shadow: 0 16px 34px rgba(6,10,22,.34); }
.theme-midnight .link-icon { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.1); }
.theme-midnight .link-description { color:#afbbd3; }
.theme-midnight .link-arrow { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color:#fff; }
.theme-midnight .empty-icon, .theme-midnight .empty-public p { color:#afbbd3; }


/* v3: custom image harus MENANG dari background solid tiap mode.
   background.php dimuat sesudah stylesheet ini pada halaman publik.
   Sebagai fallback, JS masih dapat mengisi --public-bg-image. */
body.public-page.has-custom-bg.theme-glass {
  background-image: linear-gradient(145deg, rgba(249,249,253,.13), rgba(249,249,253,.27)), var(--public-bg-image);
}
body.public-page.has-custom-bg.theme-brutal {
  background-image: linear-gradient(145deg, rgba(246,205,17,.08), rgba(246,205,17,.13)), var(--public-bg-image);
}
body.public-page.has-custom-bg.theme-midnight {
  background-image: linear-gradient(145deg, rgba(8,15,34,.34), rgba(8,15,34,.52)), var(--public-bg-image);
}
body.public-page.has-custom-bg {
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-attachment: fixed;
}
