a,
a:visited,
a:hover,
a:active{
  color:inherit;
  text-decoration:none;
}

.study-card a,
.study-card a:visited,
.card a,
.card a:visited{
  color:inherit;
  text-decoration:none;
}

/* RESET */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  overflow-y:auto !important;
  scrollbar-gutter: stable;
}

html, body{
  margin:0;
  min-height:100%;
  background:#dfe6ef;
  font-family:'Montserrat', sans-serif;
}

body{
  opacity:1;
}

.app{
  width:min(100vw, 430px);
  margin:0 auto;
  min-height:100vh;
  min-height:100dvh;
  position:relative;
  overflow:visible;
  background:#f3f2f4;
  font-family:'Montserrat', sans-serif;
}

.app::-webkit-scrollbar{
  display:none;
}

/* COLORS */
:root {
  --bg: #dfe6ef;
  --panel: #E0E5EC;
  --card: #ffffff;

  --text: #333333;
  --muted: #626262;

  --radius-lg: 26px;
  --radius-md: 20px;
  --radius-sm: 12px;
}

/* PAGE */
body {
  display: flex;
  justify-content: center;
  background: var(--bg);
}

.studio-app {
  width: 100%;
  max-width: 430px;
  min-height: 100%;
  padding: 0 16px 32px;
  overflow:visible;
  }

/* HEADER */
.studio-hero {
position: relative;
  text-align: center;
  padding: 12px 4px 28px;
opacity: 0;
 transform: translateY(8px);
  transition:
    opacity .38s ease .12s,
    transform .38s cubic-bezier(.22,.8,.28,1) .12s;
  }

body.gallery-ready .studio-hero{
  opacity:1;
  transform:translateY(0);
}

.hero-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 300px;
  min-height: 58px;
  margin-top: 6px;
}

.hero-brush {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);

  width: 300px;
  height: 90px;

  background-image: url("../images/oil-brush-strip.png");
  background-size: cover;
  background-position: center;

  -webkit-mask-image: url("../images/brush.png");
  mask-image: url("../images/brush.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;

  opacity: 0.28;
  filter: saturate(1.02) contrast(1.02) blur(0.1px);
  z-index: 0;
  pointer-events: none;
}

.studio-wordmark {
  position: relative;
  z-index: 1;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: #333333;
  transform: translateY(-6px);
}

.studio-tagline {
  position: relative;
  z-index: 1;
  margin: -16px auto 0;
  max-width: 280px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.35;
  color: rgba(58, 62, 68, 0.72);
}

/* MAIN */
.studio-main {
  display:flex;
  flex-direction:column;
  padding-top:0;
  gap:14px;
  opacity:0;
  transform:translateY(18px);
  transition:
    opacity .48s ease,
    transform .48s cubic-bezier(.22,.8,.28,1);
}

body.gallery-ready .studio-main{
  opacity:1;
  transform:translateY(0);
}

/* COLLECTION PANEL */
.collection-section {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.5);
}

/* COLLECTION HEADER */
.collection-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}

.collection-header h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text);
}

.collection-header span {
  font-size: 12px;
  color: #626262;
}
.collection-section {
  background: var(--panel);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.1),
    0 1px 2px rgba(0,0,0,0.01);
  border: 1px solid rgba(0,0,0,0.095);
}

/* GRID */
.study-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* CARD */
.study-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: none;
  cursor: pointer;
color:var(--text);
  font-family:'Montserrat',sans-serif;  
text-align: left;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;

  box-shadow:
    0 8px 18px rgba(0,0,0,0.10),
    0 2px 6px rgba(0,0,0,0.05);

  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

a{
  color: inherit;
  text-decoration: none;
}

.study-card:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 28px rgba(0,0,0,0.14),
    0 4px 10px rgba(0,0,0,0.06);
}

/* IMAGE */
.study-thumb {
  width: 100%;
  height: 190px;
  object-fit: cover;
  object-position: center center;
  display: block;
  image-rendering: auto;
}

/* Per-image crop control */
.thumb-frog {
  object-position: center 47%;
}

.thumb-sundae {
  object-position: center 17%;
}
.thumb-fish {
  object-position: center 0%;
}

.placeholder-thumb {
  background:
    radial-gradient(circle at 30% 28%, rgba(255,255,255,0.45), transparent 26%),
    linear-gradient(135deg, #d9d1cb, #c6bbb3 45%, #e7dfda 100%);
}

/* META */
.study-meta {
  padding: 14px 16px 15px;
}

.study-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.study-name {
  font-size: 16px;
  white-space: nowrap;
  flex-shrink: 0;
  color:var(--text);
}

.study-subtitle {
  margin-top: 4px;
  font-size: 12px;
  color: #6b6b6b;
}

.study-details {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

/* COLOR DOTS */
.color-dots {
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.color-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
}

/* REGION COUNT */
.region-count {
  font-size: 12px;
  color: #6b6b6b;
  white-space: nowrap;
  flex-shrink: 0;
}

.start-badge{
  position:absolute;
  top:12px;
  left:12px;
  z-index:2;

  padding:6px 10px;
  border-radius:999px;

  background:rgba(255,255,255,.58);
  border:1px solid rgba(255,255,255,.52);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);

  color:rgba(58,54,50,.72);
  font-size:11px;
  font-weight:450;
  letter-spacing:.01em;

  box-shadow:
    0 3px 8px rgba(35,28,20,.08),
    inset 0 1px 0 rgba(255,255,255,.42);

  pointer-events:none;
}

/* LOCKED STATE */
.study-card.locked {
  opacity: 0.90;
  cursor: default;
}

.locked-modal[hidden]{
  display:none !important;
}

.locked-modal{
    position:fixed;
  inset:0;
  z-index:300;

  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;

  opacity:0;
  pointer-events:none;
  transition:opacity .18s ease;
}

.locked-modal.is-open{
  opacity:1;
  pointer-events:auto;
}

.locked-modal-backdrop{
  position:absolute;
  inset:0;
  background:rgba(24,22,20,.55);
}

.locked-modal.closing,
.locked-modal.closing .locked-modal-card{
  transition:none !important;
}

.locked-modal-card{
  position:relative;
  z-index:1;

  width:min(350px, calc(100vw - 48px));
  max-width:350px;
  padding:24px;

  border-radius:28px;
  background:rgba(255,255,255,.96);
  border:1px solid rgba(255,255,255,.90);

  box-shadow:
    0 30px 80px rgba(20,16,12,.28),
    inset 0 1px 0 rgba(255,255,255,.75);

  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);

  transform:translateY(10px) scale(.985);
  opacity:0;

  transition:
    transform .22s cubic-bezier(.22,.8,.28,1),
    opacity .18s ease;
}

.locked-modal.is-open .locked-modal-card{
  transform:translateY(0) scale(1);
  opacity:1;
}

.locked-modal-card h2{
  font-size:18px;
  font-weight:550;
  color:#34302d;
  letter-spacing:-.02em;
}

.locked-modal-card p{
  margin-top:12px;
  font-size:13px;
  line-height:1.45;
  color:rgba(50,45,42,.76);
}

.locked-modal-ok{
appearance:none;
  -webkit-appearance:none;
  width:100%;
  height:42px;
  margin-top:22px;
  padding:0 18px;
  border-radius:999px;
  background:#E0E5EC;
  border:1px solid rgba(0,0,0,0.06);
  color:#2a2a2a;
  font-family:'Montserrat',sans-serif;
  font-size:14px;
  font-weight:500;
  letter-spacing:.01em;
  cursor:pointer;
  box-shadow:
    0 1px 2px rgba(0,0,0,.05),
    inset 0 1px 0 rgba(255,255,255,.6);
}

/* LOCK ICON */
.lock-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.62);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(2px);
}

.lock-badge::before {
  content: "";
  width: 18px;
  height: 18px;
  display: block;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 -960 960 960' fill='%236b7280'%3E%3Cpath d='M240-80q-33 0-56.5-23.5T160-160v-400q0-33 23.5-56.5T240-640h40v-80q0-83 58.5-141.5T480-920q83 0 141.5 58.5T680-720v80h40q33 0 56.5 23.5T800-560v400q0 33-23.5 56.5T720-80H240Zm0-80h480v-400H240v400Zm296.5-143.5Q560-327 560-360t-23.5-56.5Q513-440 480-440t-56.5 23.5Q400-393 400-360t23.5 56.5Q447-280 480-280t56.5-23.5ZM360-640h240v-80q0-50-35-85t-85-35q-50 0-85 35t-35 85v80Z'/%3E%3C/svg%3E");
}



/* COMING SOON */

.coming-soon-panel {
  background: transparent;   /* ← key change */
  border: none;
  box-shadow: none;
  text-align: center;
  font-size: 16px;
  font-weight: 500;
  color: #7a6f66;
}

html{
  scrollbar-gutter: stable;
}

html,
body{
  overflow-y: auto;
}

html.splash-active,
body.splash-active{
  overflow: hidden !important;
}

body.desktop-shell-page .app{
  height:auto !important;
  max-height:none !important;
  overflow:hidden !important;
}
@media (max-width:430px){
  html,
  body{
    background:#f3f2f4;
  }
}

/* SPLASH */
.splash {
  position:absolute;
  top:0;
  left:0;
  right:0;

  height:100dvh;
  max-height:932px;

  z-index:500;
  overflow:hidden;

  display:flex;
  align-items:center;
  justify-content:center;

  background:#f7f3ea;
  border-radius:inherit;

  transition:
    opacity .48s ease,
    transform .48s ease,
    filter .48s ease;
}
.splash .title,
.splash .brush-mask{
  animation-fill-mode: forwards;
}

.splash.fade-out{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}

@keyframes splashOut {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.oil-bg {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center center;

  display: block;

  opacity: 0;
  transform: scale(1.03);

  filter: saturate(0.68) contrast(0.92) brightness(1.08);

  animation: oilIn 0.75s ease-out forwards;
}

@keyframes oilIn {
  to {
    opacity: 0.38;
    transform: scale(1);
  }
}

.paper-veil {
  position: absolute;
  inset: 0;

  background:
    radial-gradient(
      circle at center,
      rgba(247,243,234,0.22),
      rgba(247,243,234,0.62)
    ),
    linear-gradient(
      to bottom,
      rgba(255,255,255,0.18),
      rgba(247,243,234,0.08)
    );
}

.brand-stage {
  position: absolute;
  inset: 0;
  z-index: 3;
}

.brush-mask {
  position: absolute;
  left: 52%;
  top: 50%;
  width: 140%;
  aspect-ratio: 1600 / 1200;

  background-image: url("../images/oil-splash.png");
  background-size: cover;
  background-position: center;

  -webkit-mask-image: url("../images/bigbrush.png");
  mask-image: url("../images/bigbrush.png");

  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;

  filter: saturate(0.7) contrast(1.05);

  opacity: 0;
  transform: translate(-50%, -49%) scale(0.985);
  transform-origin: center center;

  clip-path: inset(0 100% 0 0);
 /* old delay */
  /* animation: brushPaintIn 1.05s cubic-bezier(.22,.75,.24,1) forwards;*/
 /*  animation-delay: 0.18s;*/
  animation: brushPaintIn .9s cubic-bezier(.22,.75,.24,1) forwards;
  animation-delay: .05s;
}

@keyframes brushPaintIn {
  0% {
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transform: translate(-50%, -49%) scale(1);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 1;
    clip-path: inset(0 0 0 0);
    transform: translate(-50%, -49%) scale(1);
  }
}

@keyframes brushSettle {
  from {
    transform: translate(-50%, -49%) scale(1.01);
  }

  to {
    transform: translate(-50%, -49%) scale(1);
  }
}
.title {
  position: absolute;
  left: 50%;
  top: 50%;
  width:100%;
  padding:0 24px;

  font-family: 'Montserrat', sans-serif;
  font-size: 55px;
  font-weight: 300;
  letter-spacing: 0.02em;
  color: rgba(255, 250, 242, 0.94);

  line-height: 1;
  text-align: center;
  white-space: nowrap;

  opacity: 0;
  transform: translate(-50%, -50%);

  text-shadow:
    0 1px 1px rgba(40,30,20,0.25),
    0 4px 10px rgba(40,30,20,0.15);

  /* animation: titleIn 0.45s ease forwards;*/
  /* animation-delay: 0.9s;*/

animation: titleIn .45s ease forwards;
  animation-delay: .55s;
}

@keyframes titleIn {
  from {
    opacity: 0;
    transform: translate(-50%, -50%);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}
.brushstroke-accent{
  position:absolute;
  top:-4px;
  left:-8px;
  width:180px;
  height:54px;
  background-image:url('../images/oil-brush-strip.png');
  background-size:cover;
  background-position:center;
  -webkit-mask-image:url('../images/brush.png');
  mask-image:url('../images/brush.png');
  -webkit-mask-size:contain;
  mask-size:contain;
  -webkit-mask-repeat:no-repeat;
  mask-repeat:no-repeat;
  -webkit-mask-position:center;
  mask-position:center;
  opacity:.10;
  pointer-events:none;
  z-index:1;
  mix-blend-mode:multiply;
  transform:rotate(-6deg) scaleX(-1);
  filter:saturate(.85) blur(.2px);
}

.game-title{
  font-size:17px;
  font-weight:500;
  color:var(--text);
  letter-spacing:-.3px;
  flex:0 0 auto;
  margin-right:10px;
  min-width:0;
  white-space:nowrap;
  line-height:1;
  position:relative;
  z-index:2;
}

.game-menu-btn{
  flex:0 0 auto;
  width:32px;
  height:32px;
  border:0;
  border-radius:999px;
  background:transparent;
  color:rgba(70,66,62,.46);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  position:relative;
  z-index:20;
  margin-left:4px;
  margin-right:-12px;
  opacity:.62;
}

.game-menu-btn .material-symbols-outlined{
  font-size:20px;
  line-height:1;
}
.gallery-topbar{
  height:40px;
  margin:0 -16px;
  padding:0 16px;
  display:flex;
  align-items:center;
  gap:10px;
  background:transparent;
  box-shadow:none;
  border-radius:0;
  position:relative;
}

.gallery-header-link{
  transform:translateY(5px);
}

.gallery-top-right{
  margin-left:auto;

  display:flex;
  align-items:center;

  gap:10px;

  min-width:0;
}

.gallery-section{
  background:transparent;
  border:0;
  box-shadow:none;
  padding:8px 12px 10px;
  border-bottom:1px solid rgba(0,0,0,.08);
}

.gallery-section .collection-header{
  margin-bottom:0;
  align-items:center;
}

.gallery-section .collection-header::after{
  content:"›";
  margin-left:8px;
  color:rgba(51,51,51,.38);
  font-size:22px;
  line-height:1;
}
.gallery-header-link{
  margin-left:auto;
  display:flex;
  align-items:center;
  
  height:26px;
  padding:0 9px 0 11px;
  gap:5px;

  border-radius:999px;

  background:rgba(255,255,255,.86);
  border:1px solid rgba(0,0,0,.07);
 box-shadow:0 1px 3px rgba(0,0,0,.06);

  font-size:12px;
  font-weight:500;
  color:rgba(58,58,58,.68);

  cursor:pointer;
  position:relative;
  z-index:2;
  white-space:nowrap;
  opacity:1;
  pointer-events:auto;
}

@media (max-width:430px){
  .gallery-header-link{
    height:34px;
    padding:0 13px;
    font-size:13px;
    gap:6px;
  }
}

.gallery-header-link .material-symbols-outlined{
  font-size:15px;
  line-height:1;
}
.gallery-header-link.empty{
  color:rgba(58,58,58,.45);
  cursor:default;
  pointer-events:none;
}
.gallery-header-link.empty .material-symbols-outlined{
  opacity:.45;
}
.gallery-header-link:not(.empty):hover{
  color:rgba(58,58,58,.78);
  background:rgba(255,255,255,.92);
  border-color:rgba(0,0,0,.065);
}

.gallery-header-link:not(.empty):hover .material-symbols-outlined{
  color:rgba(58,58,58,.58);
}