/* latin */
@font-face {
  font-family: 'Fredoka';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(hr-checkin-fredoka-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* thai */
@font-face {
  font-family: 'Mitr';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(hr-checkin-mitr-600-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

/* latin */
@font-face {
  font-family: 'Mitr';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(hr-checkin-mitr-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* thai */
@font-face {
  font-family: 'Mitr';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(hr-checkin-mitr-700-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}

/* latin */
@font-face {
  font-family: 'Mitr';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(hr-checkin-mitr-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.hr-imii-entry,
.ck-mobile-icon,
.ck-mobile-label,
.ck-mobile-copy,
.ck-method-heading,
.hrv-quick-title {
  display: none;
}

.ck-method-panel { display: contents; }

@media (max-width: 767px) {
  :root {
    --hr-imii-ink: #211d26;
    --hr-imii-paper: #f7f4fa;
    --hr-imii-pink: #ff7eb0;
    --hr-imii-accent: #a42761;
    --hr-imii-dark: #211e26;
    --hr-imii-shadow: 0 8px 24px rgba(57, 30, 66, .09);
  }

  body .page-wrapper {
    background: var(--hr-imii-paper) !important;
  }

  body .vh-menu-topbar {
    background: var(--hr-imii-paper) !important;
  }

  body .vh-side,
  body .vh-sub {
    background: linear-gradient(158deg, #fff, #f4e9f7);
    border-color: #eddfed;
  }

  body .vh-mlink,
  body .vh-slink,
  body .vh-fav-item {
    border-radius: 15px;
  }

  .hr-imii-entry {
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: var(--hr-imii-ink);
    text-decoration: none;
  }

  .hr-imii-entry img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    padding: 4px;
    border-radius: 14px;
    background: #28232d;
    object-fit: contain;
  }

  .hr-imii-entry strong,
  .hr-imii-entry small {
    display: block;
  }

  .hr-imii-entry strong {
    font-size: 15px;
    line-height: 1.3;
  }

  .hr-imii-entry small {
    color: #605267;
    font-size: 11px;
    line-height: 1.5;
  }

  .hr-imii-entry > span:last-child {
    display: flex;
    margin-left: auto;
    transform: rotate(180deg);
  }

  .hr-imii-entry.hr-imii-home,
  .hr-imii-entry.hr-imii-drawer {
    display: flex;
    padding: 10px 13px;
    border: 1px solid #efdaef;
    border-radius: 21px;
    background: linear-gradient(115deg, #fff, #f6e9f7);
  }

  .hr-imii-home {
    margin: 14px 0 18px;
    box-shadow: var(--hr-imii-shadow);
  }

  .hr-imii-drawer {
    margin-bottom: 12px;
  }

  body #hrvHero {
    margin: 0 -6px 16px;
    padding: 0 0 45px;
    border-radius: 25px 25px 31px 31px;
    background: #fff;
    color: var(--hr-imii-ink);
    box-shadow: 0 10px 24px rgba(65, 38, 54, .18);
  }

  body #hrvHero::before,
  body #hrvHero::after { display: none; }

  body :is(#hrvHero, .mi-profile-card) .hrv-profile-row {
    container-type: inline-size;
    --hrv-profile-unit: min(.96vw, 5.96px);
    --hrv-avatar-size: calc(48.6 * var(--hrv-profile-unit) - 10px);
    --hrv-avatar-start: calc(52.2 * var(--hrv-profile-unit) - var(--hrv-avatar-size) / 2);
    --hrv-panel-start: calc(68 * var(--hrv-profile-unit));
    display: grid;
    justify-items: center;
    gap: 0;
  }

  @supports (width: 1cqw) {
    body :is(#hrvHero, .mi-profile-card) .hrv-profile-row { --hrv-profile-unit: 1cqw; }
  }

  body :is(#hrvHero, .mi-profile-card) .hrv-profile-row::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 0 auto;
    height: calc(74 * var(--hrv-profile-unit));
    background: linear-gradient(180deg, #08172a2e, transparent 45%, #080e2380),
      #19274e url('hr-imii-moon-city.jpg') center 47% / cover no-repeat;
  }

  body :is(#hrvHero, .mi-profile-card) .hrv-profile-row::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    pointer-events: none;
    background:
      url('hr-imii-profile-arc.png') center calc(24.8 * var(--hrv-profile-unit)) /
        calc(55 * var(--hrv-profile-unit)) auto no-repeat,
      url('hr-imii-profile-disc.png') center calc(18 * var(--hrv-profile-unit)) /
        calc(70 * var(--hrv-profile-unit)) auto no-repeat;
  }

  body :is(#hrvHero, .mi-profile-card) .hrv-avatar {
    box-sizing: border-box;
    position: absolute;
    z-index: 1;
    inset-block-start: var(--hrv-avatar-start);
    inset-inline-start: 50%;
    transform: translateX(-50%);
    width: var(--hrv-avatar-size);
    height: var(--hrv-avatar-size);
    margin: 0;
    border: 5px solid #fff;
    box-shadow: 0 7px 20px #11132855;
  }

  body :is(#hrvHero, .mi-profile-card) .hrv-profile-text {
    box-sizing: border-box;
    width: 100%;
    margin-top: var(--hrv-panel-start);
    padding: calc(var(--hrv-avatar-start) + var(--hrv-avatar-size) - var(--hrv-panel-start) + 12px) 15px 8px;
    border-radius: 50% 50% 0 0 / calc(6 * var(--hrv-profile-unit)) calc(6 * var(--hrv-profile-unit)) 0 0;
    background: #fff;
    text-align: center;
  }

  body #hrvHero .hrv-name { color: var(--hr-imii-accent); font-size: clamp(20px, 5.4vw, 26px); }
  body #hrvHero .hrv-pos {
    color: #5c4d5b;
    font-size: 12px;
  }

  body #hrvHero .hrv-head-acts {
    position: absolute;
    z-index: 2;
    top: calc(12px + env(safe-area-inset-top));
    right: 13px;
  }

  body #hrvHero .hrv-head-acts > :is(a, button) {
    box-sizing: border-box;
    width: 42px;
    height: 42px;
    border: 1px solid #fff9;
    border-radius: 15px;
    background: #fffdf5ef;
    color: #a42761;
  }

  body #hrvHero .hrv-head-acts > a > img { filter: none; }

  body #hrvHero .hrv-quick-zone { padding: 0 10px; }

  body #hrvHero .hrv-quick-title {
    display: block;
    margin: 5px 2px 0;
    color: var(--hr-imii-ink);
    font-size: 14px;
    font-weight: 700;
  }

  body #hrvHero .hrv-quick {
    gap: 6px;
    margin-top: 8px;
  }

  body #hrvHero .hrv-quick a {
    justify-content: center;
    gap: 5px;
    min-height: 73px;
    padding: 6px 1px;
    border: 1px solid #f4e8ef;
    border-radius: 24px;
    background: linear-gradient(#fff, #faedf4);
    color: #492841;
    box-shadow: 0 4px 8px #54344714;
    font-size: clamp(9px, 2.55vw, 12px);
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  body #hrvHero .hrv-quick a:nth-child(5n + 2) { background: linear-gradient(#fff, #f1ebff); }
  body #hrvHero .hrv-quick a:nth-child(5n + 3) { background: linear-gradient(#fff, #ecf2ff); }
  body #hrvHero .hrv-quick a:nth-child(5n + 4) { background: linear-gradient(#fff, #fff4e9); }
  body #hrvHero .hrv-quick a:nth-child(5n + 5) { background: linear-gradient(#fff, #eaf8f2); }
  body #hrvHero .hrv-quick a.hrv-quick-empty { grid-column: 1 / -1; min-height: 50px; }

  body #hrvHero .hrv-quick a > img,
  body #hrvHero .hrv-quick a > .hrv-quest-icon {
    width: 26px;
    height: 26px;
    object-fit: contain;
    filter: none;
  }

  body #hrvHero .hrv-quick a .hrv-quest-icon { color: #7a2956; stroke: currentColor; }
  body #hrvHero .hrv-quick-badge { top: -3px; right: 2px; }
  body #hrvHero .hrv-quick-arrow { bottom: 4px; min-width: 44px; min-height: 36px; color: #a42761; }
  body #hrvHero .hrv-quick-edit { margin-top: 8px; }
  body #hrvHero .hrv-quick-edit a { padding: 6px 18px; font-size: 12px; }

  body .hrv-daily-card,
  body .hrv-feed-card {
    border: 1px solid #efe4ee;
    border-radius: 23px;
    box-shadow: var(--hr-imii-shadow);
  }

  body .hrv-daily-card { background: linear-gradient(160deg, #fff 35%, #fff1f6); }
  body .hrv-daily-card .hrv-date,
  body .hrv-daily-card .hrv-inout .lb { color: var(--hr-imii-accent); }

  body .page-wrapper:has(.ck-page) {
    min-height: calc(100svh - 96px - env(safe-area-inset-bottom));
    overflow-x: clip;
    background: #f7efff !important;
  }

  body .ck-page {
    --ck-unit: 1vw;
    display: flex;
    min-height: inherit;
    padding: 0;
    background:
      radial-gradient(ellipse 60vw 29vw at 126% 0, #b5d4f9 98%, transparent),
      linear-gradient(160deg, #f5e6fa, #f7efff 62%);
    color: #310d2c;
    font-family: Mitr, Prompt, Tahoma, sans-serif;
  }

  body .ck-shell {
    display: flex;
    flex-direction: column;
    max-width: none;
  }

  body .ck-page .ck-header.ck-attendance-bar {
    z-index: 2;
    align-items: center;
    justify-content: start;
    gap: 7px;
    min-height: 0;
    padding-block-start: calc(8px + env(safe-area-inset-top));
    padding-inline: max(10px, env(safe-area-inset-left)) max(10px, env(safe-area-inset-right));
    overflow: visible;
  }

  body .ck-page .ck-header .ck-back,
  body .ck-header .ck-header-icon {
    position: static;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 11px;
  }

  body .ck-header .ck-back { font-size: 25px; }

  body .ck-header .ck-header-icon {
    display: block;
    padding: 6px;
    background: #fff9;
    object-fit: contain;
  }

  body .ck-header-title {
    min-width: 0;
    font-size: clamp(16px, 5vw, 22px);
    font-weight: 700;
    line-height: 1.2;
  }

  body .ck-desktop-copy { display: none; }
  body .ck-mobile-copy { display: inline; }
  body .ck-header .ck-header-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--hr-bar-muted);
    font-size: clamp(10px, 2.8vw, 13px);
    font-weight: 400;
  }

  body .ck-main {
    position: relative;
    isolation: isolate;
    display: grid;
    flex: 1;
    grid-template-rows: auto auto auto 1fr;
    margin: 0;
    padding: 5px 0 0;
  }

  body .ck-main::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -12px 1% auto;
    height: clamp(145px, 50vw, 240px);
    border-radius: 48% 49% 44% 38% / 65% 59% 45% 34%;
    background: linear-gradient(125deg, #ffdfa9, #ffc7b0 64%, #ffd9c9);
    transform: rotate(-6deg);
    pointer-events: none;
  }

  body .ck-method-heading::after {
    content: '';
    display: inline-block;
    width: .85em;
    height: .9em;
    margin-left: .2em;
    vertical-align: .05em;
    background:
      linear-gradient(128deg, transparent 34%, #ffb000 35% 66%, transparent 67%) 5% 0 / 46% 39% no-repeat,
      linear-gradient(164deg, transparent 36%, #ffb000 37% 64%, transparent 65%) 90% 49% / 63% 43% no-repeat,
      linear-gradient(14deg, transparent 35%, #ffb000 36% 65%, transparent 66%) 69% 98% / 48% 37% no-repeat;
  }

  body :is(.ck-clock, .ck-date) {
    margin-inline: clamp(12px, 5.3vw, 24px);
    background: linear-gradient(104deg, #ffce9c, #ffc18b 53%, #ffd2a8);
    color: #520928;
    --ck-clock-radius: clamp(38px, 19vw, 90px);
  }

  body .ck-clock {
    grid-row: 1;
    gap: 4px;
    margin-top: 0;
    padding: clamp(6px, 2.5vw, 12px) 3px 0;
    border: 1px solid #fff5dd;
    border-bottom: 0;
    border-radius: var(--ck-clock-radius) var(--ck-clock-radius) 0 0;
    font-variant-numeric: tabular-nums;
  }

  body .ck-clock-main {
    font: 700 clamp(68px, 28vw, 132px) / .88 Fredoka, Mitr, Tahoma, sans-serif;
    letter-spacing: -.033em;
    transform: scaleX(1.12);
  }

  body .ck-clock-sec {
    position: absolute;
    width: 1px;
    min-width: 0;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }

  body .ck-date {
    grid-row: 2;
    padding: 0 9px clamp(10px, 3.6vw, 18px);
    border: 1px solid #fff5dd;
    border-top: 0;
    border-radius: 0 0 var(--ck-clock-radius) var(--ck-clock-radius);
    box-shadow: 0 13px 14px -10px #df927477;
    font-size: clamp(14px, 5vw, 22px);
    font-weight: 600;
    line-height: 1.18;
  }

  body .ck-method-heading {
    position: relative;
    z-index: 1;
    display: block;
    margin: 3px clamp(12px, 5.3vw, 24px) -3px;
    color: #310d2c;
    font-size: clamp(18px, 5.8vw, 27px);
    font-weight: 700;
    line-height: 1.4;
  }

  body .ck-method-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(18px, 8vw, 32px) 0 clamp(12px, 9vw, 34px);
    border-top: 2px solid #fff;
    border-radius: clamp(34px, 13vw, 62px) clamp(34px, 13vw, 62px) 0 0;
    background: #f7efff;
  }

  body .ck-subtitle { display: none; }

  @media (max-height: 640px) {
    body .ck-page .ck-header.ck-attendance-bar {
      padding-block-start: calc(6px + env(safe-area-inset-top));
    }

    body .ck-method-panel { padding-block: 12px 8px; }
    body .ck-page .ck-methods { margin-block: 2px 8px; }
  }


  body .ck-methods {
    position: relative;
    container-type: inline-size;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, minmax(0, 1fr));
    gap: clamp(8px, 3vw, 12px);
    width: min(88%, 420px);
    height: clamp(224px, calc(100svh - 349px - env(safe-area-inset-top) - env(safe-area-inset-bottom)), min(88vw, 390px));
    margin: 4px auto 14px;
  }

  body .ck-methods::before { display: none; }

  body .ck-methods > :is(.ck-method, .ck-method-center) {
    box-sizing: border-box;
    inset: 0;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 3px;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 4px;
    transform: none;
    color: #4c2946;
    text-align: center;
    text-decoration: none;
  }

  body .ck-methods > .ck-method {
    position: relative;
    min-width: 0;
    border: 1px solid #fff;
    border-radius: clamp(13px, 5vw, 24px);
    background: linear-gradient(145deg, #fff, var(--ck-tile));
    box-shadow: 0 4px 0 var(--ck-tile-edge), 0 7px 14px #60305112;
    --ck-tile: #f9f0fc;
    --ck-tile-edge: #e0cfe8;
  }

  body .ck-methods > .face { grid-area: 1 / 1; }
  body .ck-methods > .wifi { grid-area: 1 / 2; --ck-tile: #eef0ff; --ck-tile-edge: #d9d9f0; }
  body .ck-methods > .qrscan { grid-area: 2 / 1; padding-inline-end: 16cqw; --ck-tile: #eaf8f3; --ck-tile-edge: #cee4da; }
  body .ck-methods > .beacon { grid-area: 2 / 2; padding-inline-start: 16cqw; --ck-tile: #fff0f2; --ck-tile-edge: #edd5de; }
  body .ck-methods > .qrcreate { grid-area: 3 / 1; --ck-tile: #fff7e8; --ck-tile-edge: #ebdfc8; }
  body .ck-methods > .photo { grid-area: 3 / 2; --ck-tile: #eef0f8; --ck-tile-edge: #d8dbe8; }

  body .ck-methods > .ck-method:active:not(:disabled) { transform: translateY(2px); }

  body .ck-methods > .ck-method-center {
    position: absolute;
    z-index: 3;
    grid-area: 1 / 1 / 4 / 3;
    width: clamp(82px, 33cqw, 124px);
    height: clamp(82px, 33cqw, 124px);
    margin: auto;
    border: 2px solid #fffc;
    border-radius: 50%;
    background: linear-gradient(150deg, #ffeff3, #ffb3cc);
    box-shadow: 0 7px 18px #d7567f55, 0 0 0 4px #f7efff;
    color: #591a3c;
    isolation: isolate;
  }

  body .ck-methods > .ck-method-center:active { transform: scale(.96); }

  body .ck-methods > .ck-method-center::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0;
    border: 0;
    opacity: 1;
    transform: none;
    box-shadow: none;
    background: url('hr-imii-profile-arc.png') center 32% / 86% auto no-repeat;
    pointer-events: none;
  }

  body .ck-mobile-icon {
    display: block;
    width: clamp(23px, 9cqw, 33px);
    aspect-ratio: 1;
    color: #45435d;
  }

  body .ck-mobile-icon svg {
    display: block;
    width: 100%;
    height: 100%;
  }

  body .ck-method-center .ck-mobile-icon {
    width: clamp(26px, 10.5cqw, 40px);
    color: #8b244e;
  }

  body .ck-mobile-label {
    display: block;
    max-width: 28cqw;
    font-size: clamp(9px, 3.6cqw, 11px);
    font-weight: 600;
    line-height: 1.2;
  }


  body .ck-methods > :is(.ck-method, .ck-method-center):focus-visible,
  body .ck-back:focus-visible,
  body .hr-imii-entry:focus-visible {
    outline: 2px solid #9c2761;
    outline-offset: 2px;
  }

  body .ck-methods > :is(.ck-method, .ck-method-center) > img,
  body .ck-method-center::after {
    display: none;
  }

  body .ck-mobile-label small { display: block; font-size: .89em; font-weight: 400; }
  body .ck-method.photo:disabled { opacity: .72; cursor: not-allowed; }
  body .ck-method-panel > br { display: none; }
  body .ck-person { margin-top: 1px; color: #6d5269; font: 400 clamp(9px, 2.6vw, 12px) / 1.4 Prompt, Tahoma, sans-serif; }

body.hr-imii-standalone {
    background: var(--hr-imii-paper);
  }

  body.hr-imii-standalone :is(.hr-top, .mi-hero, .hns-head, .sp-head) {
    background: radial-gradient(ellipse at 100% 0%, #543449, transparent 65%), var(--hr-imii-dark);
    box-shadow: var(--hr-imii-shadow);
  }

  body.hr-imii-standalone :is(.mi-card, .sp-card, .hns-head ~ .wrap .card) {
    border-color: #efe4ee;
    border-radius: 23px;
    box-shadow: var(--hr-imii-shadow);
  }

  body.hr-imii-login {
    background: radial-gradient(ellipse at 100% 8%, #603c56, transparent 53%), var(--hr-imii-dark);
  }

  body.hr-imii-login .vh-page {
    padding: calc(72px + env(safe-area-inset-top)) 14px calc(22px + env(safe-area-inset-bottom));
  }

  body.hr-imii-login .vh-card {
    border: 1px solid #f4dbeb;
    border-radius: 29px;
    background: linear-gradient(160deg, #fff, #fff1f7);
  }

  body.hr-imii-login .vh-submit {
    border-radius: 18px;
    background: #a42761;
  }
}
