/* -------- basic reset and background -------- */

/* include padding + border in element size math */
* { box-sizing: border-box; }

/* full-height page, no default margins, neutral system font */
html, body {
  height: 100%;
  margin: 0;
  font-family: system-ui, arial, sans-serif;
}

/* frutiger-aero vibe: soft white gradient over a nature photo */
body {
  /* top gloss gradient + background image */
  background:
    linear-gradient(#ffffffcc, #ffffff00 30%),
    url("images/field_adobe-stock.jpeg") center / cover fixed no-repeat;

  overflow: hidden;   /* hide scroll-bars so popups feel floating */
  position: relative; /* anchor for absolutely positioned children */
}

/* -------- floating 吉 cloud -------- */

/* center the svg in the viewport and ignore pointer events */
.kichi {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

/* big white glyph with white outline for cloudlike feel */
.kichi text {
  fill: white;
  stroke: white;
  stroke-width: 10;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.25)); /* adds a soft shadow so it's visible */
}

/* gentle float animation */
@keyframes floaty {
  0% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
  100% { transform: translateY(0); }
}

/* size the svg responsively and animate it */
.kichi svg {
  width: min(50vmin, 520px);
  animation: floaty 6s ease-in-out infinite;
}

/* -------- modal box -------- */

/* translucent overlay that centers the inner box */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px);
}

/* classic window card */
.box {
  width: min(480px, 92vw);
  background: #e9e9e9;
  border: 2px solid #9a9a9a;
  box-shadow: 0 12px 36px rgba(0,0,0,.25);
}

/* blue title bar */
.title {
  background: #0060df;
  color: #fff;
  padding: .6rem .8rem;
  font-weight: 600;
}

/* form content layout */
.content {
  padding: 1rem;
  display: grid;
  gap: .75rem;
}

/* inputs and buttons share basic look */
input, button {
  font: inherit;
  padding: .6rem .7rem;
  border: 2px solid #b1b1b1;
  background: #fff;
}

/* button hover/active feel */
button {
  background: #f7f7f7;
  cursor: pointer;
}
button:hover { filter: brightness(1.05); }
button:active { transform: translateY(1px); }

/* -------- popup windows -------- */

/* fortune window style */
.popup {
  position: fixed;
  width: min(380px, 88vw);
  background: #e9e9e9;
  border: 2px solid #9a9a9a;
  box-shadow: 0 16px 32px rgba(0,0,0,.25);
  animation: pop .18s ease-out both;
}

/* small pop-in animation */
@keyframes pop {
  from { opacity: 0; transform: scale(.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* top bar with close button */
.bar {
  background: #0060df;
  color: #fff;
  padding: .45rem .6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* tiny x button */
.x {
  background: #fff;
  border: 1px solid #003b8f;
  padding: 0 .4rem;
  line-height: 1.1;
  cursor: pointer;
}

/* main fortune text */
.msg {
  padding: .9rem .85rem .5rem;
}

/* ok buttons row */
.actions {
  display: flex;
  gap: .6rem;
  padding: 0 .85rem .9rem;
}

/* ok button look */
.btn {
  padding: .4rem .75rem;
  border: 2px solid #b1b1b1;
  background: #f7f7f7;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }

/* -------- footer tag -------- */

/* subtle caption in the corner */
.tag {
  position: fixed;
  left: 10px;
  bottom: 8px;
  font-size: 12px;
  opacity: .6;
}

.popup{
  position: fixed; /* required for pixel placement + clamping */
  max-width: min(460px, 92vw);
  max-height: 84vh;
  overflow: auto; /* if content is taller than viewport */
}
.popup img{
  display: block;
  max-width: 100%;
  height: auto;
}