.world-app-page,
.world-entries-page,
.world-entry-edit-page{
  position:fixed;
  inset:0;
  z-index:110;
  display:flex;
  flex-direction:column;
  min-width:0;
  overflow:hidden;
  color:var(--text-main);
  background:var(--ui-color);
  transform:translate3d(18px,0,0);
  transition:opacity .22s ease,transform .27s cubic-bezier(.2,.72,.24,1),visibility 0s linear .27s;
}
.world-app-page.active,
.world-entries-page.active,
.world-entry-edit-page.active{
  transform:translate3d(0,0,0);
  transition-delay:0s;
}
.world-header{
  position:relative;
  z-index:8;
  flex:0 0 auto;
  min-height:56px;
  padding:calc(env(safe-area-inset-top) + var(--system-status-offset) + 10px) var(--side-pad) 4px;
  display:grid;
  grid-template-columns:92px minmax(0,1fr) 92px;
  align-items:center;
  gap:4px;
}
.world-header-left,
.world-header-actions{
  display:flex;
  align-items:center;
  gap:7px;
}
.world-header-actions{justify-content:flex-end}
.world-icon-button{
  appearance:none;
  -webkit-appearance:none;
  width:28px;
  height:28px;
  padding:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:var(--app-shell-border);
  border-radius:50%;
  background:var(--ui-surface-background);
  color:rgb(var(--ui-ink-rgb));
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  cursor:pointer;
  transition:transform .14s ease,box-shadow .14s ease,opacity .14s ease;
}
.world-icon-button:active{
  transform:scale(var(--app-shell-active-scale));
  box-shadow:var(--app-shell-shadow-active);
}
.world-icon-button svg{
  width:13px;
  height:13px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.world-header-title{
  min-width:0;
  border:0;
  background:none;
  padding:0;
  color:rgb(var(--ui-ink-rgb));
  text-align:center;
  cursor:pointer;
}
.world-header-kicker{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-family:"Avenir Next","Helvetica Neue",Arial,sans-serif;
  font-size:10.5px;
  font-weight:400;
  line-height:1.2;
  letter-spacing:.24em;
  text-indent:.24em;
}
.world-header-subtitle{
  display:block;
  margin-top:3px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:color-mix(in srgb,var(--text-secondary) 76%,transparent);
  font-size:8px;
  font-weight:400;
  line-height:1.2;
  letter-spacing:.06em;
}
.world-group-strip{
  position:relative;
  z-index:5;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  min-height:39px;
  padding:2px var(--side-pad) 7px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}
.world-group-strip::-webkit-scrollbar{display:none}
.world-group-tab{
  appearance:none;
  -webkit-appearance:none;
  flex:0 0 auto;
  min-height:28px;
  padding:0 12px;
  border:var(--app-shell-border);
  border-radius:999px;
  background:var(--ui-surface-background);
  color:var(--text-secondary);
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  font-size:9.5px;
  font-weight:400;
  letter-spacing:.02em;
  cursor:pointer;
  transition:transform .14s ease,box-shadow .14s ease,color .14s ease;
}
.world-group-tab.is-active{
  color:rgb(var(--ui-ink-rgb));
  transform:translateY(-1px);
}
.world-group-tab:active{box-shadow:var(--app-shell-shadow-active)}
.world-scroll,
.world-entries-scroll,
.world-entry-edit-scroll{
  flex:1 1 auto;
  min-height:0;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior-y:contain;
  scrollbar-width:none;
}
.world-scroll::-webkit-scrollbar,
.world-entries-scroll::-webkit-scrollbar,
.world-entry-edit-scroll::-webkit-scrollbar{display:none}
.world-scroll{
  padding:11px var(--side-pad) calc(32px + env(safe-area-inset-bottom));
}
.world-grid{
  width:min(100%,680px);
  margin:0 auto;
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  column-gap:10px;
  row-gap:20px;
  align-items:start;
}
.world-folder-card{
  appearance:none;
  -webkit-appearance:none;
  min-width:0;
  padding:0;
  border:0;
  background:none;
  color:var(--text-main);
  text-align:center;
  cursor:pointer;
  outline:none;
}
.world-folder-card:focus-visible{
  outline:1px solid color-mix(in srgb,rgb(var(--ui-ink-rgb)) 28%,transparent);
  outline-offset:4px;
  border-radius:12px;
}
.world-folder-visual{
  position:relative;
  width:100%;
  aspect-ratio:1.3125;
  display:flex;
  align-items:center;
  justify-content:center;
  transform-origin:50% 62%;
  transition:transform .15s ease,filter .15s ease;
}
.world-folder-card:active .world-folder-visual{transform:translateY(1px) scale(.965)}
.world-folder-art{
  display:block;
  width:100%;
  height:100%;
  object-fit:contain;
  object-position:center;
  border:0;
  background:none;
  box-shadow:none;
  --world-folder-source-hue:10deg;
  filter:
    hue-rotate(calc(var(--home-png-theme-hue) - var(--world-folder-source-hue)))
    saturate(var(--home-png-theme-saturation))
    brightness(var(--home-png-theme-brightness))
    drop-shadow(0 2px 2.5px rgba(var(--shadow-deep-rgb),.07));
  pointer-events:none;
  user-select:none;
  -webkit-user-select:none;
  -webkit-user-drag:none;
  transition:filter .18s ease;
}
.world-folder-name{
  display:block;
  width:100%;
  margin-top:7px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgb(var(--ui-ink-rgb));
  font-size:9.5px;
  font-weight:400;
  line-height:1.25;
  letter-spacing:.015em;
}
.world-empty[hidden]{display:none}
.world-empty{
  min-height:38vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px 16px;
}
.world-entries-scroll{
  padding:13px var(--side-pad) calc(34px + env(safe-area-inset-bottom));
}
.world-entry-list{
  width:min(100%,620px);
  margin:0 auto;
  display:flex;
  flex-direction:column;
  gap:13px;
}
.world-entry-card{
  position:relative;
  width:100%;
  min-width:0;
  padding:13px 14px 12px 17px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:11px;
  align-items:center;
  border:var(--app-shell-border);
  border-radius:12px 15px 13px 10px;
  background:var(--ui-surface-background);
  color:var(--text-main);
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  cursor:pointer;
  overflow:hidden;
  transform:rotate(var(--world-entry-tilt,0deg));
  transition:transform .15s ease,box-shadow .15s ease;
}
.world-entry-card:nth-child(3n+1){--world-entry-tilt:-.12deg}
.world-entry-card:nth-child(3n+2){--world-entry-tilt:.1deg}
.world-entry-card:active{
  transform:rotate(var(--world-entry-tilt,0deg)) scale(.988);
  box-shadow:var(--app-shell-shadow-active);
}
.world-entry-card::before{
  content:"";
  position:absolute;
  left:0;
  top:12px;
  bottom:12px;
  width:2px;
  border-radius:0 3px 3px 0;
  background:color-mix(in srgb,var(--ui-color) 64%,rgb(var(--ui-ink-rgb)) 9%);
  opacity:.72;
}
.world-entry-main{min-width:0}
.world-entry-title{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgb(var(--ui-ink-rgb));
  font-size:12.5px;
  font-weight:500;
  line-height:1.25;
}
.world-entry-tags{
  min-height:16px;
  margin-top:6px;
  display:flex;
  flex-wrap:wrap;
  gap:4px;
}
.world-entry-tag{
  max-width:130px;
  padding:2px 6px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  border:1px solid color-mix(in srgb,var(--ui-divider-border) 70%,transparent);
  border-radius:999px;
  color:color-mix(in srgb,var(--text-secondary) 86%,transparent);
  background:color-mix(in srgb,var(--ui-color) 55%,transparent);
  font-size:7.5px;
  line-height:1.2;
}
.world-entry-preview{
  margin-top:6px;
  overflow:hidden;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  color:color-mix(in srgb,var(--text-secondary) 82%,transparent);
  font-size:9px;
  font-weight:400;
  line-height:1.55;
  text-align:left;
}
.world-entry-side{
  display:flex;
  align-items:center;
  gap:8px;
}
.world-switch{
  position:relative;
  width:31px;
  height:18px;
  flex:0 0 auto;
}
.world-switch input{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
}
.world-switch-track{
  position:absolute;
  inset:0;
  border:var(--app-shell-border);
  border-radius:999px;
  background:color-mix(in srgb,var(--ui-color) 68%,white);
  box-shadow:var(--app-shell-shadow-active);
  transition:background .16s ease,box-shadow .16s ease;
}
.world-switch-track::after{
  content:"";
  position:absolute;
  top:2px;
  left:2px;
  width:12px;
  height:12px;
  border-radius:50%;
  background:color-mix(in srgb,var(--ui-color) 52%,white);
  border:var(--app-shell-border);
  box-shadow:var(--app-shell-shadow);
  transition:transform .16s ease,background .16s ease;
}
.world-switch input:checked + .world-switch-track{
  background:color-mix(in srgb,var(--ui-color) 76%,rgb(var(--ui-ink-rgb)) 6%);
}
.world-switch input:checked + .world-switch-track::after{
  transform:translateX(13px);
  background:var(--ui-color);
}
.world-entry-chevron{
  width:12px;
  height:12px;
  fill:none;
  stroke:color-mix(in srgb,rgb(var(--ui-ink-rgb)) 44%,transparent);
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.world-entry-edit-scroll{
  padding:12px var(--side-pad) calc(28px + env(safe-area-inset-bottom));
}
.world-manuscript{
  width:min(100%,610px);
  margin:0 auto;
  padding:3px 2px 16px;
}
.world-manuscript-section{
  position:relative;
  padding:15px 2px 14px;
  border-bottom:1px solid color-mix(in srgb,var(--ui-divider-border) 70%,transparent);
  filter:var(--ui-divider-filter);
}
.world-manuscript-section:last-of-type{border-bottom:0;filter:none}
.world-editor-label{
  display:block;
  margin-bottom:7px;
  color:color-mix(in srgb,var(--text-secondary) 82%,transparent);
  font-family:"Avenir Next","Helvetica Neue",Arial,sans-serif;
  font-size:8px;
  font-weight:400;
  line-height:1.2;
  letter-spacing:.14em;
  text-transform:uppercase;
}
.world-editor-input,
.world-editor-textarea,
.world-editor-select{
  width:100%;
  min-width:0;
  appearance:none;
  -webkit-appearance:none;
  border:0;
  outline:0;
  background:transparent;
  color:rgb(var(--ui-ink-rgb));
  font:inherit;
  user-select:text;
  -webkit-user-select:text;
}
.world-editor-input{
  min-height:31px;
  padding:0 1px;
  font-size:13px;
  font-weight:400;
}
.world-editor-input::placeholder,
.world-editor-textarea::placeholder{color:color-mix(in srgb,var(--text-secondary) 46%,transparent)}
.world-editor-textarea{
  min-height:235px;
  padding:10px 11px;
  resize:vertical;
  border:var(--app-shell-border);
  border-radius:12px;
  background:var(--ui-surface-background);
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop);
  -webkit-backdrop-filter:var(--ui-surface-backdrop);
  font-size:11px;
  line-height:1.7;
}
.world-editor-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(92px,.42fr);
  gap:14px;
  align-items:end;
}
.world-editor-select-wrap{
  position:relative;
  min-height:31px;
  display:flex;
  align-items:center;
}
.world-editor-select{
  min-height:31px;
  padding-right:20px;
  font-size:11px;
}
.world-editor-select-wrap svg{
  position:absolute;
  right:2px;
  width:12px;
  height:12px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  pointer-events:none;
}
.world-editor-enabled{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.world-editor-enabled-copy{
  color:var(--text-secondary);
  font-size:10px;
  line-height:1.45;
}
.world-entry-delete-button{
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:38px;
  margin-top:17px;
  border:var(--app-shell-border);
  border-radius:12px;
  background:var(--ui-surface-background);
  color:#b84d4d;
  box-shadow:var(--app-shell-shadow);
  font-size:10.5px;
  cursor:pointer;
}
.world-entry-delete-button:active{box-shadow:var(--app-shell-shadow-active);transform:scale(.992)}
.world-modal-layer{
  position:fixed;
  inset:0;
  z-index:150;
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:18px var(--side-pad) calc(18px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.12);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .18s ease,visibility 0s linear .18s;
}
.world-modal-layer.is-open{
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transition-delay:0s;
}
.world-sheet{
  width:min(100%,540px);
  max-height:min(78dvh,650px);
  overflow:auto;
  scrollbar-width:none;
  padding:15px 15px 14px;
  border:var(--app-shell-border);
  border-radius:22px 22px 16px 16px;
  background:var(--ui-surface-background);
  color:var(--text-main);
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop-strong);
  -webkit-backdrop-filter:var(--ui-surface-backdrop-strong);
  transform:translateY(16px) scale(.985);
  transition:transform .2s cubic-bezier(.2,.72,.24,1);
}
.world-modal-layer.is-open .world-sheet{transform:none}
.world-sheet::-webkit-scrollbar{display:none}
.world-sheet-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.world-sheet-title{
  margin:0;
  color:rgb(var(--ui-ink-rgb));
  font-family:"Avenir Next","Helvetica Neue",Arial,sans-serif;
  font-size:10px;
  font-weight:400;
  letter-spacing:.16em;
}
.world-sheet-close{
  width:26px;
  height:26px;
}
.world-sheet-folder-preview{
  width:112px;
  margin:4px auto 10px;
}
.world-sheet-folder-preview img{
  display:block;
  width:100%;
  --world-folder-source-hue:10deg;
  filter:
    hue-rotate(calc(var(--home-png-theme-hue) - var(--world-folder-source-hue)))
    saturate(var(--home-png-theme-saturation))
    brightness(var(--home-png-theme-brightness));
}
.world-sheet-field{
  display:block;
  padding:11px 2px 10px;
  border-bottom:1px solid color-mix(in srgb,var(--ui-divider-border) 72%,transparent);
}
.world-sheet-field:last-of-type{border-bottom:0}
.world-sheet-field-label{
  display:block;
  margin-bottom:6px;
  color:color-mix(in srgb,var(--text-secondary) 80%,transparent);
  font-size:8px;
  letter-spacing:.08em;
}
.world-sheet-input,
.world-sheet-select{
  width:100%;
  min-height:31px;
  appearance:none;
  -webkit-appearance:none;
  border:0;
  outline:0;
  background:transparent;
  color:rgb(var(--ui-ink-rgb));
  font:inherit;
  font-size:11.5px;
  user-select:text;
  -webkit-user-select:text;
}
.world-sheet-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:9px;
  margin-top:14px;
}
.world-sheet-action{
  appearance:none;
  -webkit-appearance:none;
  min-height:37px;
  padding:0 11px;
  border:var(--app-shell-border);
  border-radius:12px;
  background:var(--ui-surface-background);
  color:var(--text-secondary);
  box-shadow:var(--app-shell-shadow);
  font-size:10px;
  cursor:pointer;
}
.world-sheet-action.is-primary{color:rgb(var(--ui-ink-rgb))}
.world-sheet-action.is-danger{color:#b84d4d}
.world-sheet-action:active{box-shadow:var(--app-shell-shadow-active);transform:scale(.99)}
.world-group-manager-list{
  display:flex;
  flex-direction:column;
  gap:7px;
  margin-top:5px;
}
.world-group-manager-row{
  min-height:38px;
  padding:5px 6px 5px 10px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:8px;
  align-items:center;
  border:var(--app-shell-border);
  border-radius:11px;
  background:color-mix(in srgb,var(--ui-color) 42%,transparent);
}
.world-group-manager-name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:rgb(var(--ui-ink-rgb));
  font-size:10.5px;
}
.world-group-manager-actions{display:flex;align-items:center;gap:6px}
.world-group-manager-actions .world-icon-button{width:25px;height:25px;box-shadow:none}
.world-group-add-row{
  margin-top:10px;
  display:grid;
  grid-template-columns:minmax(0,1fr) 34px;
  gap:8px;
  align-items:center;
}
.world-group-add-row .world-sheet-input{
  min-height:36px;
  padding:0 10px;
  border:var(--app-shell-border);
  border-radius:11px;
  background:var(--ui-surface-background);
  box-shadow:var(--app-shell-shadow);
}
.world-import-summary{
  padding:10px 2px 4px;
  color:var(--text-secondary);
  font-size:9px;
  line-height:1.6;
}
.world-toast{
  position:fixed;
  z-index:170;
  left:50%;
  bottom:calc(28px + env(safe-area-inset-bottom));
  max-width:min(82vw,360px);
  padding:8px 13px;
  border:var(--app-shell-border);
  border-radius:999px;
  background:var(--ui-surface-background);
  color:rgb(var(--ui-ink-rgb));
  box-shadow:var(--app-shell-shadow);
  backdrop-filter:var(--ui-surface-backdrop-strong);
  -webkit-backdrop-filter:var(--ui-surface-backdrop-strong);
  font-size:9.5px;
  line-height:1.35;
  text-align:center;
  opacity:0;
  transform:translate(-50%,8px);
  pointer-events:none;
  transition:opacity .16s ease,transform .18s ease;
}
.world-toast.is-visible{opacity:1;transform:translate(-50%,0)}
@media (max-width:350px){
  .world-header{grid-template-columns:82px minmax(0,1fr) 82px}
  .world-header-actions{gap:5px}
  .world-icon-button{width:26px;height:26px}
  .world-grid{column-gap:7px;row-gap:17px}
  .world-folder-name{font-size:9px}
}
@media (min-width:700px){
  .world-grid{column-gap:18px;row-gap:24px}
}
