:root {
  color-scheme: light;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #26332d;
  background: #f7f8f3;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
a {
  color: inherit;
}
button {
  font: inherit;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #8cb49a;
  outline-offset: 3px;
}
.wrap {
  width: min(1180px, calc(100% - 64px));
  margin: auto;
}
.heading {
  padding: 48px 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
}
.eyebrow {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 2px;
  color: #799078;
  margin: 0 0 14px;
}
h1 {
  font-size: 36px;
  letter-spacing: -1px;
  margin: 0 0 12px;
  font-weight: 650;
}
.subtitle {
  font-size: 14px;
  color: #7a8378;
  line-height: 1.7;
  margin: 0;
}
.publish-link {
  white-space: nowrap;
  border: 1px solid #d7dfd0;
  border-radius: 9px;
  padding: 11px 17px;
  text-decoration: none;
  font-size: 13px;
  color: #486046;
  background: white;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0 20px;
  font-size: 13px;
}
.section-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
}
.refresh-list {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #627460;
  cursor: pointer;
}
.refresh-list:hover:enabled {
  background: #edf2e8;
}
.refresh-list:disabled {
  opacity: 0.5;
  cursor: default;
}
.refresh-list svg {
  width: 15px;
  height: 15px;
}
.section-label > span:last-child {
  font-size: 12px;
  color: #899184;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}
.app-card {
  position: relative;
  min-width: 0;
  background: white;
  border: 1px solid #e0e6da;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 3px 9px #25372504;
  transition:
    box-shadow 0.2s,
    border-color 0.2s;
}
.app-card:hover,
.app-card:focus-within {
  border-color: #bccdb6;
  box-shadow: 0 8px 26px #2537250a;
}
.preview {
  position: relative;
  aspect-ratio: 16/10;
  background: #eef2e9;
  overflow: hidden;
  border-bottom: 1px solid #e5eadf;
  isolation: isolate;
}
.cover-image, .cover-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cover-image { object-fit: cover; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .gallery-grid .cover-image {
    transition: transform 220ms ease-out;
  }
  .gallery-grid .app-card:hover .cover-image {
    transform: scale(1.05);
  }
}
.cover-placeholder {
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  overflow-wrap: anywhere;
  font-size: clamp(18px, 3vw, 32px);
  font-weight: 650;
  color: #47634b;
  background: linear-gradient(135deg, #f1f5e8, #d6e6da);
}
.card-info {
  padding: 19px 20px 17px;
}
.card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 11px;
}
.card-title {
  flex: 1;
  min-width: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 600;
  margin: 0;
}
.card-link {
  display: block;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  text-decoration: none;
}
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 16px;
}
.card-link:focus-visible {
  outline: none;
}
.card-link:focus-visible::after {
  outline: 3px solid #8cb49a;
  outline-offset: -3px;
}
.card-path {
  margin: 0 0 12px;
  color: #708162;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.gallery-grid .card-info {
  padding: 6px 12px 9px;
}
.gallery-grid .card-heading {
  gap: 6px;
  margin-bottom: 2px;
}
.gallery-grid .card-title {
  font-size: 14px;
  line-height: 1.35;
}
.gallery-grid .meta {
  gap: 3px 6px;
  font-size: 11px;
  line-height: 1.4;
  color: #657060;
}
.gallery-grid .kind {
  padding: 1px 5px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: #8b9386;
}
.card-updated {
  margin-left: auto;
  white-space: nowrap;
}
.kind {
  background: #f0f4eb;
  padding: 4px 7px;
  border-radius: 5px;
  color: #708162;
  white-space: nowrap;
}
.copy {
  position: relative;
  z-index: 2;
  flex: none;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  display: grid;
  place-items: center;
  padding: 5px;
  color: #7b8972;
  border-radius: 5px;
  cursor: pointer;
}
.copy:hover {
  background: #f1f5ec;
}
.copy svg {
  width: 16px;
  height: 16px;
}
.copy .copy-check,
.copy.copied .copy-icon {
  display: none;
}
.copy.copied .copy-check {
  display: block;
}
.copy.copied {
  color: #367346;
  background: #edf5e9;
}
.copy:disabled {
  cursor: wait;
}
.list-loading {
  display: grid;
  place-items: center;
  min-height: 120px;
}
.list-spinner {
  width: 22px;
  height: 22px;
  border: 2px solid #d9e2d4;
  border-top-color: #526d52;
  border-radius: 50%;
}
@media (prefers-reduced-motion: no-preference) {
  .list-spinner,
  .refresh-list:disabled svg {
    animation: list-spin 0.8s linear infinite;
  }
}
@keyframes list-spin {
  to { transform: rotate(1turn); }
}
.state {
  padding: 74px 20px;
  text-align: center;
  border: 1px dashed #dce4d5;
  border-radius: 16px;
  background: #fbfcf9;
  color: #7a8870;
  line-height: 1.9;
}
.state h2 {
  font-size: 20px;
  color: #405637;
  margin: 0 0 10px;
  font-weight: 600;
}
.state p {
  font-size: 14px;
  margin: 0 0 18px;
}
.state a {
  color: #526b45;
  font-size: 13px;
}
.error {
  padding: 16px;
  border: 1px solid #e9d8ba;
  border-radius: 10px;
  background: #fff9ed;
  color: #94682e;
  line-height: 1.7;
  font-size: 13px;
  margin: 0 0 20px;
}
.pagination {
  text-align: center;
  padding: 32px 0 60px;
}
.more {
  border: 1px solid #d6dfcc;
  border-radius: 9px;
  padding: 11px 30px;
  background: white;
  font-size: 13px;
  color: #546b48;
  cursor: pointer;
}
.more:disabled {
  opacity: 0.6;
  cursor: wait;
}
.footer {
  text-align: center;
  color: #98a18e;
  font-size: 11px;
  padding: 24px;
}
@media (min-width: 961px) {
  .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
  }
}
@media (max-width: 960px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .wrap {
    width: calc(100% - 32px);
  }
  .heading {
    padding: 32px 0 24px;
    align-items: start;
  }
  .publish-link {
    padding: 9px 11px;
    margin-top: 29px;
    font-size: 12px;
  }
  h1 {
    font-size: 29px;
  }
  .subtitle {
    max-width: 230px;
    font-size: 12px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .section-label {
    margin-top: 2px;
  }
  .card-info {
    padding: 17px 18px;
  }
  .state {
    padding: 50px 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}

.access-badge {
  color: #506849;
  font-weight: 600;
  white-space: nowrap;
}
.manage-menu {
  position: static;
  z-index: 3;
}
.manage-toggle {
  list-style: none;
}
.manage-toggle::-webkit-details-marker {
  display: none;
}
.manage-options {
  position: absolute;
  right: 14px;
  bottom: 65px;
  z-index: 4;
  min-width: 160px;
  padding: 6px;
  border: 1px solid #dfe6d9;
  border-radius: 10px;
  background: white;
  box-shadow: 0 10px 30px #26332d22;
}
.manage-options button {
  display: block;
  text-align: left;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: white;
  padding: 11px 14px;
  color: #405637;
  cursor: pointer;
}
.manage-options button:hover {
  background: #f0f4eb;
}
.manage-options .danger {
  color: #a43d32;
}
#manage-dialog {
  width: min(460px, calc(100% - 32px));
  padding: 28px;
  border: 1px solid #dfe6d9;
  border-radius: 18px;
  color: #26332d;
  box-shadow: 0 24px 80px #26332d33;
}
#manage-dialog::backdrop {
  background: #17251c66;
  backdrop-filter: blur(3px);
}
#manage-dialog h2 {
  margin: 0 0 12px;
  font-size: 22px;
}
#manage-description {
  color: #6b7865;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
#manage-dialog label {
  display: block;
  margin: 20px 0 8px;
  font-size: 14px;
}
#manage-password {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 52px 12px 12px;
  border: 1px solid #cdd8c6;
  border-radius: 8px;
  font: inherit;
}
.password-input-wrap {
  position: relative;
}
#manage-password-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #627460;
  cursor: pointer;
}
#manage-password-toggle:hover {
  background: #edf2e8;
}
#manage-password-toggle:focus-visible {
  outline: 2px solid #36573e;
  outline-offset: 1px;
}
#manage-password-toggle:disabled {
  opacity: 0.45;
  cursor: wait;
}
#manage-password-toggle svg {
  width: 20px;
  height: 20px;
}
.field-hint {
  color: #7a8870;
  font-size: 12px;
}
#manage-error {
  color: #a43d32;
  font-size: 13px;
  line-height: 1.7;
}
.manage-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}
.manage-actions button {
  padding: 10px 18px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  background: #edf2e8;
  color: #486046;
}
#manage-submit {
  background: #36573e;
  color: white;
}
#manage-submit.danger {
  background: #a43d32;
}
.manage-actions button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.visibility-icon {
  display: inline-flex;
  align-items: center;
  color: var(--accent, #365b43);
}
.visibility-icon svg { width: 18px; height: 18px; }
.visibility-icon.is-hidden { color: #7c8077; }
.visibility-icon:focus-visible {
  outline: 2px solid #8cb49a;
  outline-offset: 2px;
}
.visibility-icon:disabled { opacity: 0.5; cursor: wait; }
.card-error { color: #b13d32; font-size: 12px; line-height: 1.5; margin: 10px 0 0; }

.manage-options .login-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e7ece2;
}
.setting-switch {
  width: 30px;
  height: 18px;
  flex: none;
  padding: 2px;
  border-radius: 12px;
  background: #ccd4c7;
}
.setting-switch::after {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
}
.login-setting[aria-checked="true"] .setting-switch { background: #365c43; }
.login-setting[aria-checked="true"] .setting-switch::after { transform: translateX(12px); }
.login-setting:disabled { opacity: 0.6; cursor: wait; }
