@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&display=swap');

* {
  font-family: 'Caveat', cursive;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body, html, .font-mono-ticket {
  font-family: 'Caveat', cursive;
}

:root { 
  --ink: #1b1b1b; 
}

.nav-text-lg {
  font-size: 1.25rem; 
  line-height: 1.4rem;
}

.nav-logo { 
  display: block; 
  height: 28px; 
  width: auto; 
}

.hero-logo { 
  display: block; 
  width: 700px; 
  max-width: 90%; 
  height: auto; 
  margin: 0 auto; 
}

button, input, textarea, select, a {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

button:focus, input:focus, textarea:focus, select:focus, a:focus {
  outline: none;
  box-shadow: none;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  -webkit-box-shadow: none;
  box-shadow: none;
  transition: none;
}

.back-btn-plain {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
  outline: none;
  box-shadow: none;
  user-select: none;
}

.draw-filter {
  --ar: 2.2;
  flex: none;
  width: 112px;
  aspect-ratio: var(--ar);
  padding: 0 4%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: var(--art) center / 100% 100% no-repeat;
  color: var(--ink);
  font: 700 15px/1 'Caveat', cursive;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.draw-filter:hover {
  transform: translateY(-1px);
}

.draw-filter:active {
  transform: scale(0.98);
}

.f-all    { --art: url(assets/ui/filter-AllTickets-0d3b66.png);      --ar: 195 / 95; }
.f-urgent { --art: url(assets/ui/filter-Urgent-c21047.png);          --ar: 194 / 87; }
.f-voted  { --art: url(assets/ui/filter-MostVoted-d9fb90.png);       --ar: 197 / 95; }
.f-edu    { --art: url(assets/ui/filter-Education-aacc96.png);       --ar: 195 / 87; }
.f-soft   { --art: url(assets/ui/filter-Software-ab92bf.png);        --ar: 196 / 95; }
.f-tech   { --art: url(assets/ui/filter-Technology-ff7bac.png);      --ar: 194 / 87; }
.f-trans  { --art: url(assets/ui/filter-Transportation-efce7b.png);  --ar: 196 / 95; font-size: 13px; }
.f-comm   { --art: url(assets/ui/filter-Community-ef6f3c.png);       --ar: 195 / 87; }
.f-other  { --art: url(assets/ui/filter-Other-52a5ce.png);           --ar: 195 / 95; }
.f-solved { --art: url(assets/ui/filter-SolvedTickets-008471.png);   --ar: 195 / 87; font-size: 14px; }

.f-urgent { animation: urgentPulse 1.8s ease-in-out infinite; }

@keyframes urgentPulse {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.16) saturate(1.1); }
}

.draw-newticket {
  width: 128px;
  aspect-ratio: 222 / 103;
  border: 0;
  background: url(assets/ui/new-ticket-button.png) center / 100% 100% no-repeat;
  color: var(--ink);
  font: 700 17px/1 'Caveat', cursive;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.1s ease;
}

.draw-newticket:hover {
  transform: translateY(-1px);
}

.draw-newticket:active {
  transform: scale(0.98);
}

.draw-search {
  position: relative;
  max-width: 36rem;
  margin: 0 auto;
  aspect-ratio: 1147 / 124;
  background: url(assets/ui/search-bar-bg.png) center / 100% 100% no-repeat;
}

.draw-search-input {
  position: absolute;
  left: 9%;
  right: 4%;
  top: 12%;
  bottom: 12%;
  width: auto;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--ink);
  caret-color: #000000;
  font: 700 22px 'Caveat', cursive;
}

.draw-search-input::placeholder { color: #767676; }

.tk {
  --bg: url(assets/ui/Other-52a5ce.png);
  --bg-urgent: url(assets/ui/Other-52a5ce-urgent.png);
  position: relative;
  width: 100%;
  min-width: 0;
  aspect-ratio: 1256 / 557;
  container-type: inline-size;
  background-color: transparent;
  background-image: var(--bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  color: var(--ink);
  font-family: 'Caveat', cursive;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.35));
}

.ticket-education      { --bg: url(assets/ui/Education-aacc96.png);      --bg-urgent: url(assets/ui/Education-aacc96-urgent.png); }
.ticket-software       { --bg: url(assets/ui/Software-ab92bf.png);       --bg-urgent: url(assets/ui/Software-ab92bf-urgent.png); }
.ticket-technology     { --bg: url(assets/ui/Technology-ff7bac.png);     --bg-urgent: url(assets/ui/Technology-ff7bac-urgent.png); }
.ticket-transportation { --bg: url(assets/ui/Transportation-efce7b.png); --bg-urgent: url(assets/ui/Transportation-efce7b-urgent.png); }
.ticket-community      { --bg: url(assets/ui/Community-ef6f3c.png);      --bg-urgent: url(assets/ui/Community-ef6f3c-urgent.png); }
.ticket-other          { --bg: url(assets/ui/Other-52a5ce.png);          --bg-urgent: url(assets/ui/Other-52a5ce-urgent.png); }

.tk.tk--urgent { background-image: var(--bg-urgent); }
.tk.tk--solved { background-image: url(assets/ui/SolvedTickets-008471.png); }

.tk-hit {
  position: absolute;
  left: 0;
  top: 0;
  width: 72%;
  height: 100%;
  cursor: pointer;
  border-radius: 12px;
}

.tk-title, .tk-desc, .tk-cat, .tk-status, .tk-id { 
  position: absolute; 
  margin: 0; 
  pointer-events: none; 
}

.tk-title {
  left: 9.2%;
  width: 61.5%;
  bottom: 82.6%;
  font-size: clamp(18px, 4.2cqw, 26px);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tk--urgent .tk-title { left: 13.6%; width: 57.1%; }

.tk-desc {
  left: 9.2%;
  top: 23.5%;
  width: 61%;
  font-size: clamp(15px, 3.4cqw, 20px);
  line-height: 1.25;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  overflow-wrap: anywhere;
}

.tk-cat, .tk-status, .tk-issuer, .tk-id {
  font-size: clamp(13px, 2.8cqw, 17px);
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.tk-cat    { left: 9.5%;  bottom: 32.3%; max-width: 32%; overflow: hidden; text-overflow: ellipsis; }
.tk-status { left: 43.8%; bottom: 31.3%; width: 27%; overflow: hidden; text-overflow: ellipsis; }

.tk-issuer {
  position: absolute;
  left: 9.9%;
  bottom: 14%;
  max-width: 60%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

.tk-id {
  left: 74.4%;
  width: 11.5%;
  bottom: 81.2%;
  text-align: center;
}

.tk-watermark {
  position: absolute;
  left: 9%;
  top: 27%;
  width: 61%;
  text-align: center;
  font-size: 8.5cqw;
  font-weight: 900;
  letter-spacing: 0.14em;
  color: rgba(0, 0, 0, 0.14);
  transform: rotate(-12deg);
  pointer-events: none;
  user-select: none;
}

.tk-stub {
  position: absolute;
  left: 74%;
  width: 22.2%;
  top: 23%;
  bottom: 6%;
  display: flex;
  flex-direction: column;
  gap: 1.6cqw;
}

.tk-barcode { align-self: center; width: 80%; height: 6cqw; margin: 0; opacity: 0.85; }
.tk-btns { display: flex; flex-direction: column; gap: 1.6cqw; }

.tk-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1cqw;
  width: 100%;
  aspect-ratio: 252 / 71;
  padding: 0 6%;
  border: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  background-image: url(assets/ui/reserve.png);
  color: var(--ink);
  font: 700 clamp(12px, 2.6cqw, 16px) / 1 'Caveat', cursive;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
}

.tk-btn--inspect { background-image: url(assets/ui/inspect.png); }
.tk-btn--red     { background-image: url(assets/ui/delete.png); color: #ffffff; }
.tk-btn--static  { cursor: default; }
.tk-btn.is-on    { filter: brightness(0.9) sepia(0.25); }
.tk-btn-count    { font-weight: 700; }

.dm-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: 100%;
}

.dm {
  --dm-w: min(560px, 92vw);
  position: relative;
  width: var(--dm-w);
  aspect-ratio: var(--dm-ar);
  container-type: inline-size;
  background: var(--dm-art) center / 100% 100% no-repeat;
  color: var(--ink);
  font-family: 'Caveat', cursive;
  filter: drop-shadow(0 22px 28px rgba(0, 0, 0, 0.55));
}

.dm--auth    { --dm-art: url(assets/ui/create-account-sign-in.png); --dm-ar: 960 / 563; }
.dm--post    { --dm-art: url(assets/ui/modal-issue-ticket.png);     --dm-ar: 1265 / 1395; --dm-w: min(560px, 92vw, calc((100vh - 2rem) * 0.907)); }
.dm--reserve { --dm-art: url(assets/ui/modal-resolve-ticket.png);   --dm-ar: 960 / 562; }
.dm--notif   { --dm-art: url(assets/ui/modal-notifications.png);    --dm-ar: 961 / 562; }
.dm--proj    { --dm-art: url(assets/ui/modal-your-projects.png);    --dm-ar: 960 / 563; }

.dm-under {
  width: min(560px, 92vw);
  text-align: center;
  color: #d4d4d8;
  font-size: 18px;
}

.dm-title {
  position: absolute;
  left: 5%;
  top: 3.5%;
  width: 79%;
  height: 20%;
  margin: 0;
  display: flex;
  align-items: center;
  font-size: clamp(20px, 4.8cqw, 30px);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.dm-x {
  position: absolute;
  left: 86.2%;
  top: 8.6%;
  width: 8.8%;
  height: 14%;
  border: 0;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
}

.dm-label {
  position: absolute;
  left: 6.2%;
  height: 8%;
  display: flex;
  align-items: center;
  font-size: clamp(15px, 3cqw, 20px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dm-input {
  position: absolute;
  padding: 0 2.6cqw;
  border: 0;
  border-radius: 10px;
  outline: 0;
  background-color: transparent;
  color: var(--ink);
  caret-color: #000000;
  font-family: 'Caveat', cursive;
  font-size: clamp(18px, 3.6cqw, 22px);
  font-weight: 600;
}

.dm-input::placeholder { color: #808080; }
textarea.dm-input { resize: none; padding-top: 1.6cqw; padding-bottom: 1.6cqw; line-height: 1.25; }

.dm-btn {
  position: absolute;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: 700 clamp(15px, 3cqw, 20px) / 1 'Caveat', cursive;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.a-lab-user { top: 28.4%; }
.a-lab-pass { top: 55.4%; }
.a-user   { left: 6.3%; top: 37%; width: 87.4%; height: 13.6%; }
.a-pass   { left: 6.5%; top: 64%; width: 87.4%; height: 13.6%; }
.a-submit { left: 33.6%; top: 82.1%; width: 26.5%; height: 11.2%; }

.pm-title { left: 5%; top: 2.2%; width: 82%; height: 6%; }
.dm--post .pm-x {
  position: absolute;
  left: 80%;
  top: 3.2%;
  width: 15%;
  height: 10%;
  cursor: pointer;
}

.pm-lab {
  position: absolute;
  left: 5.5%;
  width: 87%;
  height: 4.4%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  font-size: clamp(14px, 2.8cqw, 18px);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.pm-lab span:last-child { font-weight: 600; opacity: 0.6; }

.pm-lab-title { top: 9%; }
.pm-lab-cat   { top: 25%; }
.pm-lab-img   { top: 41.2%; }
.pm-lab-desc  { top: 56.8%; }

.pm-title-in { left: 5.5%; top: 14.3%; width: 86%; height: 5.6%; }
.pm-select   { 
  left: 6.4%; top: 30.3%; width: 85.8%; height: 5.6%;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 9l7 7 7-7' stroke='%231b1b1b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 2.4cqw center; background-size: 2.6cqw; 
}
.pm-file     { left: 7%; top: 46.4%; width: 85%; height: 5.6%; font-size: clamp(15px, 2.8cqw, 18px); cursor: pointer; }
.pm-file::file-selector-button {
  margin-right: 8px; padding: 2px 8px; border: 1.5px solid var(--ink); border-radius: 6px;
  background: transparent; color: var(--ink); font: 700 15px 'Caveat', cursive; cursor: pointer;
}
.pm-desc     { left: 6.3%; top: 62.2%; width: 83.4%; height: 15.6%; }

.pm-check {
  position: absolute;
  left: 8.5%;
  top: 80.2%;
  width: 5.9%;
  height: 6.2%;
  margin: 0;
  border: 0;
  border-radius: 4px;
  background-color: transparent;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 72%;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.pm-check:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 13l4 4L19 7' stroke='%231b1b1b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
}

.pm-urgent {
  position: absolute;
  left: 16%;
  top: 81.5%;
  width: 75%;
  font-size: clamp(15px, 2.4cqw, 16px);
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}

.pm-submit {
  left: 34.2%;
  top: 89%;
  width: 31.6%;
  height: 6.8%;
}

.r-ticket {
  position: absolute;
  left: 7%;
  top: 30%;
  width: 100%;
  margin: 0;
  font-size: clamp(18px, 3.6cqw, 24px);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.r-sub {
  position: absolute;
  left: 6.2%;
  top: 37%;
  width: 87.4%;
  margin: 0;
  font-size: clamp(14px, 2.8cqw, 18px);
  font-weight: 600;
}

.r-lab {
  position: absolute;
  left: 6.2%;
  top: 48%;
  width: 87.4%;
  display: flex;
  justify-content: space-between;
  font-size: clamp(14px, 2.8cqw, 18px);
  font-weight: 700;
}

.r-text   { left: 6.3%; top: 60%; width: 87.4%; height: 26.2%; }
.r-cancel { left: 40%; top: 80%; width: 20.4%; height: 11.2%; }
.r-submit { left: 66.8%; top: 81%; width: 26.8%; height: 11.2%; font-size: clamp(12px, 2.4cqw, 15px); }

.dm-list {
  position: absolute;
  left: 6.2%;
  top: 24.8%;
  width: 87.6%;
  height: 62.4%;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.8cqw;
  padding-right: 1cqw;
}

.dm--notif .dm-list { top: 30%; left: 8.5%; height: 57%; }

.dm-empty {
  margin: auto 0;
  text-align: center;
  font-size: clamp(16px, 3cqw, 20px);
  font-weight: 600;
  opacity: 0.6;
}

.dm-sec {
  margin: 1cqw 0 0.2cqw;
  font-size: clamp(14px, 2.8cqw, 18px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dm-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.6cqw;
  width: 100%;
  min-height: 10cqw;
  padding: 1.5cqw 3cqw;
  flex: none;
  background: url('assets/ui/modal-notifications-which-1.png') center / 100% 100% no-repeat;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.dm-row-text {
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.dm-row-msg {
  margin: 0;
  font-size: clamp(15px, 3cqw, 20px);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1b1b1b;
}

.dm-row-meta {
  display: inline-block;
  font-size: clamp(12px, 2.2cqw, 15px);
  font-weight: 700;
  opacity: 0.65;
  color: #1b1b1b;
}

.dm-row-ok { color: #065f46; opacity: 1; }

.dm-row-btn {
  flex: none;
  height: 6.5cqw;
  padding: 0 2.8cqw;
  border: 0;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  font: 700 clamp(12px, 2.4cqw, 16px) / 1 'Caveat', cursive;
  text-transform: uppercase;
  cursor: pointer;
  padding-right: 3.5cqw
}

.dm-row-btn--white { background-image: none; color: var(--ink); }
.dm-row-btn--red   { background-image: none; color: #ffffff; }

.inspect-container {
  position: relative;
  width: 100%;
  max-width: 650px;
  aspect-ratio: 1260 / 1390;
  margin: 0 auto;
  background: url(assets/ui/ticket-card-bg.png) center / 100% 100% no-repeat;
  color: var(--ink);
  container-type: inline-size;
  filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.35));
}

.inspect-back-btn {
  position: absolute;
  top: 16.5%;
  left: 4%;
  width: 6%;
  height: 6%;
  background: transparent;
  border: none;
  cursor: pointer;
  z-index: 10;
}

.inspect-meta-info {
  position: absolute;
  top: 17.8%;
  left: 11%;
  right: 13%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.inspect-username {
  font-size: clamp(18px, 3.6cqw, 24px);
  font-weight: 700;
  color: #1b1b1b;
}

.inspect-ticket-id {
  font-size: clamp(16px, 3.2cqw, 20px);
  font-weight: 700;
  color: #1b1b1b;
  letter-spacing: 0.05em;
}

.inspect-title {
  position: absolute;
  top: 21.2%;
  left: 1%;
  right: 30%;
  margin: 0;
  text-align: center;
  font-size: clamp(24px, 5cqw, 34px);
  font-weight: 700;
  color: #1b1b1b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inspect-desc-sec {
  position: absolute;
  top: 26%;
  left: 10%;
  right: 10%;
  height: 13%;
  overflow-y: auto;
  font-size: clamp(17px, 3.4cqw, 22px);
  color: #1b1b1b;
  line-height: 1.3;
  padding-right: 4px;
}

.inspect-solutions-sec {
  position: absolute;
  top: 40%;
  left: 10%;
  right: 15%;
  height: 25%;
  display: flex;
  flex-direction: column;
}

.inspect-solutions-title {
  font-size: clamp(18px, 3.5cqw, 22px);
  font-weight: 700;
  color: #1b1b1b;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.inspect-solutions-list {
  flex: 1;
  overflow-y: auto;
  padding-right: 6px;
}

.inspect-approve-btn {
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  color: #065f46;
  background: transparent;
  border: none;
  cursor: pointer;
}

.inspect-form {
  position: absolute;
  bottom: 12%;
  left: 9%;
  width: 82%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.inspect-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  margin-bottom: 50px;
  margin-left: 1px;
}

.inspect-file-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: clamp(14px, 2.8cqw, 18px);
  font-weight: 700;
  color: #1b1b1b;
  cursor: pointer;
  background: none;
  padding: 2px 8px;
  border-radius: 6px;
  border: none;
}

.inspect-file-input {
  display: none;
}

.inspect-input-row {
  display: flex;
  align-items: center;
  height: 40px;
}

.inspect-input {
  flex: 1;
  height: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 0 12px;
  font-size: clamp(18px, 3.6cqw, 22px);
  font-weight: 600;
  color: #1b1b1b;
  margin-bottom: 72px;
}

.inspect-input::placeholder {
  color: #555555;
}

.inspect-send-btn {
  width: 22%;
  height: 100%;
  background: transparent;
  border: none;
  font-size: clamp(16px, 3cqw, 20px);
  font-weight: 700;
  color: #1b1b1b;
  cursor: pointer;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 63px;
  margin-right: 5px;
}

/* ===================== Themes + animations (miracasiraltunbay.com) ===================== */

/* ---- themes: html[data-theme] sets page colors; the hand-drawn art stays the same ---- */
:root {
  --page-bg: #11120d; --page-bg2: #1b1c15; --page-text: #ffffff; --nav-text: #cbd5e1; --muted: #94a3b8;
  --accent: 255, 200, 120; --dot1: rgba(255, 168, 76, .28); --dot2: rgba(170, 204, 150, .3); --dot3: rgba(82, 165, 206, .3);
  --logo-filter: none;
}
html[data-theme="ocean"]  { --page-bg: #0d1b2e; --page-bg2: #16305a; --nav-text: #c7d7f0; --muted: #8fa8cc; --accent: 110, 190, 255; --dot1: rgba(110, 190, 255, .3); --dot2: rgba(160, 220, 255, .25); --dot3: rgba(255, 200, 120, .25); }
html[data-theme="forest"] { --page-bg: #0e1f16; --page-bg2: #1a3a29; --nav-text: #cfe6d5; --muted: #8fb59c; --accent: 140, 230, 160; --dot1: rgba(140, 230, 160, .3); --dot2: rgba(240, 220, 130, .25); --dot3: rgba(170, 204, 150, .3); }
html[data-theme="grape"]  { --page-bg: #1a1030; --page-bg2: #321d58; --nav-text: #ddd0f5; --muted: #a998c9; --accent: 200, 150, 255; --dot1: rgba(200, 150, 255, .3); --dot2: rgba(255, 123, 172, .28); --dot3: rgba(110, 190, 255, .25); }
html[data-theme="ember"]  { --page-bg: #240d10; --page-bg2: #44161b; --nav-text: #f3d2d0; --muted: #c99592; --accent: 255, 130, 90; --dot1: rgba(255, 130, 90, .32); --dot2: rgba(255, 200, 120, .28); --dot3: rgba(255, 123, 172, .25); }
html[data-theme="paper"]  { --page-bg: #f4ecd8; --page-bg2: #fbf6ea; --page-text: #1b1b1b; --nav-text: #3a3328; --muted: #6b604c; --accent: 230, 130, 40; --dot1: rgba(200, 120, 40, .35); --dot2: rgba(90, 140, 90, .3); --dot3: rgba(60, 120, 180, .3); --logo-filter: invert(1) hue-rotate(180deg); }
html[data-theme="cloud"]  { --page-bg: #e6eef8; --page-bg2: #f7faff; --page-text: #1b1b1b; --nav-text: #2a3a52; --muted: #5a6b84; --accent: 60, 130, 230; --dot1: rgba(60, 130, 230, .3); --dot2: rgba(255, 123, 172, .3); --dot3: rgba(90, 170, 120, .3); --logo-filter: invert(1) hue-rotate(180deg); }
html[data-theme="peach"]  { --page-bg: #fbdccb; --page-bg2: #fff1e8; --page-text: #1b1b1b; --nav-text: #5a2e22; --muted: #8a5a4a; --accent: 240, 100, 90; --dot1: rgba(240, 100, 90, .32); --dot2: rgba(171, 146, 191, .35); --dot3: rgba(255, 170, 60, .35); --logo-filter: invert(1) hue-rotate(180deg); }

html { background-color: var(--page-bg); }
body {
  background: radial-gradient(ellipse 90% 60% at 50% 0%, var(--page-bg2), var(--page-bg) 75%) fixed !important;
  color: var(--page-text) !important;
}
#navAuthArea button { color: var(--nav-text) !important; }
.si-hero > p, #ticketGrid .text-slate-400, #ticketPageContainer .text-slate-400 { color: var(--muted) !important; }
#ticketPageContainer .text-white, .back-btn-plain { color: var(--page-text) !important; }
.nav-logo, .hero-logo { filter: var(--logo-filter); }

/* theme picker (button bottom-right) */
.si-theme-btn {
  position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 54px; height: 54px; border-radius: 52% 48% 50% 46%;
  border: 2.5px solid #1b1b1b; background: #fffdf6; cursor: pointer; padding: 0;
  box-shadow: 3px 4px 0 #1b1b1b; transition: transform .25s cubic-bezier(.2, 1.6, .4, 1);
  display: grid; place-items: center;
}
.si-theme-btn svg { width: 30px; height: 30px; }
.si-theme-btn:hover { transform: rotate(-14deg) scale(1.12); }
.si-theme-btn:active { transform: scale(.9); }
.si-theme-panel {
  position: fixed; right: 18px; bottom: 84px; z-index: 40; width: 250px; padding: 14px 14px 12px;
  background: #fffdf6; color: #1b1b1b; border: 2.5px solid #1b1b1b; border-radius: 18px 22px 16px 24px;
  box-shadow: 4px 5px 0 #1b1b1b; transform-origin: bottom right;
  animation: siPanel .35s cubic-bezier(.2, 1.4, .4, 1) both;
}
@keyframes siPanel { from { opacity: 0; transform: scale(.6) rotate(6deg); } }
.si-theme-panel[hidden] { display: none; }
.si-theme-panel h4 { margin: 0 0 10px; font: 700 24px/1 'Caveat', cursive; }
.si-theme-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 6px; }
.si-sw { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; cursor: pointer; font: 700 15px/1 'Caveat', cursive; color: #1b1b1b; padding: 0; }
.si-sw i {
  display: block; width: 42px; height: 42px; border-radius: 50% 44% 52% 46%; border: 2.5px solid #1b1b1b;
  background: linear-gradient(135deg, var(--a) 52%, var(--b) 52%); transition: transform .25s cubic-bezier(.2, 1.6, .4, 1);
}
.si-sw:hover i { transform: scale(1.15) rotate(14deg); }
.si-sw.is-on i { box-shadow: 0 0 0 3px #fffdf6, 0 0 0 5.5px #1b1b1b; }
.si-theme-panel .si-sw { animation: siDrop .4s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.si-theme-panel .si-sw:nth-child(2) { animation-delay: .03s; } .si-theme-panel .si-sw:nth-child(3) { animation-delay: .06s; }
.si-theme-panel .si-sw:nth-child(4) { animation-delay: .09s; } .si-theme-panel .si-sw:nth-child(5) { animation-delay: .12s; }
.si-theme-panel .si-sw:nth-child(6) { animation-delay: .15s; } .si-theme-panel .si-sw:nth-child(7) { animation-delay: .18s; }
.si-theme-panel .si-sw:nth-child(8) { animation-delay: .21s; }
html.si-theme-anim, html.si-theme-anim body, html.si-theme-anim .nav-logo, html.si-theme-anim .hero-logo, html.si-theme-anim #navAuthArea button {
  transition: background .5s ease, color .5s ease, filter .5s ease !important;
}

/* ---- soft drifting doodle-dots ---- */
.si-bg { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.si-bg i { position: absolute; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--dot1); opacity: 0; animation: siDrift 18s linear infinite; }
.si-bg i:nth-child(1) { left: 8%;  animation-delay: 0s; }
.si-bg i:nth-child(2) { left: 22%; animation-delay: 4s;  width: 9px;  height: 9px;  border-color: var(--dot2); }
.si-bg i:nth-child(3) { left: 47%; animation-delay: 9s;  width: 18px; height: 18px; }
.si-bg i:nth-child(4) { left: 68%; animation-delay: 2s;  border-color: var(--dot3); }
.si-bg i:nth-child(5) { left: 84%; animation-delay: 12s; width: 10px; height: 10px; border-color: var(--dot2); }
.si-bg i:nth-child(6) { left: 93%; animation-delay: 7s;  width: 16px; height: 16px; border-color: var(--dot3); }
@keyframes siDrift { 0% { transform: translate(0, 105vh) rotate(0); opacity: 0; } 10%, 90% { opacity: 1; } 100% { transform: translate(40px, -10vh) rotate(360deg); opacity: 0; } }

/* ---- page entrance: only until body.si-ready, so hover effects are free afterwards ---- */
body:not(.si-ready) nav { animation: siDown .6s cubic-bezier(.2, .8, .2, 1) backwards; }
body:not(.si-ready) .si-hero .hero-logo { animation: siPop .8s cubic-bezier(.2, 1.4, .4, 1) .1s backwards; }
body:not(.si-ready) .si-hero > p { animation: siUp .6s ease .35s backwards; }
body:not(.si-ready) .si-hero .draw-filter { animation: siDrop .5s cubic-bezier(.2, 1.3, .4, 1) backwards; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(1)  { animation-delay: .45s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(2)  { animation-delay: .50s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(3)  { animation-delay: .55s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(4)  { animation-delay: .60s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(5)  { animation-delay: .65s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(6)  { animation-delay: .70s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(7)  { animation-delay: .75s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(8)  { animation-delay: .80s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(9)  { animation-delay: .85s; }
body:not(.si-ready) .si-hero .draw-filter:nth-child(10) { animation-delay: .90s; }
body:not(.si-ready) .si-hero .draw-search { animation: siUp .6s ease .95s backwards; }
body:not(.si-ready) .draw-newticket { animation: siUp .5s ease 1.05s backwards; }
body:not(.si-ready) .si-theme-btn { animation: siUp .5s ease 1.2s backwards; }

@keyframes siDown { from { opacity: 0; transform: translateY(-16px); } }
@keyframes siUp   { from { opacity: 0; transform: translateY(18px); } }
@keyframes siPop  { from { opacity: 0; transform: scale(.85) rotate(-2deg); } }
@keyframes siDrop { from { opacity: 0; transform: translateY(-14px) rotate(-6deg); } }

/* idle life after entrance (separate translate/rotate props, so hover transforms still work) */
body.si-ready .hero-logo { animation: siFloat 5s ease-in-out infinite; }
@keyframes siFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
.f-urgent { animation: none; }
body.si-ready .f-urgent { animation: urgentPulse 1.8s ease-in-out infinite; }
body.si-ready .draw-newticket { animation: siNudge 4s ease-in-out 1s infinite; }
@keyframes siNudge { 0%, 86%, 100% { rotate: 0deg; } 90% { rotate: -5deg; } 94% { rotate: 4deg; } 97% { rotate: -2deg; } }

/* ---- hover: jelly wiggle on the drawn buttons ---- */
.draw-filter, .draw-newticket, .draw-search { transition: transform .25s cubic-bezier(.2, 1.5, .4, 1), filter .25s ease; }
body.si-ready .draw-filter:hover { animation: siJelly .55s ease both; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)) brightness(1.06); }
body.si-ready .draw-filter:nth-child(even):hover { animation-name: siJelly2; }
@keyframes siJelly {
  0%   { transform: none; }
  30%  { transform: translateY(-7px) rotate(-6deg) scale(1.14, .92); }
  55%  { transform: translateY(-4px) rotate(4deg) scale(.95, 1.1); }
  75%  { transform: translateY(-6px) rotate(-2deg) scale(1.05); }
  100% { transform: translateY(-5px) rotate(-2deg) scale(1.08); }
}
@keyframes siJelly2 {
  0%   { transform: none; }
  30%  { transform: translateY(-7px) rotate(6deg) scale(1.14, .92); }
  55%  { transform: translateY(-4px) rotate(-4deg) scale(.95, 1.1); }
  75%  { transform: translateY(-6px) rotate(2deg) scale(1.05); }
  100% { transform: translateY(-5px) rotate(2deg) scale(1.08); }
}
.draw-filter.is-active { transform: translateY(-2px) scale(1.07); filter: drop-shadow(0 0 9px rgba(var(--accent), .7)); }
body.si-ready .si-hero .draw-filter.si-click { animation: siClick .45s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes siClick { 0% { transform: scale(.88); } 50% { transform: scale(1.16) rotate(-4deg); } 100% { transform: translateY(-2px) scale(1.07); } }

.draw-newticket:hover { transform: translateY(-5px) scale(1.12); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); }
body.si-ready .draw-newticket:hover { animation: siJelly .55s ease both; }
.draw-newticket:active { transform: scale(.93); }
.draw-search:hover { transform: rotate(-.7deg) scale(1.015); }
.draw-search:focus-within { transform: scale(1.03); filter: drop-shadow(0 0 12px rgba(var(--accent), .5)); }
.hero-logo { transition: transform .35s cubic-bezier(.2, 1.5, .4, 1); }
.hero-logo:hover { transform: scale(1.05) rotate(-1.5deg); }
.nav-logo { transition: transform .25s cubic-bezier(.2, 1.6, .4, 1); }
.nav-logo:hover { transform: rotate(-5deg) scale(1.1); }
#navAuthArea button { transition: transform .2s cubic-bezier(.2, 1.6, .4, 1); }
#navAuthArea button:hover { transform: translateY(-3px) rotate(-3deg); text-decoration: underline wavy rgba(var(--accent), .9); text-underline-offset: 6px; }

/* ---- tickets: printed out one by one; 3D tilt follows the mouse (app.js) ---- */
#ticketGrid .tk { animation: siPrint .55s cubic-bezier(.2, 1.1, .3, 1) backwards; animation-delay: calc(var(--i, 0) * 70ms); transition: transform .45s cubic-bezier(.2, 1.3, .4, 1), filter .3s ease; }
#ticketGrid.no-enter .tk { animation: none; }
#ticketGrid .tk.is-tilting { transition: transform .1s linear, filter .3s ease; filter: drop-shadow(0 20px 22px rgba(0, 0, 0, .45)); }
@keyframes siPrint { from { opacity: 0; transform: translateY(-26px) scaleY(.92); clip-path: inset(0 0 100% 0); } 60% { opacity: 1; clip-path: inset(0 0 0 0); } }
#ticketGrid .tk.tk--urgent { animation: siPrint .55s cubic-bezier(.2, 1.1, .3, 1) calc(var(--i, 0) * 70ms) backwards, siShake 6s ease-in-out 2s infinite; }
#ticketGrid.no-enter .tk.tk--urgent { animation: siShake 6s ease-in-out 2s infinite; }
@keyframes siShake { 0%, 94%, 100% { rotate: 0deg; } 95% { rotate: -.8deg; } 97% { rotate: .8deg; } 99% { rotate: -.4deg; } }
.tk-watermark { animation: siStamp .5s cubic-bezier(.2, 1.6, .4, 1) .35s backwards; }
@keyframes siStamp { from { opacity: 0; transform: rotate(-12deg) scale(2.2); } }
.tk-btn { transition: transform .18s cubic-bezier(.2, 1.6, .4, 1); }
.tk-btn:hover { transform: scale(1.08) rotate(-2deg); }
.tk-btn:active { transform: scale(.93); }
.tk-btn.just-voted .tk-btn-count { display: inline-block; animation: siBump .45s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes siBump { 40% { transform: scale(1.8) rotate(-10deg); } }

/* ---- modals ---- */
#authModal:not(.hidden), #postModal:not(.hidden), #reservePlanModal:not(.hidden),
#notificationsModal:not(.hidden), #yourProjectsModal:not(.hidden) { animation: siFade .2s ease both; }
#authModal:not(.hidden) .dm, #postModal:not(.hidden) .dm, #reservePlanModal:not(.hidden) .dm,
#notificationsModal:not(.hidden) .dm, #yourProjectsModal:not(.hidden) .dm { animation: siPaper .45s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes siFade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes siPaper { from { opacity: 0; transform: translateY(30px) rotate(-3deg) scale(.94); } to { opacity: 1; transform: none; } }
.dm-row { animation: siUp .35s ease backwards; transition: transform .2s ease; }
.dm-row:hover { transform: translateX(4px) rotate(-.4deg); }
.dm-row:nth-child(2) { animation-delay: .05s; } .dm-row:nth-child(3) { animation-delay: .1s; }
.dm-row:nth-child(4) { animation-delay: .15s; } .dm-row:nth-child(n+5) { animation-delay: .2s; }
.dm-btn, .dm-row-btn, .dm-x { transition: transform .18s cubic-bezier(.2, 1.6, .4, 1); }
.dm-btn:hover, .dm-row-btn:hover { transform: scale(1.07) rotate(-1.5deg); }
.dm-x:hover { transform: rotate(90deg) scale(1.1); }
#authErrorMsg:not(.hidden) { animation: siNo .4s ease; }
@keyframes siNo { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* ---- ticket page ---- */
#ticketPageView:not(.hidden) .inspect-container { animation: siPaper .5s cubic-bezier(.2, 1.2, .4, 1) both; }
.inspect-solutions-list > div { animation: siUp .4s ease backwards; }
.inspect-send-btn, .inspect-approve-btn, .inspect-file-label, .inspect-back-btn { transition: transform .18s cubic-bezier(.2, 1.6, .4, 1); }
.inspect-send-btn:hover, .inspect-approve-btn:hover, .inspect-file-label:hover { transform: scale(1.1) rotate(-3deg); }
.inspect-back-btn:hover { transform: translateX(-4px); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .si-bg { display: none; }
}

/* ---- shared (server) version: toast, loading, small labels ---- */
.si-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 60; max-width: min(90vw, 460px); padding: 10px 18px;
  background: #fffdf6; color: #1b1b1b; border: 2.5px solid #1b1b1b; border-radius: 14px 18px 12px 16px; box-shadow: 3px 4px 0 #1b1b1b;
  font: 700 20px/1.2 'Caveat', cursive; text-align: center; pointer-events: none;
  opacity: 0; transform: translate(-50%, 30px) rotate(-2deg); transition: opacity .25s ease, transform .35s cubic-bezier(.2, 1.5, .4, 1);
}
.si-toast.is-on { opacity: 1; transform: translate(-50%, 0) rotate(-1deg); }
.si-toast.is-bad { background: #ffe1dc; }
.si-loading { animation: siBlink 1.2s ease-in-out infinite; }
@keyframes siBlink { 50% { opacity: .35; } }
.si-me { color: rgba(var(--accent), 1); font-weight: 700; }
.si-time { font-size: .7em; font-weight: 600; opacity: .55; margin-left: 4px; }
.si-new { color: #e11d48; }
.si-plan { margin-top: 6px; padding: 4px 8px; border-left: 3px solid #1b1b1b; background: rgba(0, 0, 0, .05); font-size: .9em; }
#ticketPageView:not(.hidden) .inspect-container.no-enter { animation: none; }
#ticketPageView .no-enter .inspect-solutions-list > div { animation: none; }
button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 640px) { .si-me { display: none; } }
