/* ================================================================
   HTML5 Boilerplate styles - h5bp.com (generated via initializr.com)
   Customized to include a flexible grid system, flexible image
   ================================================================ */

html,
button,
input,
select,
textarea {
    color: #222;
}

body {
    font-size: 1em;
    line-height: 1.4;
}

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

textarea {
    resize: vertical;
}



/* ================================================================
   Author's custom styles
   ================================================================ */

/* ボックスモデルの指定 */
* {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
}

/* ================================================================
   Style.css (27-Aug-2022, A.Kanno)
   ================================================================ */

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] {
  -moz-appearance:textfield;
}

button[type="submit"] {
    -webkit-appearance: none;
}
input[type="button"],input[type="submit"], input[type="reset"] {
    -webkit-appearance: none;
    display:inline-block;
    background:#d13415;
    padding:10px;
    text-align:center;
    color:#FFF;
    margin:5px;
    border:1px solid;
    cursor:pointer;
    width: 150px;
}

form table{
    border-spacing: 0;
}
form td{
    padding: 3px;
    border-bottom: 1px solid #EEE;
}
form th{
    padding: 1px;
    border-bottom: 1px solid #EEE;
    text-align: left;
    font-weight: normal;
    vertical-align: top;
    width: 9em;
}
.hissu,.ninni{
    padding-right: 2em;
    position: relative;
}
.hissu::after,.ninni::after{
    content: "必須";
    display: inline-block;
    position: absolute;
    right: 1px;
    top: 5px;
    border: 1px solid #CCC;
    padding: 0 5px;
    font-size: 85%;
    background: #d40000;
    color: #FFF;
}
.ninni::after{
    content: "任意";
    background: #d2e5ff;
    color: #333;
}
form input[type="password"],form textarea{
    background: #f2f2f2;
    border: 1px solid #999;
    margin: 0 5px;
    width: 300px;
    padding: 5px;
    box-sizing: border-box;
}
form input[type="text"],form textarea{
    background: #f2f2f2;
    border: 1px solid #999;
    margin: 0 5px;
    width: 300px;
    padding: 5px;
    box-sizing: border-box;
}
.attention{
    display: inline-block;
}
.middleinput{
    width: 100px !important;
}
.smallinput{
    width: 80px !important;
}

.buttonwrap{
    text-align: center;
    padding: 20px 0;
}

form input[type="button"],form input[type="submit"]{
    display:inline-block;
    background:#d13415;
    padding:10px;
    text-align:center;
    color:#FFF;
    margin:5px;
    border:1px solid;
    cursor:pointer;
    width: 150px;
}
form input[type="button"]{
    background: #f2f2f2;
    color: #333;
#   border: none;
}

form button[type="submit"]{
    background: #f2f2f2;
    border: 1px solid #999;
    margin: 0 1px;
#    width: 50px;
    padding: 1px;
    box-sizing: border-box;
}

.normalButton button {
    -webkit-appearance: none;
    display:inline-block;
    background:#EEE;
    padding:1px;
    text-align:center;
    color:black;
    margin:5px;
    border:1px solid;
    cursor:pointer;
    width: 150px;
}


.new {
    margin: 20px;
}

@media (max-width:500px){
    form table,form tr,form th,form td{
        display: block;
    }
    form th{
        width: auto;
        border-bottom: none;
        padding: 13px 10px 0 5em;
    }
    .hissu::after,.ninni::after{
        right: auto;
        left: 15px;
    }
    form input[type="text"],form textarea{
        width: calc(100% - 10px);
    }
    form input[type="password"],form textarea{
        width: calc(100% - 10px);
    }
}

/* ================================================================
   Flexible Grid Sytem
   - Based on Foundation "The Grid" http://foundation.zurb.com/
   ================================================================ */

.row {
  width: 1140px;
  max-width: 100%;
  min-width: 768px;
  margin: 0 auto;
  overflow: hidden;
}

.inline{
  display:inline-block;
}

.inline-block{
  display:inline-block;
}

.row .row {
  width: auto;
  max-width: none;
  min-width: 0;
  margin: 0 -10px;
}

.cols {
  min-height: 1px;
  padding: 0 10px;
  float: left;
  position: relative;
}

/* カラムのpaddingをなくすcollapseクラス */
.row.collapse .cols, .row.collapse .cols { padding: 0; }
.row .row.collapse { margin: 0; }

[class*="cols"] + [class*="cols"]:last-child { float: right; }
[class*="cols"] + [class*="cols"].end { float: left; }

.row .one { width: 8.33%; }
.row .two { width: 16.66%; }
.row .three { width: 25%; }
.row .four { width: 33.33%; }
.row .five { width: 41.66%; }
.row .six { width: 50%; }
.row .seven { width: 58.33%; }
.row .eight { width: 66.66%; }
.row .nine { width: 75%; }
.row .ten { width: 83.33%; }
.row .eleven { width: 91.66%; }
.row .twelve { width: 100%; }

/* PUSH & PULL */
.push-two { left: 16.66%; }
.pull-two { right: 16.66%; }
.push-three { left: 25%; }
.pull-three { right: 25%; }
.push-four { left: 33.33%; }
.pull-four { right: 33.33%; }
.push-five { left: 41.66%; }
.pull-five { right: 41.66%; }
.push-six { left: 50%; }
.pull-six { right: 50%; }
.push-seven { left: 58.33%; }
.pull-seven { right: 58.33%; }
.push-eight { left: 66.66%; }
.pull-eight { right: 66.66%; }
.push-nine { left: 75%; }
.pull-nine { right: 75%; }
.push-ten { left: 83.33%; }
.pull-ten { right: 83.33%; }

@media screen and (max-width:49.25em){
/* 788px以下向けのモバイル版グリッド・スタイル */
  .cols {
    width: auto !important;
    height: 100%;
    float: none;
  }
  .row { width: auto; min-width: 0; margin-left: 0; margin-right: 0; }
  [class*="cols"] + [class*="cols"]:last-child { float: none; }
  [class*="cols"] + [class*="cols"].end { float: none; }

  /* PUSH & PULLの調整*/
  .push-two, .push-three, .push-four, .push-five, .push-six, .push-seven, .push-eight, .push-nine, .push-ten { left: auto; }
  .pull-two, .pull-three, .pull-four, .pull-five, .pull-six, .pull-seven, .pull-eight, .pull-nine, .pull-ten { right: auto; }

  /* モバイル版4カラムグリッド */
  .row .mobile-one { width: 25% !important; float: left; padding: 0 10px; }
  .row .mobile-one:last-child { float: right; }
  .row .mobile-one.end { float: left; }
  .row.collapse .mobile-one { padding: 0; }

  .row .mobile-two { width: 50% !important; float: left; padding: 0 10px; }
  .row .mobile-two:last-child { float: right; }
  .row .mobile-two.end { float: left; }
  .row.collapse .mobile-two { padding: 0; }

  .row .mobile-three { width: 75% !important; float: left; padding: 0 10px; }
  .row .mobile-three:last-child { float: right; }
  .row .mobile-three.end { float: left; }
  .row.collapse .mobile-three { padding: 0; }

  .row .mobile-four { width: 100% !important; float: left; padding: 0 10px; }
  .row .mobile-four:last-child { float: right; }
  .row .mobile-four.end { float: left; }
  .row.collapse .mobile-four { padding: 0; }

  /* モバイル用 PUSH & PULL */
  .mobile-push-one { left: 25%; }
  .mobile-pull-one { right: 25%; }
  .mobile-push-two { left: 50%; }
  .mobile-pull-two { right: 50%; }
  .mobile-push-three { left: 75%; }
  .mobile-pull-three { right: 75%; }

  /* モバイル用collapseクラス */
  .row.mobile-collapse .cols, .row.mobile-collapse .cols { padding: 0; }
  .row .row.mobile-collapse { margin: 0; }
  .row.mobile-collapse .mobile-one { padding: 0; }
  .row.mobile-collapse .mobile-two { padding: 0; }
  .row.mobile-collapse .mobile-three { padding: 0; }
  .row.mobile-collapse .mobile-four { padding: 0; }
}

@media screen and (max-width:25em){
/* 400px以下で強制的に1カラムにするクラス */
  .row .cols.force-one {
    float: none;
    width: auto !important;
    height: 100%;
  }
}

/* ================================================================
   共通ページ要素スタイル
   ================================================================ */

#main {
  background: #fff;
  padding-bottom: 0.2em;
}

#main h1 {
  margin: 0.3em 0;
  padding: 0.2em;
  border-bottom: 1px solid #ddd;
  font-size: 1.6em;
}

#main h2 {
  margin: 0.3em 0;
  padding: 0.2em 0.3em;
  background: #ebddc7;
  font-size: 1.2em;
  color: #280e00;
}

#main p {
  padding: 0 0 1em;
}

/* 基本テーブル */
#main table {
  width: 100%;
  margin: 1em 0;
  border-top: #997f66 1px solid;
  border-left: #997f66 1px solid;
  font-size: 0.95em;
}
#main th, #main td {
  border-right: #997f66 1px solid;
  border-bottom: #997f66 1px solid;
  padding: 0.2em 0.5em;
}
#main th {
  background: #f7ece1;
}
#main td {
  background: #fff;
}

/* ----------
   フォーム
   ---------- */
/* Select */
input, select, textarea {
  width: 94%;
  margin-bottom: 0.4em;
}

/* ================================================================
   個別ページ特有スタイル
   ================================================================ */
/* ----------
   トップページ メインボタン
   ---------- */
body:has(.menu-page) {
  min-height: 100vh;
  background: #f1f5f9;
}
body:has(.itil-menu) {
  margin: 0;
}
.menu-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.75rem;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
}
.menu-page-title {
  margin: 0 0 0.85em;
  text-align: left;
  font-size: 1.35em;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
}
.menu-group-title {
  margin: 0.15em 0 0.85em;
  text-align: left;
  font-size: 0.82em;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #475569;
}
.menu-divider {
  border: 0;
  height: 1px;
  margin: 1.7em 0 1.25em;
  background: linear-gradient(90deg, transparent, #cbd5e1 8%, #cbd5e1 92%, transparent);
}
#main .top-buttons {
  margin: 0;
}
.menu-stack,
.menu-stack form {
  width: 100%;
}
.menu-stack {
  max-width: none;
  margin: 0;
}
.menu-stack form {
  margin: 0;
}
.menu-beside-note {
  margin: -0.4em 0 1em;
  color: #475569;
  text-align: left;
}
/* Exam section: button and its note share one row. Wide windows place both exams on one 4-part row. */
.itil-menu .menu-exam-pair > .menu-cell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 0.85rem;
  align-items: center;
  margin: 0 0 0.85rem;
}
.itil-menu .menu-exam-pair .menu-beside-note {
  margin: 0;
  min-width: 0;
  color: #334155;
  font-size: 0.95rem;
  line-height: 1.5;
}
.itil-menu #main.menu-exam-pair button.top-buttons {
  margin: 0;
}
#main button.top-buttons {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: 100%;
  min-height: 4.5em;
  padding: 1em 2.7em 1em 1.25em;
  margin: 0 0 0.7em;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  background:
    linear-gradient(var(--accent, #2563eb), var(--accent, #2563eb)) left / 5px 100% no-repeat,
    #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
  color: #0f172a;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: left;
  line-height: 1.35;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
#main button.top-buttons::after {
  content: "";
  position: absolute;
  right: 1.15em;
  top: 50%;
  width: 0.42em;
  height: 0.42em;
  border-right: 2px solid #94a3b8;
  border-top: 2px solid #94a3b8;
  transform: translateY(-50%) rotate(45deg);
}
#main button.top-buttons .menu-btn-label {
  font-size: 1.04em;
}
#main button.top-buttons .menu-btn-sub {
  margin-top: 0.22em;
  font-size: 0.8em;
  font-weight: 500;
  color: #64748b;
}
#main button.top-buttons:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
}
#main .top-buttons a, button {
  display: block;
  text-decoration: none;
}

/* Guest / locked subjects: HTML disabled (deactivated) look */
#main button.top-buttons:disabled,
#main button.top-buttons-disabled {
  opacity: 0.5;
  filter: grayscale(0.25);
  cursor: not-allowed;
  color: #64748b !important;
  pointer-events: none;
  background:
    linear-gradient(#94a3b8, #94a3b8) left / 5px 100% no-repeat,
    #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.admin-page {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.75rem;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
}
.admin-page .menu-page-title {
  text-align: left;
}
.admin-page .buttonwrap {
  margin-top: 0.4em;
  text-align: left;
}

/* ITIL HTML menus: pack toward the top. Wide windows use four columns, so each button is about a quarter of the screen. */
.itil-menu.menu-page,
.itil-menu.admin-page {
  padding-top: 0.45rem;
  padding-bottom: 1rem;
}
.itil-menu .menu-page-title {
  margin-bottom: 0.28em;
}
.itil-menu .menu-group-title {
  margin: 0 0 0.28em;
}
.itil-menu .menu-divider {
  margin: 0.5em 0 0.32em;
}
.itil-menu #main button.top-buttons {
  min-height: 2.9em;
  margin-bottom: 0.35em;
  padding-top: 0.55em;
  padding-bottom: 0.55em;
}
.itil-menu .menu-exam-pair > .menu-cell {
  margin-bottom: 0.35rem;
}
.itil-menu .buttonwrap {
  margin-top: 0.2rem !important;
  padding: 0.1rem 0 0.2rem;
}
@media (min-width: 960px) {
  .itil-menu.menu-page,
  .itil-menu.admin-page {
    max-width: none;
    width: 100%;
    margin: 0;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
  .itil-menu .menu-stack {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 0.55rem;
    row-gap: 0.35rem;
    align-items: start;
  }
  .itil-menu .menu-stack > form,
  .itil-menu .menu-stack > .menu-cell > form {
    display: flex;
    min-width: 0;
  }
  .itil-menu .menu-stack > .menu-cell {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .itil-menu .menu-stack > .menu-beside-note {
    grid-column: 1 / -1;
  }
  .itil-menu .menu-stack.menu-exam-pair {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: center;
  }
  .itil-menu .menu-stack.menu-exam-pair > .menu-cell {
    display: contents;
    margin: 0;
  }
  .itil-menu #main button.top-buttons {
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
  }
}
.admin-page form {
  width: 100%;
}
.admin-page .menu-text-action,
form input[type="submit"].menu-text-action {
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 0.55em 0.15em;
  border: 0;
  background: transparent;
  color: #334155;
  font-weight: 600;
  box-shadow: none;
}
form input[type="submit"].menu-text-action:hover {
  color: #0f172a;
  background: transparent;
}

body:has(.auth-page),
body:has(.billing-page) {
  min-height: 100vh;
  background: #f1f5f9;
  color: #0f172a;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", Meiryo, sans-serif;
}
.auth-page,
.billing-page {
  max-width: 26rem;
  margin: 2.5rem auto;
  padding: 1.75rem 1.4rem 2rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.billing-page {
  max-width: 40rem;
}
.auth-page .menu-page-title,
.billing-page .menu-page-title {
  margin-bottom: 0.7em;
}
.auth-page p,
.billing-page p {
  margin: 0 0 0.85em;
  color: #475569;
  text-align: left;
}
.auth-page form label {
  display: block;
  margin: 0.75em 0 0.3em;
  color: #334155;
  font-weight: 600;
}
.auth-page form input[type="text"],
.auth-page form input[type="email"],
.auth-page form input[type="password"] {
  width: 100%;
  margin: 0;
  padding: 0.7em 0.8em;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
}
.auth-page form input[type="submit"] {
  width: 100%;
  margin: 1.15em 0 0;
  padding: 0.8em;
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}
.auth-page a {
  color: #2563eb;
}
.billing-card {
  margin: 0 0 0.9em;
  padding: 1em 1.15em 1em 1.25em;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  background:
    linear-gradient(#2563eb, #2563eb) left / 5px 100% no-repeat,
    #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}
.billing-card p {
  margin: 0 0 0.7em;
  color: #0f172a;
}
.billing-card input[type="submit"] {
  width: auto;
  margin: 0;
  padding: 0.55em 1em;
  border: 0;
  border-radius: 10px;
  background: #2563eb;
  color: #fff;
  font-weight: 700;
}

button {
    width: 100%;
    margin-bottom: 1em;
    font-size: 1em;
    border: 0
}
