@import url("./submit.css");
@import url("./screening.css");

/* Premium interaction layer shared by submission and classroom tools. */
:is(#gallery-submit,.sc-dialog){--ui-blue:#0071e3;--ui-blue-hover:#0077ed;--ui-ink:#111118;--ui-paper:#f5f5f7;--ui-muted:#6e6e73;--ui-line:#d8d8dc;--ui-white:#fff}

#gallery-submit{--gs-ink:var(--ui-ink);--gs-paper:var(--ui-paper);--gs-line:var(--ui-line);--gs-muted:var(--ui-muted);--gs-accent:var(--ui-blue);width:min(1080px,calc(100% - 40px));max-height:min(92dvh,920px);overflow:hidden;background:rgb(250 250 252/.98);border:1px solid rgb(255 255 255/.7);border-radius:28px;box-shadow:0 40px 120px rgb(0 0 0/.35),0 1px 0 rgb(255 255 255/.9) inset;color:var(--ui-ink);font-family:"SF Pro Display","SF Pro Text","PingFang SC","Helvetica Neue",sans-serif}
#gallery-submit[open]{animation:modal-in .48s cubic-bezier(.16,1,.3,1)}
#gallery-submit::backdrop{background:rgb(0 0 0/.66);backdrop-filter:blur(18px) saturate(.72);animation:veil-in .35s ease both}
#gallery-submit :is(button,input,textarea,select,a):focus-visible{outline:3px solid rgb(0 113 227/.35);outline-offset:2px}
#gallery-submit .gs-head{position:sticky;z-index:12;top:0;min-height:58px;padding:0 14px 0 24px;gap:11px;background:rgb(250 250 252/.82);border-bottom:1px solid rgb(0 0 0/.08);color:var(--ui-ink);backdrop-filter:blur(26px) saturate(1.6);font-size:12px;letter-spacing:.01em}
#gallery-submit .gs-mark{width:9px;height:9px;border-radius:50%;background:var(--ui-blue);box-shadow:0 0 0 6px rgb(0 113 227/.1),0 0 18px rgb(0 113 227/.6)}
#gs-close{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:50%;background:#e8e8ed;color:#424245;font-size:22px!important;transition:transform .22s ease,background .22s ease}
#gs-close:hover{background:#dcdce1;transform:rotate(5deg)}
#gallery-submit .gs-layout{grid-template-columns:minmax(300px,.78fr) minmax(0,1.48fr);height:min(820px,calc(92dvh - 58px));overflow:auto}
#gallery-submit .gs-aside{position:sticky;top:0;min-height:100%;padding:28px 30px;background:radial-gradient(circle at 24% 16%,rgb(58 127 255/.5),transparent 32%),radial-gradient(circle at 82% 76%,rgb(102 73 255/.27),transparent 35%),linear-gradient(145deg,#16161d 0%,#08080d 74%);border:0;color:white;isolation:isolate}
#gallery-submit .gs-aside::after{content:"";position:absolute;z-index:-1;inset:0;opacity:.14;background-image:linear-gradient(rgb(255 255 255/.16) 1px,transparent 1px),linear-gradient(90deg,rgb(255 255 255/.16) 1px,transparent 1px);background-size:32px 32px;mask-image:linear-gradient(135deg,#000,transparent 72%)}
#gallery-submit .gs-aside-top{color:rgb(255 255 255/.72);font-size:11px;letter-spacing:.08em;text-transform:uppercase}
#gallery-submit .gs-folio{color:rgb(255 255 255/.4);letter-spacing:.16em}
#gallery-submit .gs-sleeve{width:min(84%,230px);height:166px;margin:48px 0 40px;transform:perspective(700px) rotateY(-9deg) rotateZ(-3deg);filter:drop-shadow(0 30px 24px rgb(0 0 0/.42));transition:transform .7s cubic-bezier(.16,1,.3,1)}
#gallery-submit .gs-sleeve::before{inset:0;border:1px solid rgb(255 255 255/.2);border-radius:24px;background:linear-gradient(145deg,rgb(255 255 255/.16),rgb(255 255 255/.045));box-shadow:inset 0 1px rgb(255 255 255/.18);backdrop-filter:blur(14px)}
#gallery-submit .gs-sheet{inset:19px 23px;padding:18px 19px;border:1px solid rgb(255 255 255/.72);border-radius:15px;background:linear-gradient(145deg,#fff,#e9edfb);box-shadow:0 16px 40px rgb(0 0 0/.2);transform:rotate(2deg);transition:transform .7s cubic-bezier(.16,1,.3,1),background .3s ease}
#gallery-submit.gs-packed .gs-sleeve{transform:perspective(700px) rotateY(3deg) rotateZ(1deg) translateY(-8px)}
#gallery-submit.gs-packed .gs-sheet{transform:rotate(-1deg) translateY(-15px)}
#gallery-submit #gs-format{color:#111118;font-size:18px;letter-spacing:-.04em}
#gallery-submit .gs-sheet-lines{background:repeating-linear-gradient(to bottom,#a9adba 0 1px,transparent 1px 6px)}
#gallery-submit .gs-fold{inset:auto -16px -22px auto;width:68px;height:68px;border:0;border-radius:50%;background:radial-gradient(circle at 35% 30%,#7bc5ff,#086ee9 50%,#263dba);box-shadow:0 0 38px rgb(52 134 255/.55)}
#gallery-submit .gs-rivet{display:none}
#gallery-submit .gs-preview-copy h3{color:white;font:650 clamp(24px,2.6vw,36px)/1.16 "SF Pro Display","PingFang SC",sans-serif;letter-spacing:-.045em}
#gallery-submit .gs-preview-copy p{color:rgb(255 255 255/.6);font-size:13px}
#gallery-submit .gs-spec{margin:22px 0 28px;color:white;font-size:12px}
#gallery-submit .gs-spec div{padding:9px 0;border-color:rgb(255 255 255/.13)}
#gallery-submit .gs-spec dt{color:rgb(255 255 255/.45)}
#gallery-submit .gs-spec dd{color:rgb(255 255 255/.9)}
#gallery-submit .gs-steps{border-color:rgb(255 255 255/.14);color:rgb(255 255 255/.46)}
#gallery-submit .gs-steps li::before{border-radius:50%;background:rgb(255 255 255/.22)}
#gallery-submit .gs-steps li[aria-current]{color:white}
#gallery-submit .gs-steps li[aria-current]::before{background:#58a6ff;box-shadow:0 0 0 4px rgb(88 166 255/.14)}
#gallery-submit .gs-steps li.gs-past::before{background:#fff}
#gallery-submit .gs-body{padding:clamp(30px,4vw,52px);overflow:auto;background:linear-gradient(180deg,#fff 0%,#fafafa 100%)}
#gallery-submit .gs-step{margin-bottom:11px;color:var(--ui-blue);font-size:11px;letter-spacing:.12em}
#gs-heading{margin:0 0 10px;color:#101014;font:700 clamp(34px,4.4vw,54px)/1.04 "SF Pro Display","PingFang SC",sans-serif;letter-spacing:-.055em}
#gallery-submit .gs-lead{max-width:580px;margin:0 0 28px;color:var(--ui-muted);font-size:14px;line-height:1.65}
#gallery-submit .gs-drop{min-height:250px;padding:34px 20px;gap:9px;border:1.5px dashed #b5b5bc;border-radius:22px;background:linear-gradient(180deg,#f6f8fb,#f1f3f7);transition:border-color .25s ease,background .25s ease,transform .25s ease,box-shadow .25s ease}
#gallery-submit .gs-drop:hover{border-color:#7c9ec5;background:#f4f8ff;box-shadow:0 14px 40px rgb(0 70 140/.08);transform:translateY(-2px)}
#gallery-submit .gs-drop.gs-dragging{border:2px solid var(--ui-blue);background:#eaf4ff;box-shadow:0 0 0 7px rgb(0 113 227/.09);transform:scale(1.01)}
#gallery-submit .gs-upload-icon{width:54px;height:54px;margin-bottom:6px;border-radius:17px;background:linear-gradient(145deg,#1787f7,#0066d1);color:white;box-shadow:0 13px 28px rgb(0 113 227/.28);font-size:27px}
#gs-file-title{font-size:18px;letter-spacing:-.015em}
#gs-file-hint{color:var(--ui-muted);font-size:12px}
#gallery-submit :is(.gs-outline,.gs-primary,.gs-text){min-height:44px;border-radius:999px;transition:transform .18s ease,box-shadow .18s ease,background .18s ease}
#gallery-submit :is(.gs-outline,.gs-primary){padding:11px 21px;border:0;font-size:13px;font-weight:650}
#gallery-submit .gs-outline{background:#e8e8ed;color:#1d1d1f}
#gallery-submit .gs-primary{background:var(--ui-blue);color:white;box-shadow:0 7px 18px rgb(0 113 227/.18)}
#gallery-submit .gs-primary:hover:not(:disabled){background:var(--ui-blue-hover);box-shadow:0 10px 24px rgb(0 113 227/.25);transform:translateY(-1px)}
#gallery-submit .gs-outline:hover:not(:disabled){background:#dcdce1;transform:translateY(-1px)}
#gallery-submit .gs-text{color:#424245;text-decoration:none}
#gallery-submit .gs-text:hover:not(:disabled){color:var(--ui-blue)}
#gallery-submit .gs-help{color:var(--ui-muted);line-height:1.7}
#gallery-submit .gs-actions{margin-top:26px;padding-top:20px;border-color:#e5e5e8}
#gallery-submit .gs-grid{gap:18px 16px}
#gallery-submit .gs-grid label{gap:7px;color:#34343a;font-size:12px;font-weight:650}
#gallery-submit .gs-grid :is(input,select,textarea){padding:12px 14px;border:1px solid #d2d2d7;border-radius:13px;background:#fff;color:#17171c;box-shadow:0 1px 0 rgb(0 0 0/.02);transition:border-color .2s ease,box-shadow .2s ease}
#gallery-submit .gs-grid :is(input,select,textarea):focus{border-color:var(--ui-blue);box-shadow:0 0 0 4px rgb(0 113 227/.1);outline:0}
#gallery-submit .gs-grid textarea{min-height:105px}
#gallery-submit .gs-team{gap:13px 16px;padding:18px;border:1px solid #d9e8fa;border-left:1px solid #d9e8fa;border-radius:17px;background:#f3f8ff}
#gallery-submit .gs-team p{color:#3e648f}
#gallery-submit .gs-agree{padding:14px 16px;border-radius:14px;background:#f3f3f5}
#gallery-submit .gs-agree input{accent-color:var(--ui-blue)}
#gs-error{padding:12px 14px;border:0;border-radius:13px;background:#fff0ef;color:#a32119}
#gs-transfer{padding:14px;border-radius:14px;background:#f0f6ff}
#gs-progress{accent-color:var(--ui-blue)}
#gallery-submit .gs-receipt-card{padding:22px 0;border-color:#e3e3e7}
#gallery-submit .gs-tick{width:52px;height:52px;background:#e5f6ea;color:#12833b;font-size:24px}
#gs-receipt-title{font:700 23px/1.3 "SF Pro Display","PingFang SC",sans-serif}

dialog.sc-dialog{--sc-ink:var(--ui-ink);--sc-paper:var(--ui-paper);--sc-muted:var(--ui-muted);--sc-line:var(--ui-line);--sc-accent:var(--ui-blue);width:min(900px,calc(100% - 36px));max-height:92dvh;border:1px solid rgb(255 255 255/.8);border-radius:28px;background:#f8f8fa;color:var(--ui-ink);box-shadow:0 40px 120px rgb(0 0 0/.38);font-family:"SF Pro Display","SF Pro Text","PingFang SC","Helvetica Neue",sans-serif;overflow:auto}
dialog.sc-dialog[open]{animation:modal-in .48s cubic-bezier(.16,1,.3,1)}
.sc-dialog::backdrop{background:rgb(0 0 0/.68);backdrop-filter:blur(18px) saturate(.7);animation:veil-in .35s ease both}
.sc-dialog :is(button,input,select,a,.sc-row):focus-visible{outline:3px solid rgb(0 113 227/.34);outline-offset:2px}
.sc-dialog :is(button,input,select){border-radius:12px}
.sc-dialog .sc-cap{position:sticky;z-index:5;top:0;padding:26px 32px 22px;border:0;border-bottom:1px solid #e2e2e5;background:rgb(248 248 250/.86);color:var(--ui-ink);backdrop-filter:blur(25px) saturate(1.6)}
.sc-dialog .sc-cap h2{font-size:clamp(32px,4vw,48px);letter-spacing:-.055em}
.sc-dialog .sc-cap .sc-link{min-width:68px;padding:8px 16px;border-radius:999px;background:#e8e8ed;color:#424245;text-decoration:none}
.sc-dialog .sc-intro p{margin-top:7px;color:var(--ui-muted);font-size:13px}
.sc-dialog .sc-content{padding:25px 32px 28px}
.sc-dialog .sc-choose,.sc-dialog .sc-name-form{gap:10px;margin-bottom:18px;padding:18px;border-radius:18px;background:#fff;box-shadow:0 1px 0 rgb(0 0 0/.05)}
.sc-dialog .sc-field{gap:7px;color:#48484d}
.sc-dialog .sc-field select,.sc-dialog .sc-field input{height:46px;padding:8px 13px;border:1px solid #d2d2d7;border-radius:12px;background:#f8f8fa;transition:border-color .2s ease,box-shadow .2s ease}
.sc-dialog .sc-field :is(select,input):focus{border-color:var(--ui-blue);box-shadow:0 0 0 4px rgb(0 113 227/.1);outline:0}
.sc-dialog .sc-button,.sc-dialog .sc-glass{min-height:44px;padding:9px 18px;border:0;border-radius:999px;background:#e8e8ed;font-weight:650;transition:transform .18s ease,background .18s ease,box-shadow .18s ease}
.sc-dialog .sc-primary{background:var(--ui-blue);color:white;box-shadow:0 7px 20px rgb(0 113 227/.2)}
.sc-dialog .sc-button:not(:disabled):hover{background:#dcdce1;color:#1d1d1f;transform:translateY(-1px)}
.sc-dialog .sc-primary:not(:disabled):hover{background:var(--ui-blue-hover);color:white;box-shadow:0 10px 26px rgb(0 113 227/.27)}
.sc-dialog .sc-link{color:#515157;text-decoration:none}
.sc-dialog .sc-link:hover{color:var(--ui-blue)}
.sc-dialog .sc-add{gap:10px;margin-bottom:20px;padding:18px;border:0;border-radius:18px;background:linear-gradient(145deg,#eef5ff,#f5f8fc)}
.sc-dialog .sc-add-button{background:#25252b;color:white}
.sc-dialog .sc-items{gap:9px;max-height:40dvh;padding:2px;border:0}
.sc-dialog .sc-row{grid-template-columns:auto 62px minmax(0,1fr) auto;min-height:78px;padding:9px 12px;border:1px solid #e2e2e6;border-radius:17px;background:white;transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease}
.sc-dialog .sc-row:hover{border-color:#cfcfd5;box-shadow:0 9px 24px rgb(0 0 0/.06);transform:translateY(-1px)}
.sc-dialog .sc-thumb{width:62px;height:48px;border-radius:9px;background:#d9d9de}
.sc-dialog .sc-index{color:#8b8b92}
.sc-dialog .sc-item-label strong{font-size:16px}
.sc-dialog .sc-row-button{min-width:34px;min-height:34px;border:0;border-radius:10px;background:#f0f0f2}
.sc-dialog .sc-row-button:not(:disabled):hover{background:#dedee3}
.sc-dialog .sc-empty{padding:35px 24px;border:1px dashed #cccdd2;border-radius:18px;background:white;text-align:center}
.sc-dialog .sc-actions{margin:20px 0}
.sc-dialog .sc-backup{padding-top:14px;border-color:#e1e1e4}
.sc-dialog .sc-status:not(:empty){padding:11px 14px;border-radius:12px;background:#edf5ff;color:#155c9f}

dialog.sc-stage{position:fixed;inset:0;width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border:0;border-radius:0;background:#050507;color:white;overflow:auto;scrollbar-width:none}
dialog.sc-stage::-webkit-scrollbar{width:0;height:0}
.sc-stage .sc-screen{padding:clamp(22px,4vw,64px);gap:20px;background:#050507;overflow:hidden}
.sc-stage .sc-image{background:radial-gradient(circle at 70% 22%,#263450,#0a0b10 68%)}
.sc-stage .sc-image img{transform:scale(1.035);animation:stage-drift 14s ease-out both}
.sc-stage .sc-image::after{background:linear-gradient(0deg,#050507 0%,rgb(5 5 7/.84) 27%,rgb(5 5 7/.1) 82%),linear-gradient(90deg,rgb(5 5 7/.92),rgb(5 5 7/.1) 70%),linear-gradient(180deg,rgb(5 5 7/.72),transparent 25%);backdrop-filter:saturate(.92)}
.sc-stage .sc-bar{display:grid;grid-template-columns:minmax(120px,1fr) auto minmax(120px,1fr);align-items:start;gap:18px}
.sc-stage .sc-list-title{max-width:none;padding-top:11px;color:rgb(255 255 255/.72)}
.sc-stage .sc-stage-tools{justify-self:end}
.sc-stage .sc-glass{border:1px solid rgb(255 255 255/.2);background:rgb(20 20 24/.6);color:#fff;backdrop-filter:blur(18px) saturate(1.3)}
.sc-stage .sc-glass:not(:disabled):hover{border-color:rgb(255 255 255/.4);background:rgb(255 255 255/.16);color:white}
.sc-stage .sc-caption{gap:clamp(13px,2vh,24px);padding-top:clamp(50px,14vh,180px)}
.sc-stage .sc-meta{color:#7dbdff;font-size:clamp(12px,1.25vw,18px)}
.sc-stage .sc-caption h2{max-width:12ch;font-size:clamp(45px,7.3vw,118px);font-weight:700;letter-spacing:-.06em;text-wrap:balance;text-shadow:0 12px 50px rgb(0 0 0/.35)}
.sc-stage .sc-summary{max-width:43em;color:rgb(255 255 255/.78);font-size:clamp(15px,1.45vw,21px)}
.sc-stage .sc-primary{background:white;color:#111118;box-shadow:none}
.sc-stage .sc-primary:not(:disabled):hover{background:#f0f0f3;color:#111118}
.sc-stage .sc-judge{border:1px solid rgb(255 255 255/.23);background:rgb(20 20 24/.54);color:white;backdrop-filter:blur(18px)}
.sc-stage .sc-judge-note{color:rgb(255 255 255/.55)}
.sc-stage .sc-stage-foot{border-color:rgb(255 255 255/.18)}
.sc-stage .sc-progress{color:#8fc8ff}
.sc-timer{display:grid;grid-template-columns:auto auto;align-items:center;gap:0 14px;min-width:205px;padding:10px 14px;border:1px solid rgb(255 255 255/.2);border-radius:18px;background:rgb(12 12 16/.58);box-shadow:0 12px 45px rgb(0 0 0/.18);backdrop-filter:blur(22px) saturate(1.3);transition:border-color .3s ease,background .3s ease}
.sc-timer-label{color:rgb(255 255 255/.52);font-size:10px;letter-spacing:.08em}
.sc-timer-value{grid-row:1/3;font:600 30px/1 "SF Mono","IBM Plex Mono",monospace;font-variant-numeric:tabular-nums;letter-spacing:-.05em}
.sc-timer-controls{display:flex;gap:9px;margin-top:5px}
.sc-timer :is(button){padding:0;border:0;background:none;color:#89c6ff;font-size:11px;cursor:pointer}
.sc-timer :is(button):hover{color:white}
.sc-timer-low{border-color:rgb(255 180 50/.5);background:rgb(60 38 10/.58)}
.sc-timer-low .sc-timer-value{color:#ffd07a}
.sc-timer-done{border-color:rgb(255 94 94/.58);background:rgb(67 11 15/.62)}
.sc-timer-done .sc-timer-value{color:#ff8c8c}

@keyframes modal-in{from{opacity:0;transform:translateY(18px) scale(.965);filter:blur(7px)}to{opacity:1;transform:none;filter:none}}
@keyframes veil-in{from{opacity:0}to{opacity:1}}
@keyframes stage-drift{from{transform:scale(1.035)}to{transform:scale(1.095)}}

@media(max-width:720px){
  #gallery-submit{width:calc(100% - 18px);max-height:calc(100dvh - 18px);border-radius:23px}
  #gallery-submit .gs-layout{display:flex;height:auto;min-height:calc(100dvh - 76px)}
  #gallery-submit .gs-aside{position:relative;display:grid;grid-template-columns:60px minmax(0,1fr);min-height:auto;padding:13px 18px;background:linear-gradient(115deg,#10131c,#0a0a0f);border:0}
  #gallery-submit .gs-sleeve{width:54px;height:43px;margin:0;filter:drop-shadow(0 8px 8px rgb(0 0 0/.3))}
  #gallery-submit .gs-preview-copy h3{font-size:16px}
  #gallery-submit .gs-body{padding:25px 20px max(24px,env(safe-area-inset-bottom))}
  #gallery-submit .gs-drop{min-height:195px}
  #gs-heading{font-size:36px}
  .sc-dialog .sc-cap{padding:20px}
  .sc-dialog .sc-content{padding:20px}
  .sc-stage .sc-bar{grid-template-columns:minmax(80px,1fr) auto;align-items:start}
  .sc-stage .sc-timer{grid-column:1/-1;grid-row:2;justify-self:start;min-width:190px}
  .sc-stage .sc-stage-tools{grid-column:2;grid-row:1}
}
@media(max-width:540px){
  #gallery-submit .gs-grid{grid-template-columns:1fr;gap:13px}
  #gallery-submit .gs-wide{grid-column:1}
  #gallery-submit .gs-actions{gap:7px}
  #gallery-submit .gs-actions :is(.gs-outline,.gs-primary){padding-inline:16px}
  dialog.sc-dialog{width:calc(100% - 16px);max-height:calc(100dvh - 16px);border-radius:22px}
  .sc-dialog .sc-cap h2{font-size:34px}
  .sc-dialog .sc-choose,.sc-dialog .sc-name-form,.sc-dialog .sc-add{padding:14px}
  .sc-dialog .sc-row{grid-template-columns:auto minmax(0,1fr);padding:10px}
  .sc-dialog .sc-row-tools{grid-column:2;justify-self:start}
  .sc-stage .sc-screen{padding:17px 16px max(18px,env(safe-area-inset-bottom))}
  .sc-stage .sc-caption h2{font-size:clamp(42px,15vw,70px)}
  .sc-stage .sc-stage-foot{align-items:flex-end}
  .sc-stage .sc-stage-foot>.sc-stage-tools{display:grid;grid-template-columns:1fr 1fr}
}
@media(prefers-reduced-motion:reduce){
  #gallery-submit[open],dialog.sc-dialog[open],#gallery-submit::backdrop,.sc-dialog::backdrop,.sc-stage .sc-image img{animation:none}
  #gallery-submit *,.sc-dialog *{scroll-behavior:auto!important;transition-duration:.01ms!important}
}
