
:root{
  --itten-base-1:#273877;
  --itten-base-2:#64A076;
  --itten-base-3:#C960D7;
  --itten-color-1:#276077;
  --itten-color-2:#273877;
  --itten-color-3:#3E2777;
  --itten-color-4:#153541;
  --itten-color-5:#151F41;
  --itten-color-6:#221541;
  --itten-color-7:#398BAD;
  --itten-color-8:#3951AD;
  --itten-color-9:#5A39AD;
  --itten-color-10:#0F252E;
  --itten-color-11:#0F162E;
  --itten-color-12:#180F2E;
  --bg:#f5f7fb;
  --surface:#ffffff;
  --surface2:#eaf0f7;
  --text:#151f41;
  --muted:#40536a;
  --border:#bac8d7;
  --accent:#273877;
  --accentText:#ffffff;
  --shadow:0 8px 30px #151f4112;
  color-scheme:light;
}
[data-theme="dark"]{
  --bg:#0f162e;
  --surface:#151f41;
  --surface2:#222e50;
  --text:#f4f7ff;
  --muted:#c6d4e8;
  --border:#536582;
  --accent:#a8caff;
  --accentText:#0f162e;
  --shadow:0 8px 30px #0004;
  color-scheme:dark;
}
*{box-sizing:border-box}
html{min-height:100%;scroll-behavior:smooth}
body{
  margin:0;min-height:100vh;display:flex;flex-direction:column;
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif;
  background:var(--bg);color:var(--text);line-height:1.5
}
button,input,select,textarea{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.5;cursor:not-allowed}
button,a,input,select,textarea{touch-action:manipulation}
:focus-visible{outline:3px solid #398bad;outline-offset:3px}
a{color:var(--accent)}
.topbar{
  height:68px;position:sticky;top:0;z-index:20;
  display:flex;align-items:center;gap:12px;
  padding:8px max(16px,env(safe-area-inset-right));
  background:var(--surface);border-bottom:1px solid var(--border)
}
.icon-btn{
  width:46px;height:46px;flex:none;
  border:1px solid var(--border);border-radius:13px;
  background:var(--surface2);color:var(--text);
  font-size:24px
}
#themeBtn{margin-left:auto}
.brand{
  display:flex;align-items:center;gap:9px;border:0;
  background:transparent;color:var(--text);
  font-size:1.25rem;font-weight:800
}
.brand img{object-fit:contain}
.menu{
  position:fixed;top:68px;left:0;z-index:30;
  width:min(340px,100vw);max-height:calc(100dvh - 68px);
  overflow-y:auto;background:var(--surface);
  border:1px solid var(--border);box-shadow:var(--shadow);
  padding:12px
}
.menu[hidden]{display:none}
.menu button,.menu a{
  display:block;width:100%;text-align:left;padding:13px;
  border:0;border-radius:10px;background:transparent;
  color:var(--text);text-decoration:none;font-weight:600
}
.menu button:hover,.menu a:hover{background:var(--surface2)}
main{width:min(1120px,100%);margin:0 auto;flex:1;padding:24px 16px 48px}
h1,h2,h3,p{margin-top:0}
h1{font-size:clamp(1.6rem,4vw,2.5rem)}
h2{font-size:1.3rem}
h3{font-size:1.08rem}
.muted{color:var(--muted)}
.small{font-size:.875rem}
.grid{display:grid;gap:16px}
.stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.card{
  background:var(--surface);border:1px solid var(--border);
  border-radius:18px;padding:20px;box-shadow:var(--shadow);
  min-width:0
}
.stat-number{font-size:clamp(1.2rem,3vw,2rem);font-weight:800;overflow-wrap:anywhere}
.stat-label{font-size:.88rem;color:var(--muted)}
.btn{
  min-height:44px;padding:10px 16px;border-radius:11px;
  border:1px solid var(--border);font-weight:700
}
.primary{background:var(--accent);color:var(--accentText);border-color:var(--accent)}
.secondary{background:var(--surface2);color:var(--text)}
.danger{background:#842737;color:#fff;border-color:#842737}
.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.project-list{display:grid;gap:14px;margin-top:18px}
.project-card{display:grid;gap:12px}
.project-heading{display:flex;justify-content:space-between;gap:12px;align-items:start}
.project-heading h3{margin:0;overflow-wrap:anywhere}
.tag{font-size:.78rem;border:1px solid var(--border);border-radius:999px;padding:4px 9px}
.progress{
  width:100%;height:14px;background:var(--surface2);
  border:1px solid var(--border);border-radius:999px;overflow:hidden
}
.progress>div{height:100%;background:var(--itten-color-7);transition:width .25s}
[data-theme="dark"] .progress>div{background:#83c5e1}
.clock{
  font-size:clamp(2rem,9vw,4.8rem);font-weight:850;
  font-variant-numeric:tabular-nums;letter-spacing:-.05em;
  text-align:center;margin:18px 0
}
.clock-caption{text-align:center;color:var(--muted)}
.hero{text-align:center}
.hero .degree{font-size:clamp(2rem,7vw,3.5rem);font-weight:850;overflow-wrap:anywhere}
.boss-name{font-weight:800;color:var(--text)}
.boss-icon{font-size:2rem}
.gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.medal{text-align:center}
.medal .symbol{font-size:2.5rem}
.locked{opacity:.65}
.diploma{border:3px double var(--itten-color-2);padding:20px;text-align:center}
[data-theme="dark"] .diploma{border-color:#a8caff}
.diploma h3{font-family:Georgia,serif;font-size:1.4rem}
.history-item{border-bottom:1px solid var(--border);padding:12px 0}
.history-item:last-child{border:0}
.section-title{margin:26px 0 14px}
label{display:block;font-weight:650;margin:12px 0 5px}
input,select,textarea{
  width:100%;min-height:44px;padding:10px 12px;
  border:1px solid var(--border);border-radius:10px;
  background:var(--surface);color:var(--text)
}
textarea{min-height:90px;resize:vertical}
dialog{
  width:min(460px,calc(100vw - 28px));max-height:85dvh;
  overflow:auto;border:1px solid var(--border);border-radius:18px;
  background:var(--surface);color:var(--text);padding:22px;
  box-shadow:0 20px 70px #0005
}
dialog::backdrop{background:#0009}
.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}
#toast{
  position:fixed;bottom:20px;left:50%;transform:translateX(-50%);
  max-width:90vw;padding:12px 18px;border-radius:12px;
  background:var(--itten-color-10);color:#fff;
  z-index:100;box-shadow:var(--shadow)
}
#toast:empty{display:none}
footer{
  border-top:1px solid var(--border);padding:22px 16px;
  text-align:center;color:var(--muted);font-size:.88rem
}
.footer-links{display:flex;justify-content:center;flex-wrap:wrap;gap:16px;margin-top:8px}
.splash{
  position:fixed;inset:0;z-index:200;
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  background:#fff;color:#151f41;text-align:center;
  padding:20px
}
.splash h1{font-size:clamp(2.5rem,10vw,4rem);margin:22px 0 4px}
.splash p{font-size:1rem;letter-spacing:.07em}
.splash-gear{
  width:150px;
  height:150px;
  object-fit:contain;
  animation:gear 4s linear infinite
}
.splash.hide{visibility:hidden;opacity:0;transition:opacity .15s,visibility .15s}
@keyframes gear{to{transform:rotate(360deg)}}

/* ==========================================
   KHRONOS — SPLASH MOBILE
   Rotação acelerada exclusivamente no celular.
   Desktop preservado integralmente.
   ========================================== */
@media(max-width:699px){
  .splash{
    background:#ffffff;
    color:#151f41
  }
  .splash-gear{
    width:150px;
    height:150px;
    object-fit:contain;
    transform-origin:center center;
  animation:gear 0.1s linear infinite;
    will-change:transform
  }
}

@media(min-width:700px){
  .stats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .project-list{grid-template-columns:repeat(2,minmax(0,1fr))}
  .gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
  main{padding:34px 24px 60px}
}
@media(min-width:1000px){.gallery{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms!important;
    transition-duration:.01ms!important;
    scroll-behavior:auto!important
  }
}
@media print{
  .topbar,.menu,footer,.actions,.splash,dialog,#toast{display:none!important}
  body,main{background:#fff!important;color:#000!important}
  main{width:100%;padding:0}
  .card{box-shadow:none;break-inside:avoid;border:1px solid #888}
  .project-list,.gallery{display:block}
  .project-card,.medal{margin-bottom:12px}
}
