:root {
  --red: #e60000;
  --red-dark: #9f0000;
  --yellow: #ffd700;
  --white: #fff;
  --ink: #080808;
  --panel: #111;
  --line: rgba(255, 255, 255, 0.14);
  --font-display: "Bebas Neue", Impact, sans-serif;
  --font-en: "Oswald", sans-serif;
  --font-jp: "Noto Sans JP", sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--ink);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background:
    radial-gradient(circle at 80% 12%, rgba(230, 0, 0, 0.13), transparent 28%),
    var(--ink);
  font-family: var(--font-jp);
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
  text-decoration: none;
}

.award-noise {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.award-header {
  position: relative;
  z-index: 30;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 5vw, 76px);
  border-bottom: 3px solid var(--red);
  background: rgba(0, 0, 0, 0.94);
}

.award-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.award-brand em {
  color: var(--red);
  font-family: var(--font-jp);
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.award-brand__mark {
  display: flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: var(--red);
  clip-path: polygon(12% 0, 88% 0, 100% 12%, 100% 88%, 88% 100%, 12% 100%, 0 88%, 0 12%);
}

.award-brand__mark i {
  display: block;
  width: 3px;
  background: #fff;
}

.award-brand__mark i:nth-child(1) { height: 8px; }
.award-brand__mark i:nth-child(2) { height: 17px; }
.award-brand__mark i:nth-child(3) { height: 11px; }

.award-back {
  padding: 8px 14px;
  border: 1px solid rgba(230, 0, 0, 0.55);
  color: var(--red);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

main {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 76px) 88px;
}

.award-hero {
  position: relative;
  display: flex;
  min-height: 330px;
  align-items: center;
  justify-content: space-between;
  overflow: hidden;
  padding: 64px 0 48px;
}

.award-hero::after {
  content: "";
  position: absolute;
  right: 2%;
  bottom: 0;
  width: 42%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--red));
}

.award-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 16px;
  color: var(--red);
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.award-kicker span {
  width: 26px;
  height: 3px;
  background: var(--red);
}

.award-hero h1 {
  margin: 0;
  font-size: clamp(64px, 9vw, 132px);
  line-height: 0.82;
  letter-spacing: -0.035em;
}

.award-hero h1 em {
  color: var(--red);
  font-style: normal;
}

.award-hero__copy > p:last-child {
  max-width: 610px;
  margin: 30px 0 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 15px;
  line-height: 2;
}

.award-hero__index {
  color: rgba(230, 0, 0, 0.08);
  font-family: var(--font-display);
  font-size: clamp(70px, 11vw, 180px);
  line-height: 0.75;
  text-align: right;
  user-select: none;
}

.shared-notice {
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: var(--yellow);
  background: rgba(255, 215, 0, 0.06);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.shared-notice span {
  margin-right: 8px;
  color: var(--red);
}

.award-workspace {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1.3fr) minmax(360px, 0.7fr);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0d0d;
  box-shadow: 18px 18px 0 rgba(230, 0, 0, 0.09);
}

.award-preview {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: clamp(20px, 3vw, 42px);
  border-right: 1px solid var(--line);
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    #090909;
  background-size: 24px 24px;
}

.award-preview__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
  font-family: var(--font-en);
}

.award-preview__head div {
  display: flex;
  flex-direction: column;
}

.award-preview__head span,
.award-preview__head p {
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.award-preview__head strong {
  margin-top: 2px;
  color: var(--red);
  font-size: 16px;
  letter-spacing: 0.1em;
}

.award-preview__head p {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #49d881;
}

.award-preview__head p i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
  animation: pulse 1.6s infinite;
}

#award-canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #f5eddd;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.48);
}

.award-preview__note {
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.36);
  font-size: 11px;
  line-height: 1.7;
}

.award-form {
  min-width: 0;
  padding: clamp(24px, 3.2vw, 48px);
  background: var(--panel);
}

.award-form__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 30px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--red);
}

.award-form__heading p {
  margin: 0;
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.08em;
}

.award-form__heading span {
  color: rgba(255, 255, 255, 0.38);
  font-size: 10px;
}

.theme-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.theme-picker legend {
  width: 100%;
  margin-bottom: 9px;
  color: rgba(255, 255, 255, 0.5);
  font-family: var(--font-en);
  font-size: 10px;
  letter-spacing: 0.15em;
}

.theme-picker input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.theme-picker label span {
  display: flex;
  min-height: 54px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.48);
  font-family: var(--font-en);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-align: center;
}

.theme-picker input:checked + span {
  border-color: var(--red);
  color: #fff;
  background: rgba(230, 0, 0, 0.08);
}

.theme-picker input:focus-visible + span {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.theme-swatch {
  display: block;
  width: 28px;
  height: 6px;
  margin: 0 auto;
}

.theme-swatch--signal { background: #e60000; }
.theme-swatch--gold { background: #bc871d; }
.theme-swatch--midnight { background: #4e6cba; }

.field {
  display: block;
  margin-bottom: 22px;
}

.field__label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 700;
}

.field__label b {
  margin-right: 9px;
  color: var(--red);
  font-family: var(--font-en);
}

.field__label small {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.3);
  font-family: var(--font-en);
  font-weight: 500;
}

.field input,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 0;
  outline: none;
  color: #fff;
  background: #090909;
  caret-color: var(--red);
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(255, 255, 255, 0.24);
}

.field input:focus,
.field textarea:focus {
  border-color: var(--red);
  box-shadow: inset 3px 0 var(--red);
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.award-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
  margin-top: 12px;
}

.award-actions button,
.share-button {
  min-height: 48px;
  cursor: pointer;
  border: 0;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
}

.action-primary {
  grid-row: span 2;
  padding: 0 20px;
  color: #fff;
  background: var(--red);
}

.action-primary span {
  margin-left: 12px;
  color: var(--yellow);
}

.action-secondary {
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: #fff;
  background: transparent;
}

.action-reset {
  min-height: 32px !important;
  color: rgba(255, 255, 255, 0.36);
  background: transparent;
  font-size: 10px !important;
}

.award-actions button:hover,
.share-button:hover {
  filter: brightness(1.18);
}

.award-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px clamp(20px, 5vw, 76px);
  border-top: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.32);
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.16em;
}

.share-dialog {
  width: min(620px, calc(100% - 32px));
  padding: clamp(26px, 5vw, 48px);
  border: 1px solid rgba(230, 0, 0, 0.58);
  color: #fff;
  background: #111;
  box-shadow: 20px 20px 0 rgba(230, 0, 0, 0.18);
}

.share-dialog::backdrop {
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
}

.share-dialog__close {
  position: absolute;
  top: 12px;
  right: 15px;
  cursor: pointer;
  border: 0;
  color: rgba(255, 255, 255, 0.58);
  background: transparent;
  font-size: 28px;
}

.share-dialog h2 {
  margin: 0;
  font-size: clamp(25px, 5vw, 42px);
}

.share-dialog > p:not(.award-kicker, .share-dialog__status) {
  margin: 12px 0 28px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 13px;
}

.share-dialog__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  color: #fff;
}

.share-button--copy { background: var(--red); }
.share-button--x { background: #292929; }
.share-button--line { background: #06c755; }
.share-button--native { background: #354a74; }
.share-button--download {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 215, 0, 0.5);
  color: var(--yellow);
  background: rgba(255, 215, 0, 0.06);
}

.share-dialog__status {
  min-height: 1.5em;
  margin: 14px 0 0;
  color: var(--yellow);
  font-size: 12px;
  text-align: center;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

@media (max-width: 1080px) {
  .award-hero__index {
    position: absolute;
    right: 0;
    z-index: -1;
  }

  .award-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .award-preview {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 620px) {
  .award-header {
    min-height: 58px;
  }

  .award-brand {
    font-size: 18px;
  }

  .award-brand__mark {
    width: 31px;
    height: 31px;
  }

  .award-back {
    padding: 7px 9px;
    font-size: 9px;
  }

  .award-back__full {
    display: none;
  }

  main {
    padding-right: 14px;
    padding-bottom: 58px;
    padding-left: 14px;
  }

  .award-hero {
    min-height: 300px;
  }

  .award-hero h1 {
    font-size: clamp(62px, 23vw, 96px);
  }

  .award-hero__copy > p:last-child {
    font-size: 13px;
  }

  .award-preview {
    padding: 14px;
  }

  .award-workspace {
    max-width: 100%;
    box-shadow: 8px 8px 0 rgba(230, 0, 0, 0.09);
  }

  .award-preview__head {
    min-width: 0;
    overflow: hidden;
  }

  .award-preview__head strong,
  .award-preview__head p {
    white-space: nowrap;
  }

  .award-preview__head p {
    margin-left: 12px;
  }

  #award-canvas {
    min-width: 0;
  }

  .award-form {
    padding: 24px 17px;
  }

  .award-form__heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .theme-picker {
    gap: 4px;
  }

  .theme-picker label span {
    padding: 6px 3px;
    font-size: 8px;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .award-actions {
    grid-template-columns: 1fr;
  }

  .action-primary {
    grid-row: auto;
  }

  .share-dialog__actions {
    grid-template-columns: 1fr;
  }

  .share-button--download {
    grid-column: auto;
  }

  .award-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .award-preview__head p i { animation: none; }
}
