@font-face {
  font-family: Inter;
  src: url("./inter.woff2");
  font-weight: 400;
  font-display: swap;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: white; }
main { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; }
.water-title {
  margin: 0;
  display: grid;
  place-items: center;
  width: 84%;
  height: 68%;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.water-title img {
  display: block; width: min(55vw, 49vh, 460px); height: auto;
  pointer-events: none;
}
.water-title canvas {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: calc(100% + clamp(90px, 16vw, 210px));
  height: calc(100% + clamp(86px, 16vh, 170px));
  pointer-events: none; opacity: 0;
}
.water-title.moving img { opacity: 0; }
.water-title.moving canvas { opacity: 1; }
@media (prefers-reduced-motion: no-preference) {
  .water-title.ready { touch-action: pinch-zoom; }
}
.project {
  position: absolute; z-index: 1;
  top: calc(env(safe-area-inset-top, 0px) + clamp(20px, 3vw, 40px));
  right: calc(env(safe-area-inset-right, 0px) + clamp(20px, 4vw, 58px));
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  padding: 9px 14px; border: 1px solid #0c0407;
  color: #fff; background: #0c0407; text-decoration: none;
  font: 400 12px/16px Inter, Arial, sans-serif;
}
.project:hover { background: #292326; }
.project:focus-visible { outline: 2px solid #0c0407; outline-offset: 4px; }

#login-dialog {
  width: min(620px, calc(100% - 32px)); max-height: 92dvh;
  padding: 0; border: 1px solid #dedcda; color: #0c0407; background: white;
  box-shadow: 0 6px 24px rgb(12 4 7 / 7%);
  overflow: hidden; font: 14px/1.5 Inter, Arial, sans-serif;
}
#login-title:focus { outline: none; }
#login-dialog::backdrop { background: transparent; }
.login-content { max-height: 92dvh; overflow: auto; overscroll-behavior: contain; padding: 48px; }
#login-dialog button { cursor: pointer; font: inherit; }
.close-login {
  position: absolute; right: 15px; top: 15px; display: grid; place-items: center;
  width: 38px; height: 38px; padding: 0; border-radius: 50%;
  background: white; color: black; border: 1px solid black;
  -webkit-tap-highlight-color: transparent;
}
.close-login:focus-visible { outline: none; background: #0c0407; color: white; }
.login-label { font-size: 11px; font-weight: 600; letter-spacing: .5px; }
#login-title { font-size: 34px; line-height: 1.2; letter-spacing: -1.5px; font-weight: 500; margin: 25px 0 0; }
#login-description { font-size: 13px; line-height: 1.7; color: #666; margin: 18px 0 25px; }
#login-dialog label { display: block; margin-bottom: 20px; font-size: 12px; }
#login-dialog input {
  display: block; width: 100%; margin-top: 6px; padding: 12px;
  border: 1px solid #ddd; border-radius: 0; background: white; color: inherit; font: inherit;
}
.login-actions { display: flex; justify-content: flex-end; }
.login-actions button {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px;
  background: #0c0407; color: white; border: 1px solid #0c0407; border-radius: 0;
}
.login-actions button:hover { background: #333; }
.login-note { text-align: right; margin: 18px 0 0; color: #666; font-size: 12px; }
@media (max-width: 650px) {
  .login-content { padding: 40px 24px 28px; }
  #login-title { font-size: 28px; }
  #login-dialog input { font-size: 16px; }
}
