/* Shared shell, gallery cards, and dialogs from fuguang-studio/public/styles.css. */
:root {
  color-scheme: light;
  --ink: #102345;
  --muted: #8b94a3;
  --surface: #f6f7f9;
  --navy: #102344;
  --line: rgba(21,39,66,.065);
  --accent: #70829b;
  --radius: 28px;
  font-family: Inter,"SF Pro Display","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-width: 350px;
  color: var(--ink);
  background: radial-gradient(ellipse at 10% 10%,#bfc0c6,transparent 60%),linear-gradient(135deg,#a6a7ae,#94959e);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select {
  font: inherit;
  color: inherit;
}
button, a, input, textarea, select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
}
button:disabled {
  cursor: not-allowed;
  opacity: .35;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #9baecc;
  outline-offset: 3px;
}
button {
  transition: background .18s,transform .18s,box-shadow .18s;
}
button:not(:disabled):active {
  transform: scale(.97);
}
svg {
  width: 21px;
  height: 21px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
[hidden] {
  display: none!important;
}
input::placeholder, textarea::placeholder {
  color: #929baa;
}
button:hover:not(:disabled) {
  filter: brightness(.98);
}
.studio-shell {
  display: grid;
  grid-template-columns: 66px minmax(0,1fr);
  grid-template-rows: 66px minmax(0,1fr);
  column-gap: 12px;
  row-gap: 12px;
  max-width: 1920px;
  height: calc(100dvh - 56px);
  min-height: 790px;
  margin: 28px auto;
  width: calc(100% - 56px);
  padding: 12px;
  border: 7px solid #f9fafb;
  border-radius: 39px;
  background: #e9ebef;
  box-shadow: 0 32px 70px -27px rgba(16,21,41,.45),inset 0 0 0 1px rgba(255,255,255,.65);
}
.rail {
  grid-column: 1;
  grid-row: 1/3;
  display: flex;
  align-items: center;
  flex-direction: column;
  border-radius: 30px;
  background: rgba(250,251,253,.57);
  padding: 7px 5px;
  position: relative;
}
.brand-mark {
  width: 47px;
  height: 47px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px #11234403;
}
.brand-mark img {
  display: block;
  width: 34px;
  height: 34px;
}
.rail-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: absolute;
  top: 42%;
  transform: translateY(-25%);
}
.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
}
.rail .icon-button {
  width: 47px;
  height: 47px;
}
.icon-button.active {
  background: var(--navy);
  color: white;
  box-shadow: 0 4px 12px #1023440a;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
  background: #f5f6f8;
  border-radius: 34px;
  padding: 7px 9px 7px 7px;
}
.topbar-caption {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 2px;
  white-space: nowrap;
  color: #8590a1;
  padding-left: 9px;
}
.topbar-caption span {
  padding: 0 6px;
  color: #b6bdc7;
}
.toast {
  position: fixed;
  bottom: 33px;
  left: 50%;
  transform: translateX(-50%);
  background: #102344ef;
  color: #fff;
  font-size: 12px;
  line-height: 1.7;
  padding: 13px 22px;
  max-width: min(90vw,500px);
  border-radius: 15px;
  box-shadow: 0 10px 40px #11234422;
  z-index: 100;
  text-align: center;
}
.modal {
  background: #f8f9fb;
  color: var(--ink);
  border: 6px solid #fff;
  border-radius: 30px;
  box-shadow: 0 25px 100px #101e3c33;
  width: min(500px,calc(100% - 32px));
  max-height: 90dvh;
  overflow: auto;
  padding: 25px 27px;
}
.modal::backdrop {
  background: #14243b55;
  backdrop-filter: blur(7px);
}
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 17px;
}
.modal-heading h2 {
  font-size: 21px;
  font-weight: 500;
  margin: 0;
}
.modal-heading .icon-button {
  width: 33px;
  height: 33px;
}
.modal-heading .icon-button svg {
  width: 17px;
  height: 17px;
}
.modal-intro {
  font-size: 12px;
  color: #8a96a7;
  line-height: 1.85;
  margin: 0 0 20px;
}
.secondary-button {
  background: #fff;
  border: 1px solid #e4e9f0;
  border-radius: 12px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
}
.secondary-button svg {
  width: 14px;
  height: 14px;
}
.confirm-modal h2 {
  font-size: 20px;
  font-weight: 500;
}
.confirm-modal p {
  font-size: 12px;
  color: #8e99aa;
  line-height: 1.8;
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.danger-button {
  background: #a2747e;
  color: #fff;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 11px;
}
@media (min-width:1600px) {
  .studio-shell {
    padding: 14px;
    grid-template-columns: 70px minmax(0,1fr);
    grid-template-rows: 72px minmax(0,1fr);
    gap: 14px;
  }
}
@media (max-height:850px) and (min-width:1151px) {
  .studio-shell {
    margin: 16px auto;
    height: calc(100dvh - 32px);
    width: calc(100% - 32px);
    min-height: 735px;
  }
}
@media (max-width:1370px) {
  .topbar-caption {
    display: none;
  }
}
@media (max-width:1150px) {
  .studio-shell {
    height: auto;
    min-height: calc(100dvh - 32px);
    margin: 16px auto;
    width: calc(100% - 32px);
    grid-template-columns: 58px minmax(0,1fr);
    grid-template-rows: 64px minmax(0,1fr);
    border-width: 5px;
    padding: 9px;
    gap: 10px;
    border-radius: 32px;
  }
  .rail .icon-button {
    width: 42px;
    height: 42px;
  }
  .rail-links {
    position: sticky;
    top: calc(50dvh - 100px);
    transform: none;
    margin-top: 170px;
  }
  .topbar {
    gap: 10px;
  }
}
@media (max-width:820px) {
  .studio-shell {
    grid-template-columns: 48px minmax(0,1fr);
    padding: 8px;
    gap: 8px;
    width: calc(100% - 20px);
    margin: 10px auto;
    min-height: calc(100dvh - 20px);
    border-radius: 28px;
  }
  .rail {
    padding: 5px 3px;
  }
  .brand-mark {
    height: 38px;
    width: 38px;
  }
  .brand-mark img {
    width: 28px;
    height: 28px;
  }
  .rail .icon-button {
    height: 36px;
    width: 36px;
  }
  .rail .icon-button svg {
    width: 18px;
    height: 18px;
  }
  .topbar {
    gap: 7px;
    padding-right: 7px;
  }
}
@media (max-width:640px) {
  body {
    background: #e9ebef;
  }
  .studio-shell {
    width: 100%;
    margin: 0;
    padding: 8px;
    border: 0;
    border-radius: 0;
    grid-template-columns: 1fr;
    grid-template-rows: 60px auto;
    gap: 9px;
    min-height: 100dvh;
    box-shadow: none;
  }
  .rail {
    display: none;
  }
  .topbar {
    grid-column: 1;
    grid-row: 1;
    position: sticky;
    top: 7px;
    z-index: 10;
    box-shadow: 0 5px 25px #21365308;
    background: #f7f8f9f5;
    backdrop-filter: blur(15px);
  }
  .modal {
    padding: 20px 18px;
    border-width: 5px;
    border-radius: 26px;
  }
  .modal-heading h2 {
    font-size: 19px;
  }
  .toast {
    bottom: 20px;
    font-size: 11px;
    padding: 11px 18px;
  }
}
@media (prefers-reduced-motion:reduce) {
  *, *:before, *:after {
    animation: none!important;
    transition: none!important;
    scroll-behavior: auto!important;
  }
}
.studio-shell {
  view-transition-name: fuguang-frame;
}
.rail {
  view-transition-name: fuguang-rail;
}
.brand-mark {
  view-transition-name: fuguang-brand;
}
.rail-links {
  view-transition-name: fuguang-navigation;
}
.topbar {
  view-transition-name: fuguang-header;
}
@media (min-width:1151px) {
  .studio-shell:not(.showing-library) {
    height: auto;
    min-height: 0;
    flex-shrink: 0;
  }
}
.library-panel {
  grid-column: 2;
  grid-row: 2;
}
.library-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.library-topbar>span[data-icon] svg {
  width: 19px;
  height: 19px;
}
.library-top-count {
  font-size: 10px;
  font-weight: 400;
  color: #8190a4;
  background: #e8ecf2;
  border-radius: 9px;
  padding: 3px 7px;
  min-width: 23px;
  text-align: center;
}
.library-panel {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  padding: 29px 28px 24px;
  background: #f5f6f8;
  overflow: hidden;
}
.library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}
.library-heading-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.library-heading h1 {
  font-size: 25px;
  font-weight: 500;
  letter-spacing: .5px;
  margin: 0;
  white-space: nowrap;
}
.library-count {
  display: inline-grid;
  place-items: center;
  min-width: 27px;
  padding: 4px 8px;
  border-radius: 10px;
  background: #e8ecf2;
  color: #7c8ba1;
  font-size: 11px;
}
.library-back {
  border: 0;
  border-radius: 18px;
  padding: 11px 16px;
  white-space: nowrap;
}
.library-controls {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 26px;
}
.library-search {
  margin-left: auto;
  width: 290px;
  max-width: 40%;
  height: 43px;
  padding: 0 15px;
  background: #fff;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8290a3;
}
.library-search svg {
  width: 16px;
  height: 16px;
}
.library-search input {
  border: 0;
  background: none;
  outline: none;
  width: 100%;
  min-width: 0;
  font-size: 12px;
}
.library-search:focus-within {
  box-shadow: inset 0 0 0 1px #a8b5ca;
}
.library-sort {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  height: 43px;
  background: #fff;
  border-radius: 22px;
}
.library-sort select {
  appearance: none;
  cursor: pointer;
  background: none;
  border: 0;
  border-radius: 22px;
  min-width: 109px;
  padding: 13px 32px 13px 15px;
  font-size: 11px;
  color: #74849b;
}
.library-sort>span {
  position: absolute;
  right: 13px;
  pointer-events: none;
}
.library-sort svg {
  width: 12px;
  height: 12px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(220px,1fr));
  gap: 18px;
  align-content: start;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #d6dce5 transparent;
  padding: 3px 3px 14px;
  flex: 1;
}
.gallery-card {
  position: relative;
  min-width: 0;
  align-self: start;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 8px #10234403;
  transition: box-shadow .18s;
}
.gallery-card:hover {
  box-shadow: 0 5px 20px #1023440c;
}
.gallery-open {
  display: block;
  width: 100%;
  padding: 0;
  border-radius: 20px;
  text-align: left;
  overflow: hidden;
}
.gallery-preview {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 13px;
  overflow: hidden;
  background: #e8edf3;
  color: #8c9db3;
}
.gallery-preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-preview>svg, .gallery-preview>span>svg {
  width: 39px;
  height: 39px;
  stroke-width: 1.3;
}
.gallery-card-body {
  padding: 15px 16px 17px;
  min-width: 0;
}
.gallery-card-title {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gallery-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  font-size: 10px;
  line-height: 1.7;
  color: #93a0b0;
  margin: 7px 0 0;
}
.gallery-card-style {
  flex-shrink: 0;
  white-space: nowrap;
  background: #edf0f4;
  color: #74849b;
  border-radius: 8px;
  padding: 2px 6px;
}
.gallery-card-info {
  white-space: nowrap;
}
.library-empty {
  flex: 1;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 30px;
  color: #91a0b2;
  text-align: center;
}
.library-empty>span {
  height: 84px;
  width: 84px;
  border-radius: 27px;
  background: #e9edf3;
  display: grid;
  place-items: center;
  margin-bottom: 22px;
}
.library-empty>span svg {
  height: 38px;
  width: 38px;
  stroke-width: 1.3;
}
.library-empty h2 {
  font-size: 17px;
  font-weight: 400;
  color: #73849d;
  margin: 0 0 12px;
}
.library-empty p {
  font-size: 12px;
  line-height: 1.8;
  margin: 0;
  color: #9aa7b7;
}
.gallery-dialog {
  background: #f5f6f8;
  color: var(--ink);
  border: 6px solid #fff;
  border-radius: 28px;
  box-shadow: 0 25px 100px #101e3c33;
  width: min(1160px,calc(100% - 40px));
  max-width: none;
  max-height: 90dvh;
  padding: 0;
  overflow: auto;
}
.gallery-dialog[open] {
  display: grid;
  grid-template-columns: minmax(0,1fr) 285px;
  grid-template-rows: auto minmax(0,1fr);
}
.gallery-dialog::backdrop {
  background: #14243b55;
  backdrop-filter: blur(7px);
}
.gallery-dialog-heading {
  grid-column: 1/-1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 19px 16px 24px;
  border-bottom: 1px solid #e8ecf2;
}
.gallery-dialog-heading h2 {
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
  line-height: 1.7;
}
.gallery-dialog-heading .icon-button {
  height: 33px;
  width: 33px;
}
.gallery-dialog-heading .icon-button svg {
  height: 17px;
  width: 17px;
}
.gallery-dialog-image {
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: #eceff3;
}
.gallery-dialog-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 72dvh;
  object-fit: contain;
  border-radius: 12px;
}
.gallery-dialog-content {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 23px 21px;
  gap: 17px;
  max-height: 76dvh;
}
.gallery-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: auto;
  padding-top: 9px;
  flex-shrink: 0;
}
.gallery-dialog-actions .secondary-button {
  flex: 1;
  white-space: nowrap;
  border: 0;
  min-height: 40px;
}
@media (min-width:1600px) {
  .library-panel {
    padding: 34px 32px 27px;
  }
  .library-heading {
    margin-bottom: 27px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill,minmax(245px,1fr));
    gap: 20px;
  }
  .gallery-card-title {
    font-size: 13px;
  }
  .gallery-card-meta {
    font-size: 11px;
  }
}
@media (max-width:1150px) {
  .showing-library {
    height: calc(100dvh - 32px);
    min-height: 620px;
    grid-template-rows: 64px minmax(0,1fr);
  }
  .showing-library .rail-links {
    position: absolute;
    top: 42%;
    margin-top: 0;
    transform: translateY(-25%);
  }
  .library-panel {
    padding: 24px 21px 20px;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill,minmax(200px,1fr));
    gap: 15px;
  }
  .library-heading h1 {
    font-size: 23px;
  }
  .library-controls {
    gap: 10px;
  }
  .library-search {
    width: 250px;
    max-width: 45%;
  }
  .gallery-dialog[open] {
    grid-template-columns: minmax(0,1fr) 255px;
  }
  .gallery-dialog-content {
    padding: 20px 17px;
  }
}
@media (max-width:820px) {
  .showing-library {
    height: calc(100dvh - 20px);
    grid-template-rows: 64px minmax(0,1fr);
  }
  .library-topbar {
    font-size: 13px;
    padding: 0 12px;
    gap: 8px;
  }
  .library-panel {
    padding: 22px 17px 18px;
  }
  .library-heading {
    margin-bottom: 20px;
  }
  .library-heading h1 {
    font-size: 21px;
  }
  .library-count {
    font-size: 10px;
  }
  .library-controls {
    flex-wrap: wrap;
    margin-bottom: 20px;
  }
  .library-sort {
    order: 1;
    margin-left: auto;
  }
  .library-search {
    order: 2;
    width: 100%;
    max-width: none;
    margin-left: 0;
  }
  .gallery-grid {
    grid-template-columns: repeat(auto-fill,minmax(190px,1fr));
    gap: 13px;
  }
  .gallery-card-body {
    padding: 12px 13px 14px;
  }
  .gallery-dialog[open] {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }
  .gallery-dialog-heading {
    padding: 14px 15px 14px 19px;
  }
  .gallery-dialog-image {
    padding: 15px;
  }
  .gallery-dialog-image img {
    max-height: 48dvh;
  }
  .gallery-dialog-content {
    max-height: none;
    padding: 18px 20px;
    gap: 12px;
  }
  .gallery-dialog-actions {
    flex-wrap: nowrap;
    padding-top: 3px;
  }
}
@media (max-width:640px) {
  .library-panel {
    grid-column: 1;
    grid-row: 2;
  }
  .showing-library {
    height: auto;
    min-height: 100dvh;
    grid-template-rows: 60px auto;
  }
  .library-panel {
    border-radius: 25px;
    padding: 22px 14px 18px;
    min-height: calc(100dvh - 86px);
    overflow: visible;
  }
  .library-topbar {
    padding-left: 12px;
    gap: 9px;
  }
  .library-topbar>span[data-icon] svg {
    height: 18px;
    width: 18px;
  }
  .library-heading {
    gap: 10px;
    margin-bottom: 20px;
  }
  .library-heading-title {
    gap: 8px;
  }
  .library-heading h1 {
    font-size: 21px;
  }
  .library-back {
    padding: 10px 12px;
    font-size: 11px;
    min-height: 39px;
  }
  .library-controls {
    gap: 12px;
    margin-bottom: 18px;
  }
  .library-sort {
    height: 44px;
  }
  .library-sort select {
    padding-top: 14px;
    padding-bottom: 14px;
    min-width: 105px;
  }
  .library-search {
    height: 44px;
  }
  .library-search input {
    font-size: 13px;
  }
  .gallery-grid {
    grid-template-columns: repeat(2,minmax(0,1fr));
    overflow: visible;
    padding: 0 0 4px;
    gap: 12px;
    flex: 0;
  }
  .gallery-card, .gallery-open {
    border-radius: 17px;
  }
  .gallery-card-body {
    padding: 11px 10px 12px;
  }
  .gallery-card-title {
    font-size: 11px;
  }
  .gallery-card-meta {
    font-size: 9px;
    line-height: 1.6;
    margin-top: 5px;
  }
  .gallery-preview>svg, .gallery-preview>span>svg {
    height: 29px;
    width: 29px;
  }
  .library-empty {
    min-height: 320px;
    flex: 1;
  }
  .gallery-dialog {
    width: calc(100% - 22px);
    border-width: 4px;
    border-radius: 23px;
    max-height: 92dvh;
  }
  .gallery-dialog-heading {
    padding: 12px 12px 12px 16px;
  }
  .gallery-dialog-heading h2 {
    font-size: 13px;
  }
  .gallery-dialog-image {
    padding: 10px;
  }
  .gallery-dialog-image img {
    border-radius: 9px;
    max-height: 45dvh;
  }
  .gallery-dialog-content {
    padding: 16px 13px;
  }
  .gallery-dialog-actions {
    gap: 7px;
    flex-wrap: wrap;
  }
  .gallery-dialog-actions .secondary-button {
    padding: 10px 9px;
    font-size: 11px;
  }
  .gallery-dialog-actions .secondary-button svg {
    height: 14px;
    width: 14px;
  }
}
