/* helloosy.com — Pretendard only, black & white only */
:root {
  color-scheme: light dark;
  --font: "Pretendard Variable", Pretendard, sans-serif;
  --bg: #ffffff;
  --fg: #000000;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #000000; --fg: #ffffff; }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
a, button { -webkit-tap-highlight-color: transparent; }
body {
  min-height: 100svh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font-family: var(--font); }
a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0; }

.bar { background: var(--fg); color: var(--bg); }
.bar-in { max-width: 1200px; margin: 0 auto; padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left)); height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.bar a { font-weight: 700; font-size: 18px; letter-spacing: -0.01em; }
.lang { display: flex; border: 1px solid var(--bg); }
.lang button {
  height: 30px; padding: 0 12px; cursor: pointer; border: 0;
  background: transparent; color: var(--bg); font-size: 13px; font-weight: 600;
}
.lang button + button { border-left: 1px solid var(--bg); }
.lang button[aria-pressed="true"] { background: var(--bg); color: var(--fg); }
.lang button:focus-visible { outline: 2px solid var(--bg); outline-offset: 2px; }

.page {
  max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 32px; align-items: stretch;
}
/* Desktop: the photo fills exactly the height of the right column (top and bottom line up). */
.photo {
  display: block; width: 100%; height: 100%; min-height: 0; object-fit: cover; object-position: 56% 50%;
  border: 1px solid var(--fg);
}

.side { display: flex; flex-direction: column; gap: 28px; }
h1 { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }

.groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: start; }
.group { display: flex; flex-direction: column; gap: 8px; }
.group h2 {
  padding-bottom: 8px; margin-bottom: 4px; border-bottom: 2px solid var(--fg); text-align: center;
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
}
.tile {
  display: flex; align-items: center; justify-content: center; text-align: center;
  white-space: pre-line; line-height: 1.3; min-height: 84px; padding: 14px 16px;
  border: 1px solid var(--fg);
  font-size: 17px; font-weight: 700; letter-spacing: -0.01em;
  transition: background .15s, color .15s;
}
.tile:focus-visible, .tile:active { background: var(--fg); color: var(--bg); outline: none; }
@media (hover: hover) { .tile:hover { background: var(--fg); color: var(--bg); } }

.music { border: 1px solid var(--fg); padding: 12px; }
.spotify { min-height: 152px; }
.spotify iframe { display: block; border: 0; border-radius: 12px; }
.music-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 13px; }
#shuffle {
  margin-left: auto; width: 34px; height: 34px; cursor: pointer;
  background: var(--bg); color: var(--fg); border: 1px solid var(--fg); font-size: 16px;
}
#shuffle:focus-visible, #shuffle:active { background: var(--fg); color: var(--bg); outline: none; }
@media (hover: hover) { #shuffle:hover { background: var(--fg); color: var(--bg); } }

@media (max-width: 900px) {
  .page { grid-template-columns: 1fr; gap: 20px; padding: 16px 16px 32px; }
  /* Tablet/phone: full width like the tiles, wide crop */
  .photo { height: auto; aspect-ratio: 16 / 9; }
  h1 { font-size: 26px; }
}
@media (max-width: 520px) {
  .bar-in { height: 52px; padding: 0 16px; }
  .bar a { font-size: 17px; }
  .page { gap: 16px; padding: 12px 12px calc(24px + env(safe-area-inset-bottom)); }
  .photo { aspect-ratio: 4 / 3; }
  .side { gap: 16px; }
  /* all four groups side by side, compact */
  .groups { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
  .group { gap: 6px; }
  .group h2 { font-size: 12.5px; padding-bottom: 6px; margin-bottom: 2px; letter-spacing: -0.02em; white-space: nowrap; }
  .tile {
    min-height: 56px; padding: 6px 4px; font-size: 13px; line-height: 1.25;
    letter-spacing: -0.02em; word-break: keep-all; overflow-wrap: anywhere;
  }
  .music { padding: 8px; }
  .music-bar { margin-top: 8px; }
}
